winit-sonoma-fix/src/platform
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
..
android.rs Android: rework backend to use android-activity crate (#2444) 2022-11-10 17:55:19 +01:00
ios.rs Fix 1.68 clippy warnings 2023-03-12 20:02:49 +03:00
macos.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
mod.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
modifier_supplement.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
orbital.rs Redox OS support (#2588) 2023-01-05 06:58:08 -07:00
run_return.rs Split platform::unix into platform::x11 and platform::wayland 2022-09-01 08:05:32 +03:00
scancode.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
wayland.rs Update wayland-rs to 0.30.0 2023-04-19 00:56:29 +03:00
web.rs Split platform::unix into platform::x11 and platform::wayland 2022-09-01 08:05:32 +03:00
windows.rs Overhaul the Keyboard API 2023-05-28 21:02:59 +03:00
x11.rs On X11, fix errors bleeding from hooks handling them 2023-01-18 05:58:09 +03:00