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

"Alt Gr" + ] generate "esc" instead "]" on french keyboard on Windows. #1126

Open
hypolas opened this issue Aug 31, 2024 · 0 comments · May be fixed by #1162
Open

"Alt Gr" + ] generate "esc" instead "]" on french keyboard on Windows. #1126

hypolas opened this issue Aug 31, 2024 · 0 comments · May be fixed by #1162
Assignees
Labels
bug Something isn't working

Comments

@hypolas
Copy link

hypolas commented Aug 31, 2024

Describe the bug
I use french keyboard. When I try to type this caracter "]", in french keyboard I need to do "Alt Gr" + ].
But in input bubbletea this keys generate "esc" instead "]".
I had tried with full new Windows 11 installation but the problem is same. No problem in Linux.

Setup
Please complete the following information along with version numbers, if applicable.

  • OS: Windows 11
  • cmd

To Reproduce
Steps to reproduce the behavior:
Run this code:
https://github.com/charmbracelet/bubbletea/blob/main/examples/textinput/main.go
And try to do a "]" in input.

Source Code
https://github.com/charmbracelet/bubbletea/blob/main/examples/textinput/main.go

Screenshots
1442547_pastedImage_0

aymanbagabas added a commit that referenced this issue Sep 19, 2024
On Windows, some keyboard layouts have an AltGr button that's similar to
the Mac options button and can be used to send characters.
This PR respects the AltGr button and treat its characters as bubbletea
key runes.

Fixes: #1126
@aymanbagabas aymanbagabas added the bug Something isn't working label Sep 19, 2024
@aymanbagabas aymanbagabas self-assigned this Sep 19, 2024
@aymanbagabas aymanbagabas linked a pull request Sep 19, 2024 that will close this issue
aymanbagabas added a commit that referenced this issue Sep 19, 2024
On Windows, some keyboard layouts have an AltGr button that's similar to
the Mac options button and can be used to send characters.
This PR respects the AltGr button and treat its characters as bubbletea
key runes.

Fixes: #1126
aymanbagabas added a commit that referenced this issue Sep 20, 2024
This fixes a bunch of issues on Windows bringing improvements and
reliability to the implementation. It replacing the existing key events
hack with a key state that keeps track of previous key events to parse
the incoming ANSI escape sequences. It also decodes unicode utf16 pairs
at the parser level instead of the driver level.

Related: #1126
aymanbagabas added a commit that referenced this issue Sep 20, 2024
This fixes a bunch of issues on Windows bringing improvements and
reliability to the implementation. It replacing the existing key events
hack with a key state that keeps track of previous key events to parse
the incoming ANSI escape sequences. It also decodes unicode utf16 pairs
at the parser level instead of the driver level.

Related: #1126
aymanbagabas added a commit that referenced this issue Sep 20, 2024
This fixes a bunch of issues on Windows bringing improvements and
reliability to the implementation. It replacing the existing key events
hack with a key state that keeps track of previous key events to parse
the incoming ANSI escape sequences. It also decodes unicode utf16 pairs
at the parser level instead of the driver level.

Related: #1126
aymanbagabas added a commit that referenced this issue Oct 11, 2024
This fixes a bunch of issues on Windows bringing improvements and
reliability to the implementation. It replacing the existing key events
hack with a key state that keeps track of previous key events to parse
the incoming ANSI escape sequences. It also decodes unicode utf16 pairs
at the parser level instead of the driver level.

Related: #1126
aymanbagabas added a commit that referenced this issue Oct 14, 2024
This fixes a bunch of issues on Windows bringing improvements and
reliability to the implementation. It replacing the existing key events
hack with a key state that keeps track of previous key events to parse
the incoming ANSI escape sequences. It also decodes unicode utf16 pairs
at the parser level instead of the driver level.

Related: #1126
aymanbagabas added a commit that referenced this issue Oct 15, 2024
This fixes a bunch of issues on Windows bringing improvements and
reliability to the implementation. It replacing the existing key events
hack with a key state that keeps track of previous key events to parse
the incoming ANSI escape sequences. It also decodes unicode utf16 pairs
at the parser level instead of the driver level.

Related: #1126
aymanbagabas added a commit that referenced this issue Oct 16, 2024
This fixes a bunch of issues on Windows bringing improvements and
reliability to the implementation. It replacing the existing key events
hack with a key state that keeps track of previous key events to parse
the incoming ANSI escape sequences. It also decodes unicode utf16 pairs
at the parser level instead of the driver level.

Related: #1126
aymanbagabas added a commit that referenced this issue Oct 16, 2024
…1163)

This fixes a bunch of issues on Windows bringing improvements and
reliability to the implementation. It replaces the existing key events
hack with a key state that keeps track of previous key events to parse
the incoming ANSI escape sequences. It also decodes unicode utf16 pairs
at the parser level instead of the driver level.

Related: #1126

TODO:
- [x] Windows API tests
  - [x] Key events
  - [x] Mouse events
  - [x] Resize events
  - [x] Focus events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants