I've been using Sublime Text for a little while now (on MacBook Pro), and want to make it keystroke compatible with the shell.
In the shell, to jump to the beginning/end of line I press fn+Left/fn+Right.
In Sublime Text, I understand how to set up key bindings for fn+Left/fn+Right, but I see no key name for the fn key (not the f1, f2, etc. function keys, I am referring to the key marked "fn").
How can I make this work in Sublime Text?
I guess I was making it too hard on myself.
- the fn button does not have a key name in Sublime Text.
- fn+Left/fn+Right is read as Home/End. Simply mapping Home and End did the job.
Specifically:
Sublime Text | Preferences | Key Bindings - User
Add the following between the [ ]:
{ "keys": ["home"], "command": "move_to", "args": { "to": "hardbol" } },
{ "keys": ["end"], "command": "move_to", "args": { "to": "hardeol" } }
I discovered this by opening up the SublimeText console:
ctrl+`
sublime.log_input(True)
Now, typing any keys reveal their Sublime Text key names. fn did not elicit a response, but fn+Left/fn+Right yielded Home/End.
sublime.log_input(False)
Hope that helps.
For me(on MBP):
cmd and left worked as Home
cmd and Right worked as End
Without changing any configuration in Preferences.