keybindings.json
file located in ~/.waveterm/config
. User-defined shortcuts declared in this file will override the default system keybindings.
command
(required): Contains the identifier of the command to execute. It is not advised to edit these commands as they are internal Wave commands. Please see the usage section for details on adding your own custom commands.keys
(required): An array of strings representing the keys pressed that trigger the command.commandStr
(optional): An array of strings that is executed when the specified keys are pressed. This field accepts Wave slash commands and shell commands.info
(optional): A human-readable description of the keybinding’s purpose or functionality.Option
key.
event.key
property.
event.key
for specific keys.1. Edit a default keybinding
2. Add key code support to a keybinding
{KeyZ}
keycode will ensure that The Z key is used for this keybinding, regardless of the user’s keyboard layout.3. Create a custom command
custom:
prefix, along with your command name, to add a custom command name.
.zshrc
config file for quick editing.
4. Create a custom command (with multiple commands)
keybindings.json
file.
Example
Cmd+b
keybinding to your custom command, you would need to:keybindings.json
file and assign it a different keybinding, such as Cmd+Shift+b
:keybindings.json
file for your custom command, assigning it the Cmd+b
keybinding that was previously occupied by the “Open Bookmarks View” command:Cmd+b
, it will execute your custom command. Also, the “Open Bookmarks View” command will still be available, but it will be triggered by the new keybinding Cmd+Shift+b
.Option + R
to start using your custom keybindings.
Note: Currently, Wave does not automatically pick up changes in the custom keybindings file. You need to reload the current Wave session as described above or by clicking the “View” tab in the menu bar and then clicking “Reload.”