* src/w32fns.c (Fw32_register_hot_key): Doc fix. (Bug#44456)

This commit is contained in:
Eli Zaretskii 2020-11-05 19:46:50 +02:00
parent 89740e9cb5
commit e90ffcf759

View file

@ -8626,8 +8626,8 @@ DEFUN ("w32-register-hot-key", Fw32_register_hot_key,
doc: /* Register KEY as a hot-key combination. doc: /* Register KEY as a hot-key combination.
Certain key combinations like Alt-Tab and Win-R are reserved for Certain key combinations like Alt-Tab and Win-R are reserved for
system use on Windows, and therefore are normally intercepted by the system use on Windows, and therefore are normally intercepted by the
system. These key combinations can be received by registering them system. These key combinations can be used in Emacs by registering
as hot-keys, except for Win-L which always locks the computer. them as hot-keys, except for Win-L which always locks the computer.
On Windows 98 and ME, KEY must be a one element key definition in On Windows 98 and ME, KEY must be a one element key definition in
vector form that would be acceptable to `define-key' (e.g. [A-tab] for vector form that would be acceptable to `define-key' (e.g. [A-tab] for
@ -8636,16 +8636,19 @@ Alt-Tab). The meta modifier is interpreted as Alt if
modifier keys. The return value is the hotkey-id if registered, modifier keys. The return value is the hotkey-id if registered,
otherwise nil. otherwise nil.
On Windows versions since NT, KEY can also be specified as [M-], [s-] or On Windows versions since NT, KEY can also be specified as just a
[h-] to indicate that all combinations of that key should be processed modifier key, [M-], [s-] or [H-], to indicate that all combinations
by Emacs instead of the operating system. The super and hyper of the respective modifier key should be processed by Emacs instead
modifiers are interpreted according to the current values of of the operating system. The super and hyper modifiers are
`w32-lwindow-modifier' and `w32-rwindow-modifier'. For instance, interpreted according to the current values of `w32-lwindow-modifier'
setting `w32-lwindow-modifier' to `super' and then calling and `w32-rwindow-modifier'. For instance, setting `w32-lwindow-modifier'
`(w32-register-hot-key [s-])' grabs all combinations of the left Windows to `super' and then calling `(w32-register-hot-key [s-])' grabs all
key to Emacs, but leaves the right Windows key free for the operating combinations of the left Windows key to Emacs as keys with the Super
system keyboard shortcuts. The return value is t if the call affected modifier, but leaves the right Windows key free for the operating
any key combinations, otherwise nil. */) system keyboard shortcuts.
The return value is t if the call affected any key combinations,
otherwise nil. */)
(Lisp_Object key) (Lisp_Object key)
{ {
key = w32_parse_and_hook_hot_key (key, 1); key = w32_parse_and_hook_hot_key (key, 1);