Repository navigation
Description
Description of the new feature/enhancement
There should be a way to allow "passthrough" of keybindings to the terminal session - for example, the keybinding Ctrl+Shift+↓ is used in Terminal to resize a pane, but it's also used by the Linux terminal multiplexer BYOBU to resize panes.
I envision something like a command in the palette to disable Terminal keybindings and allow then to pass through to the terminal itself. This command would automatically disable "focus mode" (since there'd be no way to exit focus mode again) and would be a toggle.
I searched around in existing open/closed tickets as well as the documentation to see if something like this already exists, and as far as I can tell it doesn't. #5790 is somewhat related, in that it could be a "workaround" for this feature.
Proposed technical implementation details (optional)
I imagine it'd be a fairly simple matter to have an early exit in the keybind handling code to check if this mode is enable, and if so act as if there are no keybindings.
Activity
zadjii-msft commentedon Mar 1, 2021
You could try just disabling the keybindings that you don't want the terminal to use. I'm imagining that if you're using
byobu, then you probably aren't using the panes in the Terminal. You could just unbind those specific keys:{ "command": "unbound", "keys": "ctrl+shift+down" }, { "command": "unbound", "keys": "ctrl+shift+up" },wait hold up
Resizing panes should be on Ctrl+Shift+{arrow}:
{ "command": { "action": "resizePane", "direction": "down" }, "keys": "alt+shift+down" }, { "command": { "action": "resizePane", "direction": "left" }, "keys": "alt+shift+left" }, { "command": { "action": "resizePane", "direction": "right" }, "keys": "alt+shift+right" }, { "command": { "action": "resizePane", "direction": "up" }, "keys": "alt+shift+up" },Disabling all keybindings seems like a pretty big hammer for this scenario
Sidneys1 commentedon Mar 1, 2021
Hmm, then perhaps the solution is more in the issue I linked which would allow profiles to override keybindings. I use byobu on some WSL and SSH connections, but definitely not on all of my profiles. I use Terminal panes in some profiles. And regardless of whether my keybindings is default doesn't change that for some people the terminal keybindings are going to intersect with some client application keybindings at some point. Perhaps my approach is heavy-handed, but that doesn't mean the problem isn't valid.
ptr727 commentedon Mar 22, 2021
Such a feature will also help with Midnight Commander.
Either per profile setting, or a toggle, toggle passthrough on/off.
zadjii-msft commentedon Mar 23, 2021
Crazy thought that's going to sound like half a thought:
I've toyed around in my head with having different
keymaps in the past, and letting the user just set theirkeymapto one of a pre-defined set, then apply keybindings on top of thatkeymap. So what if there was just a keymap with no keys defined, and then an action for "setKeymap" or something, that would let you hot-swap between keymaps. But then you'd need two keybindings - one forsetKeymap(keymap=empty), and another forsetKeymap(keymap=default).See also #2205
zadjii-msft commentedon Apr 15, 2024
From #17055: