Skip to content

Instantly share code, notes, and snippets.

@kristianhellquist
Created February 8, 2012 19:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kristianhellquist/1772649 to your computer and use it in GitHub Desktop.
Save kristianhellquist/1772649 to your computer and use it in GitHub Desktop.
Easier typing in Aquamacs for a swedish keybord
(defun mac-osx-editing-insert-at ()
"Insert @ at point"
(interactive)
(insert-char ?@ 1))
(defun mac-osx-editing-insert-curly-left ()
"Insert { at point"
(interactive)
(insert-char ?{ 1))
(defun mac-osx-editing-insert-curly-right ()
"Insert } at point"
(interactive)
(insert-char ?} 1))
(defun mac-osx-editing-insert-bracket-left ()
"Insert [ at point"
(interactive)
(insert-char ?[ 1))
(defun mac-osx-editing-insert-bracket-right ()
"Insert ] at point"
(interactive)
(insert-char ?] 1))
(defun mac-osx-editing-insert-dollar ()
"Insert $ at point"
(interactive)
(insert-char ?$ 1))
(defun mac-osx-editing-insert-pipe ()
"Insert | at point"
(interactive)
(insert-char ?| 1))
(defun mac-osx-editing-insert-back-slash ()
"Insert \ at point"
(interactive)
(insert-char ?\\ 1))
(global-set-key (kbd "M-2") 'mac-osx-editing-insert-at)
(global-set-key (kbd "M-4") 'mac-osx-editing-insert-dollar)
(global-set-key (kbd "M-7") 'mac-osx-editing-insert-pipe)
(global-set-key (kbd "M-/") 'mac-osx-editing-insert-back-slash)
(global-set-key (kbd "M-8") 'mac-osx-editing-insert-bracket-left)
(global-set-key (kbd "M-9") 'mac-osx-editing-insert-bracket-right)
(global-set-key (kbd "M-(") 'mac-osx-editing-insert-curly-left)
(global-set-key (kbd "M-)") 'mac-osx-editing-insert-curly-right)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment