forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-osx-keys.el
25 lines (22 loc) · 964 Bytes
/
init-osx-keys.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
;;; init-osx-keys.el --- Configure keys specific to MacOS -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(when *is-a-mac*
(setq mac-command-modifier 'meta)
(setq mac-option-modifier 'none)
;; Make mouse wheel / trackpad scrolling less jerky
(setq mouse-wheel-scroll-amount '(1
((shift) . 5)
((control))))
(dolist (multiple '("" "double-" "triple-"))
(dolist (direction '("right" "left"))
(global-set-key (read-kbd-macro (concat "<" multiple "wheel-" direction ">")) 'ignore)))
(global-set-key (kbd "M-`") 'ns-next-frame)
(global-set-key (kbd "M-h") 'ns-do-hide-emacs)
(global-set-key (kbd "M-˙") 'ns-do-hide-others)
(with-eval-after-load 'nxml-mode
(define-key nxml-mode-map (kbd "M-h") nil))
(global-set-key (kbd "M-ˍ") 'ns-do-hide-others) ;; what describe-key reports for cmd-option-h
)
(provide 'init-osx-keys)
;;; init-osx-keys.el ends here