~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
a month ago
Updated
a month ago
Labels
No labels applied.

~eliasnaur a month ago

On Mon Sep 30, 2019 at 12:09 PM ktye wrote:

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.

-- elias

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