Remap keys


Hi. Just changed from Emacs to Atom. I am using a danish keyboard on a mac, where [] are on Alt-8 and Alt-9 and {} on Shift-Alt-8 and Shift-Alt-9. In Emacs I mapped the æø and ÆØ keys to {} and [] for easier access, but I can’t figure out how to do this in Atom (keeping the normal functionality of the character).



What have you tried?


I have tried snippets.cson, but then I have to type TAB to expand it.

I have tried keymap.cson, but could not get it working.

I have been using Emacs and programmed Emacs-Lisp for +30 years. There must be a way to do it :slight_smile:

Do you have any ideas?


You can make a command in

atom.commands.add 'atom-text-editor', 'custom:insert-lower-dipthong', ->

Add that to a keybinding and make three more of them and you should be golden.


Thanks, you really made my day :wink:

Changed your code in

atom.commands.add 'atom-text-editor', 'custom:insert-curly-left', ->

atom.commands.add 'atom-text-editor', 'custom:insert-sharp-left', ->

I added this in keycap.cson

  'æ': 'custom:insert-curly-left'
  'Æ': 'custom:insert-sharp-left'

Now works like I wanted !

Remap some keys

Yes, what I said except the other way around. :slight_smile:


Now my only problem is when I (rarely) have to type the æ character. In Emacs I could just Ctrl-q-æ.

But having the { key as just one stroke is far better than Alt-Shift-( where you have to use three fingers :wink:

I hope others with language specific keyboards find this solution.

Thanks again.