From 1609808e274b444505fe32737ea08d7142b3c2e9 Mon Sep 17 00:00:00 2001 From: Michael Schumacher Date: Thu, 25 Jan 2018 13:32:30 +0100 Subject: [PATCH] Add support for Caret (^) Key in OSX (de_DE) (#380) * Add caret key * Use hex value * Added caret key support. --- CHANGELOG.md | 1 + src/events.rs | 2 ++ src/platform/macos/events_loop.rs | 1 + 3 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b7282bc..c27ec1b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Added method `os::macos::WindowBuilderExt::with_movable_by_window_background(bool)` that allows to move a window without a titlebar - `with_decorations(false)` - Implement `Window::set_fullscreen`, `Window::set_maximized` and `Window::set_decorations` for Wayland. +- Added `Caret` as VirtualKeyCode and support OSX ^-Key with german input. # Version 0.10.0 (2017-12-27) diff --git a/src/events.rs b/src/events.rs index 2947db17..7aa1d726 100644 --- a/src/events.rs +++ b/src/events.rs @@ -344,6 +344,8 @@ pub enum VirtualKeyCode { /// The "Compose" key on Linux. Compose, + Caret, + Numlock, Numpad0, Numpad1, diff --git a/src/platform/macos/events_loop.rs b/src/platform/macos/events_loop.rs index dc3df4fd..1d822dc1 100644 --- a/src/platform/macos/events_loop.rs +++ b/src/platform/macos/events_loop.rs @@ -746,6 +746,7 @@ fn to_virtual_key_code(code: u16) -> Option { 0x7e => events::VirtualKeyCode::Up, //0x7f => unkown, + 0xa => events::VirtualKeyCode::Caret, _ => return None, }) }