I'm using the new Windows Terminal app and trying to change the full-screen toggle from F11 to Shift-F11. I know how to add Shift-F11, but I can't seem to figure out how to remove F11. I could change the "defaults.json" file, but the changes would be lost every time the app updates.
3 Answers
In your settings.json
file, you can unset key bindings by creating a command whose action is null
. You can also overwrite defaults.
In your case, try using this config:
//settings.json
...
"keybindings":
[
...
{ "command": "toggleFullscreen", "keys": "shift+f11" },
{ "command": null, "keys": "f11" }
]
From Using Editing Windows Terminal JSON Settings:
{ "command" : null, "keys" : ["ctrl+shift+6"] },
This will unbind Ctrl+Shift+6, allowing vim to use the keystroke instead of the terminal.
And:
Any changes in that profile will overwrite those from the defaults.
-
1In place of null, use unbound in double quotes like "unbound" in new terminal Nov 23, 2020 at 14:10
Since Windows Terminal v1.4 the "keybindings"
key has been deprecated in favour of "actions"
. Customize actions in Windows Terminal
Both null
and "unbound"
commands will work.
"actions":
[
{ "command": "unbound", "keys": "f11" }
]
(the only way it worked for me)
you can add
{ "command": { "action": "sendInput", "input": "\u0000" }, "keys": "ctrl+shift+up" },
{ "command": { "action": "sendInput", "input": "\u0000" }, "keys": "ctrl+shift+down" },
so when you press the keys, it replaces the undesirable command with sending a null character to the input (that, of course, does nothing lol)