Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not filter Ctrl+Alt in non-rune cases #749

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

masmu
Copy link

@masmu masmu commented Sep 30, 2024

Hello, I am currently trying to add additional keybindings in fzf/pull/3996 and in that process I noticed that there is a bug in tcell where Ctrl + Alt modifiers are not set correctly under windows.

Ctrl + Alt seems to be the same as AltGr and AltGr usually switches the keyboard layout to level 3. But this is not true for keys combos like:

  • Ctrl + Alt in conjunction with Up, Down, Left, Right, Home, End, Backspace, Delete, PageUp, PageDown.
  • or mouse clicks.

How to reproduce:

  • First you might need to disable the windows hotkey bindings. (I used method 2, group policy editor)
  • Press Ctrl + Alt + Up
  • Expected key event: Ctrl + Alt + Up
    Actual key event: Up (no mods)

The mods Ctrl and Alt are being filtered out by commit 96e2990.

Ctrl+Alt seems to be the same as AltGr and AltGr usually switches the keyboard layout to level 3.
This is not true for keys combos like:
Ctrl + Alt +
  [Up, Down, Left, Right, Home, End, PageUp, PageDown, Delete, Backspace]
or mouse clicks.
@gdamore
Copy link
Owner

gdamore commented Oct 6, 2024

So I confess I'm not sure about this. I can see that for some things like your Ctrl-Alt-Up situation, you might prefer to get keystrokes like that.

I'm not sure how this should happen with other keystrokes though. I need to research a bit more I guess.

@masmu
Copy link
Author

masmu commented Oct 7, 2024

No worries and thank you for looking into this!

I tested that the level 3 behavior remains as it was before for normal keys. Mouse clicks were also affected by that mentioned commit and now got their mods back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants