microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.95k stars 8.35k forks source link

Keybind to suppress all keybinds #18067

Open ra-jain opened 1 month ago

ra-jain commented 1 month ago

Description of the new feature/enhancement

We have a lot of programs like vim or others which could have keybinds that map to the same which is in terminal the keyboard is kind of limited for all the possible keybinds to not be used when running this command

Proposed technical implementation details (optional)

In general we could have a keybind that maps to one key combination when pressed would disable all keybinds and when task is done we can come back

PriyanshSrivastava0305 commented 1 month ago

I think i could take a look at it. Can I ? @ra-jain

ra-jain commented 1 month ago

Please do

PriyanshSrivastava0305 commented 1 month ago

Please do

on it.

zadjii-msft commented 1 month ago

Hmm. I can't seem to find this on the backlog, so kudos. It's a little like #5790, but instead of just a different keymap, you want to just skip all keys.

It's pretty trivial to add an action, so that should be easy. And it should be easy enough to add a flag inside TermControl / ControlCore to have it skip keybindings.

The trick I'd have here is: does activating this action skip the next key, or all keybinds till this action is triggered again? And if it's the latter, then how would the Terminal ever know to re-activate keybindings, if you can't press a keybinding to reactivate it?

But the former (just skip keybindings for the next key), that seems trivial to implement.

carlos-zamora commented 1 month ago

Thanks for filing. Could you provide a little more information about your scenario? Which vim are you using (in WSL? VIM for windows?) Is it one particular keybinding? /?

ra-jain commented 1 month ago

I had some situations with neovim on windows and my cutom keybinds like ctrl + O. It is not any particular keybinding but this could be a general improvement against all programs. Please let me know if you have any thoughts.