~eliasnaur/gio#39: 
key.Event does not fire for symbol keys on windows

Testing on windows, a key.Event is only fired for 0-9a-Z and the special motion keys, but not for ;[]_+ etc

os_windows.go:/^func convertKeyCode/ filters the event.

Should it propagate all keys, or do we have to use a key.EditEvent instead?

Status
REPORTED
Submitter
ktye
Assigned to
No-one
Submitted
1 year, 5 months ago
Updated
15 days ago
Labels
No labels applied.

~eliasnaur 1 year, 5 months ago*

Testing on windows, a key.Event is only fired for 0-9a-Z and the special motion keys, but not for ;[]_+ etc

os_windows.go:/^func convertKeyCode/ filters the event.

Should it propagate all keys, or do we have to use a key.EditEvent instead?

key.Event is for physical keys intended for shortcuts (Ctrl-C, Cmd-P etc.), while key.EditEvent is for text input. I made the split to cover soft keyboards and assistive text input.

That said, if you need access to more physical keys (e.g. for Ctrl-[), go ahead and add them to convertKeyCode.

~vsariola 15 days ago

Just to confirm: is it cool to add stuff just for Windows? I'd want to e.g. add Insert key and make numpad work: it's completely silent for me NumLock on. Can I just pick some reasonable names for them?

~eliasnaur 15 days ago

On Mon Feb 15, 2021 at 06:59, ~vsariola wrote:

Just to confirm: is it cool to add stuff just for Windows? I'd want to e.g. add Insert key and make numpad work: it's completely silent for me NumLock on. Can I just pick some reasonable names for them?

Sure. I believe the existing names are from xkb; if so, please match the new names with xkb as well.

Register here or Log in to comment, or comment via email.