Skip to content

Make keyboard input event order consistent#173

Merged
tomaka merged 1 commit intorust-windowing:masterfrom
jwilm:consistent-event-order-key-char
May 8, 2017
Merged

Make keyboard input event order consistent#173
tomaka merged 1 commit intorust-windowing:masterfrom
jwilm:consistent-event-order-key-char

Conversation

@jwilm
Copy link
Copy Markdown
Contributor

@jwilm jwilm commented May 8, 2017

All platforms should now receive events in the following order:

  1. KeyboardInput(ElementState::Pressed, ..)
  2. ReceivedCharacter
  3. KeyboardInput(ElementState::Released, ..)

cc rust-windowing/glutin#878

All platforms should now receive events in the following order:

1. KeyboardInput(ElementState::Pressed, ..)
2. ReceivedCharacter
3. KeyboardInput(ElementState::Released, ..)

cc rust-windowing/glutin#878
@jwilm
Copy link
Copy Markdown
Contributor Author

jwilm commented May 8, 2017

This updates X11 and Cocoa event orderings to match Win32. I don't have the means to test Wayland so I did not look into it.

@tomaka
Copy link
Copy Markdown
Contributor

tomaka commented May 8, 2017

Thanks

@tomaka tomaka merged commit 8f9f235 into rust-windowing:master May 8, 2017
@jwilm jwilm deleted the consistent-event-order-key-char branch May 8, 2017 15:38
@elinorbgr
Copy link
Copy Markdown
Contributor

FTR, Wayland was already following this order, see https://github.com/tomaka/winit/blob/master/src/platform/linux/wayland/keyboard.rs#L41-L64

@jwilm
Copy link
Copy Markdown
Contributor Author

jwilm commented May 10, 2017

Thanks for the follow-up @vberger. With that, I think we can safely say all desktop platforms follow the same keyboard input event ordering.

@tomaka How do you feel about advertising this guarantee in the docs?

@tomaka
Copy link
Copy Markdown
Contributor

tomaka commented May 11, 2017

I'm still unsure if this is the right API or not, but I guess why not.

@pyfisch pyfisch mentioned this pull request Jun 22, 2017
6 tasks
tmfink pushed a commit to tmfink/winit that referenced this pull request Jan 5, 2022
Start adding tests for scalar::F32x4
madsmtm pushed a commit to madsmtm/winit that referenced this pull request Jun 11, 2022
* Update to gtk v0.14

* fix: rust-windowing#167 - Change dependency from libappindicator to libayatana-appindicator (rust-windowing#168)

* feat(tray): Changed to libayatana-appindicator-rs.

* Update CI script

Co-authored-by: Ngo Iok Ui <wusyong9104@gmail.com>

* Update libappindicator crate

* Update ci script

* Add change file

Co-authored-by: Lewin Probst, M.Sc <30552361+emirror-de@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants