Skip to content

Instantly share code, notes, and snippets.

@kaz-yos
Created December 5, 2015 12:24
Show Gist options
  • Save kaz-yos/97be380b1dc4ecf732c0 to your computer and use it in GitHub Desktop.
Save kaz-yos/97be380b1dc4ecf732c0 to your computer and use it in GitHub Desktop.
init.el: MacのキーボードでMetaAltSuperHyper ref: http://qiita.com/kaz-yos/items/4cdb603fc8b54ee1ff73
;;; Mac-only configuration to use command and options keys
(when (eq system-type 'darwin)
;; Mac-only
;; Command key as Meta key, Option key untouched
;; http://www.emacswiki.org/emacs/MetaKeyProblems#toc15
;; http://ergoemacs.org/emacs/emacs_hyper_super_keys.html
;;
;; left command
(setq mac-command-modifier 'meta)
;; left option
(setq mac-option-modifier 'alt)
;;
;; right command
(setq mac-right-command-modifier 'super)
;; right option
(setq mac-right-option-modifier 'hyper)
;;
;; Mac Binding modifier keys
;; http://www.emacswiki.org/emacs/EmacsForMacOS#toc23
;; mac-function-modifier
;; mac-control-modifier
;; mac-command-modifier
;; mac-option-modifier
;; mac-right-command-modifier
;; mac-right-control-modifier
;; mac-right-option-modifier
;; values can be 'control (C), 'alt (A), 'meta (M), 'super (s), or 'hyper (H).
;; setting to nil allows the OS to assign values
)
(global-set-key (kbd "s-g") 'magit-status)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment