Feature: Ability to disable SOME dead keys.
Motivation
It might be hard to understand for people who have sensible layouts, but many keyboard layouts have dead keys that are very cumbersome when programming.
I personally use the terminal on the daily, and the tilde ~ is used a lot in Linux. On my AZERTY default layout, ~ acts as a dead key: i need to type it then add a space to get a single ~. See the layout below
![]()
~ needs ALTGR + 2 + space. This is exhausting. We also have a dead ^ that could use this feature.
Notes
Do people also want that
For the user, It could be as simple a config value to disable dead keys using their key codes (?) such as
disable_dead_keys: [50] # the 2/~ key code
Thanks a lot for you time, the Terminal is absolutely amazing and it just keeps getting better ! Cheers
This doesn't seem entirely unreasonable to me. We might want to workshop how we specify these keys in json, but I think the idea sounds valid. I'm gonna summon our keyboard layout expert @lhecker to see if he's got any thoughts on the matter 鈽猴笍
(sorry for the long silence)
Thanks a lot for looking into this !
I had the idea of adding a command called "passthrough" to the keybindings.
If you e.g. add a { "command": "passthrough", "keys": "~" }, binding it would then pass the key event (with the character ~) to the shell instead of deferring the event to the character event handler.
In order to support this I'd modify IKeyBindings::TryKeyChord to return a ternary instead of a boolean.
What do you think?
Ah! I forgot about this issue! While it's slightly cumbersome I believe this functionality can now be achieved in the v1.3 preview version using the new sendInput command.
If that's sufficient for you @gpotter2 would you like to try it out in the preview version?
It's working great ! The only issue now is that there is no way to register AltGR in the current key binders :/
The current key bninding interface doesn't make a distinction between left and right Ctrl/Alt.
We'll have to extend that interface and teach it to do so first. It'll also require adding logic to make it parse e.g. "LeftCtrl"/"RrightCtrl" and teach it that "Ctrl" is an alias for the presence of either of those keys. Only then can we alias "AltGr" as "RightAlt+LeftCtrl". Unfortunately that's clearly another feature that needs to implemented unrelated to both sendInput and this issue. 馃
Actually, there's an issue: it seems the dead key are not consumed (which is the whole point of this issue), even if made a shortcut.
For instance on my AZERTY keyboard, there's a ^ that is a dead key. If i use:
{ "command": { "action": "sendInput", "input": "b" }, "keys": "^" }
If i then press once the ^ key (which is a dead key) then a, I'll get:
b芒
I'll investigate this. 馃憤
Thanks a lot for your work on this !!!
鉂わ笍
:tada:This issue was addressed in #7686, which has now been successfully released as Windows Terminal v1.4.3141.0.:tada:
Handy links:
:tada:Windows Terminal v1.4.3141.0 has been released which incorporates this pull request.:tada:
Handy links:
:tada:This issue was addressed in #7686, which has now been successfully released as Windows Terminal Preview v1.5.3142.0.:tada:
Handy links:
:tada:Windows Terminal Preview v1.5.3142.0 has been released which incorporates this pull request.:tada:
Handy links:
Most helpful comment
:tada:
Windows Terminal Preview v1.5.3142.0has been released which incorporates this pull request.:tada:Handy links: