winit-sonoma-fix/examples
Markus Røyset 918430979f
Overhaul the Keyboard API
Overhaul the keyboard API in winit to mimic the W3C specification
to achieve better crossplatform parity. The `KeyboardInput` event
is now uses `KeyEvent` which consists of:

  - `physical_key` - a cross platform way to refer to scancodes;
  - `logical_key`  - keysym value, which shows your key respecting the
                     layout;
  - `text`         - the text produced by this keypress;
  - `location`     - the location of the key on the keyboard;
  - `repeat`       - whether the key was produced by the repeat.

And also a `platform_specific` field which encapsulates extra
information on desktop platforms, like key without modifiers
and text with all modifiers.

The `Modifiers` were also slightly reworked as in, the information
whether the left or right modifier is pressed is now also exposed
on platforms where it could be queried reliably. The support was
also added for the web and orbital platforms finishing the API
change.

This change made the `OptionAsAlt` API on macOS redundant thus it
was removed all together.

Co-authored-by: Artúr Kovács <kovacs.artur.barnabas@gmail.com>
Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
Co-authored-by: daxpedda <daxpedda@gmail.com>
Fixes: #2631.
Fixes: #2055.
Fixes: #2032.
Fixes: #1904.
Fixes: #1810.
Fixes: #1700.
Fixes: #1443.
Fixes: #1343.
Fixes: #1208.
Fixes: #1151.
Fixes: #812.
Fixes: #600.
Fixes: #361.
Fixes: #343.
2023-05-28 21:02:59 +03:00
..
child_window.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
control_flow.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
cursor.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
cursor_grab.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
custom_events.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
drag_window.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
fullscreen.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
handling_close.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
icon.png Window icons (#497) 2018-05-07 17:36:21 -04:00
ime.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
key_binding.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
monitor_list.rs Properly print outputs in monitor_list example 2023-01-30 14:17:41 +03:00
mouse_wheel.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
multithreaded.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
multiwindow.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
request_redraw.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
request_redraw_threaded.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
resizable.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
theme.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
timer.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
touchpad_gestures.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
transparent.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
video_modes.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
web.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
web_aspect_ratio.rs Use cfg aliases throught the code base 2022-12-25 10:57:27 +03:00
window.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
window_buttons.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
window_debug.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
window_drag_resize.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
window_icon.rs Run clippy on CI 2022-06-10 13:43:33 +03:00
window_resize_increments.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
window_run_return.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00