aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMattias EngdegÄrd2019-11-25 18:54:20 +0100
committerMattias EngdegÄrd2019-11-27 11:14:55 +0100
commit215f678c7262db2ed353f2bf1e0a97c59a452605 (patch)
tree0efa6ea5136c9125fab217463f3deb8ed9c1db63 /doc
parentaa89c84e00d8dc85100e6fedab7631c415e6364d (diff)
downloademacs-215f678c7262db2ed353f2bf1e0a97c59a452605.tar.gz
emacs-215f678c7262db2ed353f2bf1e0a97c59a452605.zip
Fine-grained NS modifier key settings (bug#38296)
For the ns-KEY-modifier and ns-right-KEY-modifier variables, KEY being 'control', 'command', 'alternate' and 'function', allow values on the form (:ordinary SYMBOL :function :SYMBOL :mouse SYMBOL), so that the key can be used for different modifiers (or none) in different contexts. This is particularly useful for using the macOS Option key for extended character entry while still using it as an Emacs modifier for function keys and mouse clicks. * src/nsterm.m (mod_of_kind, right_mod, nil_or_none): Helper functions. (EV_MODIFIERS2): Add KIND argument. (EV_MODIFIERS): Adapt call to EV_MODIFIERS2. (ns_get_shifted_character): Use correct event kind for modifiers. (ns-alternate-modifier, ns-right-alternate-modifier) (ns-command-modifier, ns-right-command-modifier) (ns-control-modifier, ns-right-control-modifier) (ns-function-modifier): Rewrite doc strings for new data format. (QCordinary, QCfunction, QCmouse): Define symbols. * lisp/cus-start.el: Conform to new data types. * doc/emacs/macos.texi (Mac / GNUstep Basics) (Mac / GNUstep Customization): Improved documentation. * etc/NEWS: Mention the change.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/macos.texi60
1 files changed, 48 insertions, 12 deletions
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index d9920957ad7..87484f00e40 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -48,18 +48,8 @@ Support}), but we hope to improve it in the future.
48Emacs provides a set of key bindings using this modifier key that mimic 48Emacs provides a set of key bindings using this modifier key that mimic
49other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You 49other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You
50can change these bindings in the usual way (@pxref{Key Bindings}). 50can change these bindings in the usual way (@pxref{Key Bindings}).
51 51The modifiers themselves can be customized;
52@vindex ns-alternate-modifier 52@pxref{Mac / GNUstep Customization}.
53@vindex ns-right-alternate-modifier
54 The variable @code{ns-right-alternate-modifier} controls the
55behavior of the right @key{Alt} and @key{Option} keys. These keys
56behave like the left-hand keys if the value is @code{left} (the
57default). A value of @code{control}, @code{meta}, @code{alt},
58@code{super}, or @code{hyper} makes them behave like the corresponding
59modifier keys; a value of @code{left} means be the same key as
60@code{ns-alternate-modifier}; a value of @code{none} tells Emacs to
61ignore them, in which case you get the default behavior of macOS
62accentuation system from the right @key{Option} key.
63 53
64 @kbd{S-mouse-1} adjusts the region to the click position, 54 @kbd{S-mouse-1} adjusts the region to the click position,
65just like @kbd{mouse-3} (@code{mouse-save-then-kill}); it does not pop 55just like @kbd{mouse-3} (@code{mouse-save-then-kill}); it does not pop
@@ -107,6 +97,52 @@ Nextstep port. For example, they affect things such as the modifier
107keys and the fullscreen behavior. To see all such options, use 97keys and the fullscreen behavior. To see all such options, use
108@kbd{M-x customize-group @key{RET} ns @key{RET}}. 98@kbd{M-x customize-group @key{RET} ns @key{RET}}.
109 99
100@subsection Modifier keys
101
102The following variables control the behaviour of the actual modifier
103keys:
104
105@table @code
106@vindex ns-alternate-modifier
107@vindex ns-right-alternate-modifier
108@item ns-alternate-modifier
109@itemx ns-right-alternate-modifier
110The left and right @key{Option} or @key{Alt} keys.
111
112@vindex ns-command-modifier
113@vindex ns-right-command-modifier
114@item ns-command-modifier
115@itemx ns-right-command-modifier
116The left and right @key{Command} keys.
117
118@vindex ns-control-modifier
119@vindex ns-right-control-modifier
120@item ns-control-modifier
121@itemx ns-right-control-modifier
122The left and right @key{Control} keys.
123
124@vindex ns-function-modifier
125@item ns-function-modifier
126The @key{Function} (fn) key.
127@end table
128
129The value of each variable is either a symbol, describing the key for
130any purpose, or a list of the form
131@code{(:ordinary @var{symbol} :function @var{symbol} :mouse @var{symbol})},
132which describes the modifier when used with ordinary keys, function keys
133(that do not produce a character, such as arrow keys), and mouse clicks.
134
135If the @var{symbol} is one of @code{control}, @code{meta}, @code{alt},
136@code{super} or @code{hyper}, this describes the Emacs modifier it
137represents. If @var{symbol} is @code{none}, Emacs does not use the
138key, which retains its standard behaviour. For instance, the
139@key{Option} key in macOS is then used for composing additional
140characters.
141
142The variables for right-hand keys, like @code{ns-right-alternate-modifier},
143may also be set to @code{left}, which means to use the same behaviour as
144the corresponding left-hand key.
145
110@subsection Font Panel 146@subsection Font Panel
111 147
112@findex ns-popup-font-panel 148@findex ns-popup-font-panel