summaryrefslogtreecommitdiff
path: root/lisp/cus-start.el
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 /lisp/cus-start.el
parentaa89c84e00d8dc85100e6fedab7631c415e6364d (diff)
downloademacs-215f678c7262db2ed353f2bf1e0a97c59a452605.tar.gz
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 'lisp/cus-start.el')
-rw-r--r--lisp/cus-start.el97
1 files changed, 85 insertions, 12 deletions
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index e4b6d8f2d62..1c497ee5ae7 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -424,16 +424,23 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
;; msdos.c
(dos-unsupported-char-glyph display integer)
;; nsterm.m
- ;;
- ;; FIXME: Why does ⌃ use nil instead of none? Also the
- ;; description is confusing; setting it to nil disables ⌃
- ;; entirely.
(ns-control-modifier
ns
- (choice (const :tag "No modifier" nil)
+ (choice (const :tag "No modifier" none)
(const control) (const meta)
(const alt) (const hyper)
- (const super)) "23.1")
+ (const super)
+ (plist :key-type (choice (const :ordinary)
+ (const :function)
+ (const :mouse))
+ :value-type (choice (const control)
+ (const meta)
+ (const alt)
+ (const hyper)
+ (const super)
+ (const :tag "No modifier"
+ none))))
+ "23.1")
(ns-right-control-modifier
ns
(choice (const :tag "No modifier (work as control)" none)
@@ -441,13 +448,35 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
left)
(const control) (const meta)
(const alt) (const hyper)
- (const super)) "24.1")
+ (const super)
+ (plist :key-type (choice (const :ordinary)
+ (const :function)
+ (const :mouse))
+ :value-type (choice (const control)
+ (const meta)
+ (const alt)
+ (const hyper)
+ (const super)
+ (const :tag "No modifier"
+ none))))
+ "24.1")
(ns-command-modifier
ns
(choice (const :tag "No modifier (work as layout switch)" none)
(const control) (const meta)
(const alt) (const hyper)
- (const super)) "23.1")
+ (const super)
+ (plist :key-type (choice (const :ordinary)
+ (const :function)
+ (const :mouse))
+ :value-type (choice (const control)
+ (const meta)
+ (const alt)
+ (const hyper)
+ (const super)
+ (const :tag "No modifier"
+ none))))
+ "23.1")
(ns-right-command-modifier
ns
(choice (const :tag "No modifier (work as layout switch)" none)
@@ -455,13 +484,35 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
left)
(const control) (const meta)
(const alt) (const hyper)
- (const super)) "24.1")
+ (const super)
+ (plist :key-type (choice (const :ordinary)
+ (const :function)
+ (const :mouse))
+ :value-type (choice (const control)
+ (const meta)
+ (const alt)
+ (const hyper)
+ (const super)
+ (const :tag "No modifier"
+ none))))
+ "24.1")
(ns-alternate-modifier
ns
(choice (const :tag "No modifier (work as alternate/option)" none)
(const control) (const meta)
(const alt) (const hyper)
- (const super)) "23.1")
+ (const super)
+ (plist :key-type (choice (const :ordinary)
+ (const :function)
+ (const :mouse))
+ :value-type (choice (const control)
+ (const meta)
+ (const alt)
+ (const hyper)
+ (const super)
+ (const :tag "No modifier"
+ none))))
+ "23.1")
(ns-right-alternate-modifier
ns
(choice (const :tag "No modifier (work as alternate/option)" none)
@@ -469,13 +520,35 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
left)
(const control) (const meta)
(const alt) (const hyper)
- (const super)) "23.3")
+ (const super)
+ (plist :key-type (choice (const :ordinary)
+ (const :function)
+ (const :mouse))
+ :value-type (choice (const control)
+ (const meta)
+ (const alt)
+ (const hyper)
+ (const super)
+ (const :tag "No modifier"
+ none))))
+ "23.3")
(ns-function-modifier
ns
(choice (const :tag "No modifier (work as function)" none)
(const control) (const meta)
(const alt) (const hyper)
- (const super)) "23.1")
+ (const super)
+ (plist :key-type (choice (const :ordinary)
+ (const :function)
+ (const :mouse))
+ :value-type (choice (const control)
+ (const meta)
+ (const alt)
+ (const hyper)
+ (const super)
+ (const :tag "No modifier"
+ none))))
+ "23.1")
(ns-antialias-text ns boolean "23.1")
(ns-auto-hide-menu-bar ns boolean "24.1")
(ns-confirm-quit ns boolean "25.1")