Skip to content

app,io/key: Add key code for key.Event#102

Closed
dennwc wants to merge 1 commit into
gioui:mainfrom
dennwc:key_codes
Closed

app,io/key: Add key code for key.Event#102
dennwc wants to merge 1 commit into
gioui:mainfrom
dennwc:key_codes

Conversation

@dennwc

@dennwc dennwc commented Sep 19, 2022

Copy link
Copy Markdown

Add non-portable key code to the key.Event type. This allows users to handle platform-specific key codes in the application code. Backends will now always generate input events, even for keys with no well-known names. Previously backends only generated events for keys they recognized.

Signed-off-by: Denys Smirnov dennwc@pm.me

Add non-portable key code to the key.Event type. This allows users to handle platform-specific key codes in the application code. Backends will now always generate input events, even for keys with no well-known names. Previously backends only generated events for keys they recognized.

Signed-off-by: Denys Smirnov <dennwc@pm.me>
@eliasnaur

Copy link
Copy Markdown
Contributor

AFAICT, this PR implements key.Events with empty Names for unknown/non-portable key presses. How do you propose a Gio program process these? Ideally, demonstrate with a test in the io/router package.

@inkeliz

inkeliz commented Sep 20, 2022

Copy link
Copy Markdown
Contributor

I think that change will also help me with gioui/gio-x#8, since gamepad inputs on Android seems to be sent as normal keypresses (far I remember). 🥳

@asciimoth

Copy link
Copy Markdown

Hi! I'm also interested in this feature, especially to handle hotkeys like Ctrl-C/Ctrl-V same way on different keyboard layouts (en/ru/etc).
May I know why this PR was closed? @dennwc
Also I'm ready to continue work on this feature myself if it lacks a maintainer.

@whereswaldon

Copy link
Copy Markdown
Member

I believe this PR was closed out of lack of interest by the original author, but I don't know for sure.

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.

5 participants