aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorJussi Lahdenniemi2016-02-26 12:51:24 +0200
committerEli Zaretskii2016-02-26 12:51:24 +0200
commit97d7a0b8db4ce32a8e489dec48634b7e85212eaa (patch)
treee1477561851991fe7be1213747d201d744794286 /etc
parent22994735af588be9c2d6d438155b73328aaa0cf3 (diff)
downloademacs-97d7a0b8db4ce32a8e489dec48634b7e85212eaa.tar.gz
emacs-97d7a0b8db4ce32a8e489dec48634b7e85212eaa.zip
Improve the register-hotkey functionality on MS-Windows
* src/w32fns.c (_WIN32_WINNT): Define to 0x0600, needed for keyboard hook functionality. Include w32inevt.h, basetyps.h and unknwn.h. (VK_ANY, WM_WTSSESSION_CHANGE, WTS_SESSION_LOCK): New macros. (kbdhook): A new struct definition. (funhook, setup_w32_kbdhook, remove_w32_kbdhook, hook_w32_key) (check_w32_winkey_state, reset_w32_kbdhook_state): New functions. (modifier_set): Call check_w32_winkey_state if a Win key was pressed and the keyboard hook is active. (w32_wnd_proc): Don't handle Win key combinations if the keyboard hook is active. Only register/unregister the hotkeys if the keyboard hook is not active. When WM_CREATE is received, call setup_w32_kbdhook. When WM_DESTROY is received, call reset_w32_kbdhook_state. (lookup_vk_code): When the keyboard hook is active, map alphanumeric characters to themselves. (w32_parse_and_hook_hot_key): Renamed from w32_parse_hot_key. Map modified keys to VK_ANY if the keyboard hook is active. Register Alt-x and Win-x combinations. (Fw32_shell_execute): Update doc string to reflect new functionality. Bypass the code that posts the WM_EMACS_REGISTER_HOT_KEY message if the keyboard hook is active. (Fw32_unregister_hot_key): Bypass the code that posts the WM_EMACS_UNREGISTER_HOT_KEY message if the keyboard hook is active. (syms_of_w32fns) <w32-pass-lwindow-to-system> <w32-pass-rwindow-to-system, w32-phantom-key-code> <w32-lwindow-modifier, w32-rwindow-modifier>: Update doc strings to reflect the new functionality. * src/w32console.c (initialize_w32_display): Install the low-level keyboard hook. * src/w32inevt.c (key_event): Handle Win-x combinations only if the keyboard hook is not active. If the hook is active, use check_w32_winkey_state instead. * src/w32term.h (setup_w32_kbdhook, remove_w32_kbdhook) (check_w32_winkey_state): Add prototypes. (w32_kbdhook_active): New macro. * doc/emacs/msdos.texi (Windows Keyboard): Update to reflect the new functionality.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index ec68cce5335..29b013a3ede 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -129,6 +129,15 @@ changed size when `window-size-change-functions' are run.
129 129
130* Changes in Emacs 25.2 on Non-Free Operating Systems 130* Changes in Emacs 25.2 on Non-Free Operating Systems
131 131
132** Intercepting hotkeys on Windows 7 and later now works better.
133The new keyboard hooking code properly grabs system hotkeys such as
134Win-* and Alt-TAB, in a way that Emacs can get at them before the
135system. This makes the `w32-register-hot-key' functionality work
136again on all versions of MS-Windows starting with Windows 7. On
137Windows NT and later you can now register any hotkey combination. (On
138Windows 9X, the previous limitations, spelled out in the Emacs manual,
139still apply.)
140
132 141
133* Installation Changes in Emacs 25.1 142* Installation Changes in Emacs 25.1
134 143