Skip to content

AltGr/DeadKey + Space was broken - FIXED IN 1.20.10572.0Β #16641

Closed

Description

Windows Terminal version

1.20.10303.0

Windows build number

10.0.22635.3130

Other Software

WSL 2.1.1.0

Steps to reproduce

  1. Using FR bepo keyboard layout
  2. Typing AltGr + Space in a WSL tab

Expected Behavior

It should type an underscore, since AltGr + Space is the mapping for _ in FR bepo layout.

Actual Behavior

Rings the system bell. Worked fine in Terminal 1.18

Activity

  1. added
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Feb 1, 2024
  2. added
    Area-InputRelated to input processing (key presses, mouse, etc.)
    Area-VTVirtual Terminal sequence support
    and removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Feb 1, 2024
  3. j4james commented on Feb 1, 2024

    @j4james
    Collaborator

    Yeah, sorry. That's almost certainly a result of PR #16511. We're treating Space as a "functional" key, which means it gets hardcoded VT mappings which take precedence over the keyboard layout. It's not modal, though, so it's possible it could be handled as a regular "graphic" key. However, I have a sneaking suspicion that could break another keyboard layout, and that's why I put it with "functional" keys in the first place. But that may have been an old issue that was resolved in one of my many rewrites. I'll need to do some testing to double check.

  4. j4james commented on Feb 1, 2024

    @j4james
    Collaborator

    Unfortunately it's not a simple fix. The reason I chose to handle it as a "functional" key was because the mapping for Ctrl+Space on a number of keyboard layouts is just SP, while it's expected by VT applications to be NUL. This includes the US layout. So if we handle it as a "graphic" key, that's going to break.

    Not that that's impossible to fix, but it's likely to be messy.

  5. changed the title [-]AltGr + Space not working in WSL with fr-bepo keyboard layout[/-] [+]AltGr + Space / Deadkey + Space does not work correctly[/+] on Feb 1, 2024
  6. ilharp commented on Feb 2, 2024

    @ilharp

    All my keypad keys don't work in v1.20, including Enter. I would like to ask if this bug is the same as this issue?

    image

  7. juliencombattelli commented on Feb 2, 2024

    @juliencombattelli

    Hello, I just noticed Windows Terminal Preview has the experimental profile option experimental.connection.passthroughMode that fixes those dead-keys and numpad-keys issues when set to true (at least on my side). But it is causing other strange behaviors with the arrow keys and CTRL-C as far as I can tell...

  8. mveroone commented on Feb 2, 2024

    @mveroone

    All my keypad keys don't work in v1.20, including Enter. I would like to ask if this bug is the same as this issue?

    image

    Hi.
    Same issue this morning and I think it's related to Zsh.
    I've fixed it this way : https://superuser.com/a/742193/239282

  9. j4james commented on Feb 2, 2024

    @j4james
    Collaborator

    Yeah, if you're using zsh, I believe it sets the terminfo smkx capability, which enables Keypad Application Mode, and that's what makes the keypad keys generate unique escape sequences. Previous versions of Windows Terminal didn't support that mode, which is why you wouldn't have noticed before. It's not related to this Deadkey+Space issue.

    Other than manually rebinding the keys, as Maxime VΓ©roone (@mveroone) suggested, another way you might work around the issue is by patching the zle-line-init function to disable the Keypad Application Mode after they've enabled it. Something like this might do the trick:

    functions -c zle-line-init zle-line-init-orig
    zle-line-init () { zle-line-init-orig; echo -en "\e>" }
    

    I know almost nothing about zsh, though, so I have no idea what other issues that might cause, but in my brief testing it seemed to work.

    I also noticed that ohmyzsh has an open PR to ditch their smkx usage (ohmyzsh/ohmyzsh#5113), and that should theoretically fix the problem, but that PR is now 8 years old, so it doesn't look like it's happening anytime soon.

  10. added a commit that references this issue on Feb 6, 2024
    ec91be5
  11. SchizoDuckie commented on Feb 21, 2024

    @SchizoDuckie

    Did this stuff get released yet? I feel like a damned idiot every time a switch to a terminal!
    [edit]
    Nevermind, I was apparently running the Preview build still.
    Guess It's time to switch back to the stable build. That solves the issue for me.

  12. added a commit that references this issue on Feb 21, 2024
    f13ba96
  13. changed the title [-]AltGr + Space / Deadkey + Space does not work correctly[/-] [+]AltGr + Space / Deadkey + Space does not work correctly - FIXED IN 1.20.10572.0[/+] on Mar 25, 2024
  14. changed the title [-]AltGr + Space / Deadkey + Space does not work correctly - FIXED IN 1.20.10572.0[/-] [+]AltGr/DeadKey + Space was broken - FIXED IN 1.20.10572.0[/+] on Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-InputRelated to input processing (key presses, mouse, etc.)Area-VTVirtual Terminal sequence supportIn-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions