fixed incorrect mod handling

This commit is contained in:
Jonathan Spira 2025-01-19 12:25:47 -05:00
parent 2707fd84b7
commit 763b34eaa2

View File

@ -157,10 +157,11 @@ pub enum Key {
MouseX2 = sys::ImGuiKey_MouseX2, MouseX2 = sys::ImGuiKey_MouseX2,
MouseWheelX = sys::ImGuiKey_MouseWheelX, MouseWheelX = sys::ImGuiKey_MouseWheelX,
MouseWheelY = sys::ImGuiKey_MouseWheelY, MouseWheelY = sys::ImGuiKey_MouseWheelY,
ReservedForModCtrl = sys::ImGuiKey_ReservedForModCtrl,
ReservedForModShift = sys::ImGuiKey_ReservedForModShift, ModCtrl = sys::ImGuiMod_Ctrl,
ReservedForModAlt = sys::ImGuiKey_ReservedForModAlt, ModShift = sys::ImGuiMod_Shift,
ReservedForModSuper = sys::ImGuiKey_ReservedForModSuper, ModAlt = sys::ImGuiMod_Alt,
ModSuper = sys::ImGuiMod_Super,
} }
impl Key { impl Key {
@ -316,10 +317,10 @@ impl Key {
Key::MouseX2, Key::MouseX2,
Key::MouseWheelX, Key::MouseWheelX,
Key::MouseWheelY, Key::MouseWheelY,
Key::ReservedForModCtrl, Key::ModCtrl,
Key::ReservedForModShift, Key::ModShift,
Key::ReservedForModAlt, Key::ModAlt,
Key::ReservedForModSuper, Key::ModSuper,
]; ];
/// Total count of `Key` variants /// Total count of `Key` variants
pub const COUNT: usize = sys::ImGuiKey_NamedKey_COUNT as usize; pub const COUNT: usize = sys::ImGuiKey_NamedKey_COUNT as usize;