Beispiel #1
0
        static void InitKeyboardHook()
        {
            if (hotkeys == null)
            {
                hotkeys = new Dictionary <string, Keyboard.HotkeyDefinition>();
            }

            if (hotstrings == null)
            {
                hotstrings = new Dictionary <string, Keyboard.HotstringDefinition>();
            }

            if (keyboardHook != null)
            {
                return;
            }

            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                keyboardHook = new Windows.KeyboardHook();
            }
            else
            {
                keyboardHook = new Linux.KeyboardHook();
            }

            Keyboard.IAInputCommand.Instance.Hook = keyboardHook;
        }
Beispiel #2
0
        static void InitKeyboardHook()
        {
            if (hotkeys == null)
                hotkeys = new Dictionary<string, Keyboard.HotkeyDefinition>();

            if (hotstrings == null)
                hotstrings = new Dictionary<string, Keyboard.HotstringDefinition>();

            if (keyboardHook != null)
                return;

            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
                keyboardHook = new Windows.KeyboardHook();
            else
                keyboardHook = new Linux.KeyboardHook();

            Keyboard.IAInputCommand.Instance.Hook = keyboardHook;
        }