Binding function keys in keymap


Is thee a way to bind function keys (e.g. F5, F3, F1) to commands in Atom? Would love to be able to replicate the default ‘Sort lines’ mapping to F5 that I used in Sublime Text 3.


First, make sure you have the Sort Lines package installed, then you can add this to your keymap.cson file:

  'f5': 'sort-lines:sort'


Thanks. That worked brilliantly.