osx: allow skipping `option` to `meta` key mapping
In Finnish/Swedish/other keyboard layouts the `option` key is needed to type some common characters such as `{[]}~` (#973) so make mapping it to `meta` conditional.
This commit is contained in:
parent
30173da11f
commit
641058823b
|
@ -36,6 +36,17 @@ To use this configuration layer, add it to your =~/.spacemacs=
|
|||
(setq-default dotspacemacs-configuration-layers '(osx))
|
||||
#+END_SRC
|
||||
|
||||
*** Use with non-US keyboard layouts
|
||||
|
||||
If you need the ~⌥~ key to type common characters such as `{[]}~` which is usual
|
||||
for e.g. Finnish and Swedish keyboard layouts, you'll probably want to leave the
|
||||
~⌥~ key unchanged by setting the =osx-use-option-as-meta= variable to =nil=:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq-default dotspacemacs-configuration-layers '(
|
||||
(osx :variables osx-use-option-as-meta nil)))
|
||||
#+END_SRC
|
||||
|
||||
** Coreutils
|
||||
|
||||
To get =gls= install coreutils homebrew:
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
(defvar osx-use-option-as-meta t
|
||||
"If non nil the option key is mapped to meta. Set to `nil` if you need the
|
||||
option key to type common characters.")
|
|
@ -3,11 +3,14 @@
|
|||
|
||||
;; this is only applicable to GUI mode
|
||||
(when (display-graphic-p)
|
||||
;; Treat option as meta and command as super
|
||||
(setq mac-option-key-is-meta t)
|
||||
;; Treat command as super
|
||||
(setq mac-command-key-is-meta nil)
|
||||
(setq mac-command-modifier 'super)
|
||||
(setq mac-option-modifier 'meta)
|
||||
|
||||
(when osx-use-option-as-meta
|
||||
;; Treat option as meta
|
||||
(setq mac-option-key-is-meta t)
|
||||
(setq mac-option-modifier 'meta))
|
||||
|
||||
;; Keybindings
|
||||
(global-set-key (kbd "s-=") 'spacemacs/scale-up-font)
|
||||
|
|
Loading…
Reference in New Issue