diff options
author | Martin Polden <mpolden@mpolden.no> | 2023-07-24 23:25:39 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2023-07-24 23:27:01 +0200 |
commit | 81a503f252061a638a7b722577f728b028bdbefb (patch) | |
tree | ed47eb1b3f361cdc0dbb023992308218a0ff8dfe /lisp | |
parent | bdca4f9b88d58cb21c940ab283ce6887e35123b7 (diff) |
mac: skip keyboard configuration when using mac port
Special config is unnecessary when using Mac port.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-mac.el | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lisp/init-mac.el b/lisp/init-mac.el index 1b44ed8..cbd1f81 100644 --- a/lisp/init-mac.el +++ b/lisp/init-mac.el @@ -2,20 +2,23 @@ ;;; Commentary: ;;; Code: -;; configure modifiers -(setq mac-option-modifier 'super) +;; use command as meta (setq mac-command-modifier 'meta) -(setq ns-function-modifier 'hyper) - -;; Norwegian mac-keyboard -(define-key key-translation-map (kbd "s-8") (kbd "[")) -(define-key key-translation-map (kbd "s-(") (kbd "{")) -(define-key key-translation-map (kbd "s-9") (kbd "]")) -(define-key key-translation-map (kbd "s-)") (kbd "}")) -(define-key key-translation-map (kbd "s-7") (kbd "|")) -(define-key key-translation-map (kbd "s-/") (kbd "\\")) -(define-key key-translation-map (kbd "M-s-7") (kbd "M-|")) -(define-key key-translation-map (kbd "s-ยจ") (kbd "~")) + +;; keyboard configuration when not using mac port +(unless (featurep 'mac) + ;; configure modifiers + (setq mac-option-modifier 'super) + (setq ns-function-modifier 'hyper) + + ;; Norwegian mac-keyboard + (define-key key-translation-map (kbd "s-8") (kbd "[")) + (define-key key-translation-map (kbd "s-(") (kbd "{")) + (define-key key-translation-map (kbd "s-9") (kbd "]")) + (define-key key-translation-map (kbd "s-)") (kbd "}")) + (define-key key-translation-map (kbd "s-7") (kbd "|")) + (define-key key-translation-map (kbd "s-/") (kbd "\\")) + (define-key key-translation-map (kbd "M-s-7") (kbd "M-|"))) ;; disable native tabs (setq mac-frame-tabbing nil) |