From 00e39c8cb7ba448e3bdfb398103004b2988e86f3 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 1 Dec 2024 23:34:18 +0100 Subject: [PATCH] macOS: Fix missing codes in physicalkey_to_scancode This had become out of sync with scancode_to_physicalkey --- src/platform_impl/apple/appkit/event.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platform_impl/apple/appkit/event.rs b/src/platform_impl/apple/appkit/event.rs index ab6a4edddf..2353995581 100644 --- a/src/platform_impl/apple/appkit/event.rs +++ b/src/platform_impl/apple/appkit/event.rs @@ -423,11 +423,13 @@ pub(crate) fn physicalkey_to_scancode(physical_key: PhysicalKey) -> Option KeyCode::SuperRight => Some(0x36), KeyCode::SuperLeft => Some(0x37), KeyCode::ShiftLeft => Some(0x38), + KeyCode::CapsLock => Some(0x39), KeyCode::AltLeft => Some(0x3a), KeyCode::ControlLeft => Some(0x3b), KeyCode::ShiftRight => Some(0x3c), KeyCode::AltRight => Some(0x3d), KeyCode::ControlRight => Some(0x3e), + KeyCode::Fn => Some(0x3f), KeyCode::F17 => Some(0x40), KeyCode::NumpadDecimal => Some(0x41), KeyCode::NumpadMultiply => Some(0x43),