Skip to content

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

Merged
aymanbagabas merged 1 commit intomainfrom
windows/respect-altgr
Feb 6, 2025
Merged

fix: windows: AltGr maps to LEFT_CTRL+RIGHT_ALT#1162
aymanbagabas merged 1 commit intomainfrom
windows/respect-altgr

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
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
@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