diff --git a/src/appkit/event/mod.rs b/src/appkit/event/mod.rs index 8dd8839..0119af1 100644 --- a/src/appkit/event/mod.rs +++ b/src/appkit/event/mod.rs @@ -184,6 +184,8 @@ pub enum EventModifierFlag { Control, Option, Command, + Numpad, + Help, Function, DeviceIndependentFlagsMask } @@ -196,6 +198,8 @@ impl From for NSUInteger { EventModifierFlag::Control => 1 << 18, EventModifierFlag::Option => 1 << 19, EventModifierFlag::Command => 1 << 20, + EventModifierFlag::Numpad => 1 << 21, + EventModifierFlag::Help => 1 << 22, EventModifierFlag::Function => 1 << 23, EventModifierFlag::DeviceIndependentFlagsMask => 0xffff0000 } @@ -210,6 +214,8 @@ impl From<&EventModifierFlag> for NSUInteger { EventModifierFlag::Control => 1 << 18, EventModifierFlag::Option => 1 << 19, EventModifierFlag::Command => 1 << 20, + EventModifierFlag::Numpad => 1 << 21, + EventModifierFlag::Help => 1 << 22, EventModifierFlag::Function => 1 << 23, EventModifierFlag::DeviceIndependentFlagsMask => 0xffff0000 } diff --git a/src/events.rs b/src/events.rs index d08afac..da2be19 100644 --- a/src/events.rs +++ b/src/events.rs @@ -21,6 +21,12 @@ pub enum EventModifierFlag { /// Command (CMD) is held. Command, + /// Nnumeric keypad or an arrow key has been pressed. + Numpad, + + /// The Help key has been pressed + Help, + /// Function (🌐) is held or a function key has been pressed. Function, @@ -36,6 +42,8 @@ impl From for NSUInteger { EventModifierFlag::Control => 1 << 18, EventModifierFlag::Option => 1 << 19, EventModifierFlag::Command => 1 << 20, + EventModifierFlag::Numpad => 1 << 21, + EventModifierFlag::Help => 1 << 22, EventModifierFlag::Function => 1 << 23, EventModifierFlag::DeviceIndependentFlagsMask => 0xffff0000 } @@ -50,6 +58,8 @@ impl From<&EventModifierFlag> for NSUInteger { EventModifierFlag::Control => 1 << 18, EventModifierFlag::Option => 1 << 19, EventModifierFlag::Command => 1 << 20, + EventModifierFlag::Numpad => 1 << 21, + EventModifierFlag::Help => 1 << 22, EventModifierFlag::Function => 1 << 23, EventModifierFlag::DeviceIndependentFlagsMask => 0xffff0000 }