summaryrefslogtreecommitdiff
path: root/doc/emacs
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2019-11-25 18:54:20 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2019-11-27 11:14:55 +0100
commit215f678c7262db2ed353f2bf1e0a97c59a452605 (patch)
tree0efa6ea5136c9125fab217463f3deb8ed9c1db63 /doc/emacs
parentaa89c84e00d8dc85100e6fedab7631c415e6364d (diff)
downloademacs-215f678c7262db2ed353f2bf1e0a97c59a452605.tar.gz
emacs-215f678c7262db2ed353f2bf1e0a97c59a452605.tar.bz2
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/emacs')
-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.
Emacs provides a set of key bindings using this modifier key that mimic
other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You
can change these bindings in the usual way (@pxref{Key Bindings}).
-
-@vindex ns-alternate-modifier
-@vindex ns-right-alternate-modifier
- The variable @code{ns-right-alternate-modifier} controls the
-behavior of the right @key{Alt} and @key{Option} keys. These keys
-behave like the left-hand keys if the value is @code{left} (the
-default). A value of @code{control}, @code{meta}, @code{alt},
-@code{super}, or @code{hyper} makes them behave like the corresponding
-modifier keys; a value of @code{left} means be the same key as
-@code{ns-alternate-modifier}; a value of @code{none} tells Emacs to
-ignore them, in which case you get the default behavior of macOS
-accentuation system from the right @key{Option} key.
+The modifiers themselves can be customized;
+@pxref{Mac / GNUstep Customization}.
@kbd{S-mouse-1} adjusts the region to the click position,
just 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
keys and the fullscreen behavior. To see all such options, use
@kbd{M-x customize-group @key{RET} ns @key{RET}}.
+@subsection Modifier keys
+
+The following variables control the behaviour of the actual modifier
+keys:
+
+@table @code
+@vindex ns-alternate-modifier
+@vindex ns-right-alternate-modifier
+@item ns-alternate-modifier
+@itemx ns-right-alternate-modifier
+The left and right @key{Option} or @key{Alt} keys.
+
+@vindex ns-command-modifier
+@vindex ns-right-command-modifier
+@item ns-command-modifier
+@itemx ns-right-command-modifier
+The left and right @key{Command} keys.
+
+@vindex ns-control-modifier
+@vindex ns-right-control-modifier
+@item ns-control-modifier
+@itemx ns-right-control-modifier
+The left and right @key{Control} keys.
+
+@vindex ns-function-modifier
+@item ns-function-modifier
+The @key{Function} (fn) key.
+@end table
+
+The value of each variable is either a symbol, describing the key for
+any purpose, or a list of the form
+@code{(:ordinary @var{symbol} :function @var{symbol} :mouse @var{symbol})},
+which describes the modifier when used with ordinary keys, function keys
+(that do not produce a character, such as arrow keys), and mouse clicks.
+
+If the @var{symbol} is one of @code{control}, @code{meta}, @code{alt},
+@code{super} or @code{hyper}, this describes the Emacs modifier it
+represents. If @var{symbol} is @code{none}, Emacs does not use the
+key, which retains its standard behaviour. For instance, the
+@key{Option} key in macOS is then used for composing additional
+characters.
+
+The variables for right-hand keys, like @code{ns-right-alternate-modifier},
+may also be set to @code{left}, which means to use the same behaviour as
+the corresponding left-hand key.
+
@subsection Font Panel
@findex ns-popup-font-panel