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

fix: windows: AltGr maps to LEFT_CTRL+RIGHT_ALT #1162

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

aymanbagabas
Copy link
Member

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

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
@@ -334,7 +338,7 @@ func keyType(e coninput.KeyEventRecord) KeyType {
case '\x1a':
return KeyCtrlZ
case '\x1b':
return KeyCtrlCloseBracket
return KeyCtrlOpenBracket // KeyEscape
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the // KeyEscape?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're the same value both are \x1b

@aymanbagabas aymanbagabas merged commit c66daf9 into main Feb 6, 2025
30 checks passed
@aymanbagabas aymanbagabas deleted the windows/respect-altgr branch February 6, 2025 15:23
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.

"Alt Gr" + ] generate "esc" instead "]" on french keyboard on Windows.
3 participants