-
Notifications
You must be signed in to change notification settings - Fork 151
Shortcuts Hotkeys
Jonathan Gertig edited this page Jul 16, 2017
·
1 revision
You can define keyboard shortcuts. They have to be grouped by os. The three available are
win
, darwin
, and linux
. You can group multiple os by a ,
for example if the
shortcut was for all platforms win,darwin,linux
would be fine as a key
<Terminal
shortcuts={{
'darwin,win,linux': {
'ctrl + a': 'echo whoo',
},
}}
/>
But you might want to specific
<Terminal
shortcuts={{
'win': {
'ctrl + a': 'echo hi windows',
},
'darwin': {
'cmd + a': 'echo hi mac'
},
'linux': {
'ctrl + a': 'echo hi linux'
}
}}
/>
You can mix and match
<Terminal
shortcuts={{
'win,linux': {
'ctrl + b': 'echo we are special',
},
'win': {
'ctrl + a': 'echo hi windows',
},
'darwin': {
'cmd + a': 'echo hi mac'
},
'linux': {
'ctrl + a': 'echo hi linux'
}
}}
/>
The value of the shortcut should be a command to run.