Reputation: 131
In Atom, I installed the sort-lines package, and the default hotkey to sort alphabetically is F5. However, when I hit F5, it just triggers my native OS X keyboard illumination.
Upvotes: 1
Views: 213
Reputation: 56508
If you prefer, you could re-bind this key to something other than a function key. Open your config folder from Atom's preferences and add a binding to keymap.cson. Something like this (pick whatever key you prefer).
'atom-text-editor:not([mini])':
'alt-s': 'sort-lines:sort'
You can read more about keymaps in the Atom Flight Manual.
Pressing the key marked F5 on a Mac keyboard will, by default, only trigger the native function of that key (which varies depending which specific keyboard you're using). For instance, for you it is one of the keyboard backlight keys. Other function keys control volume, screen brightness, and iTunes playback.
If you don't want to re-bind the Atom key as described above, you can solve this in either of two ways.
Hold the Fn (typically at the lower left corner) and then press F5. This will trigger the actual F5 function key.
If you prefer the function keys to be on permanently, you can turn them on as the default. This will invert the normal behavior; The function key will be the normal keypress, and the special behavior (volume, play, mute, etc) will require holding the Fn key.
As described in Apple's support page:
If you prefer the top row of keys to always behave as standard function keys without holding the Fn key:
- Choose System Preferences from the Apple menu.
- Click Keyboard.
- Click the Keyboard tab if it's not already highlighted.
- Select "Use all F1, F2, etc. keys as standard function keys"
With this option enabled, the keys on the top row act as standard function keys (F1–F12). To use a feature indicated by the icon printed on a key, hold Fn while pressing the key.
It's a little different on the newer TouchBar laptops. Here, the function keys are normally not displayed, and pop into existence on TouchBar when you press the Fn key.
For an external keyboard on a TouchBar laptop, just use the process shown above. For the built-in keyboard, you will have to use the Fn key. I see no way to force the function keys to always display on TouchBar.
Upvotes: 2