@@ -191,10 +191,10 @@ impl WinitPlatform {
191191 // We need to track modifiers separately because some system like macOS, will
192192 // not reliably send modifier states during certain events like ScreenCapture.
193193 // Gotta let the people show off their pretty imgui widgets!
194- io. add_key_event ( Key :: ModShift , state. shift_key ( ) ) ;
195- io. add_key_event ( Key :: ModCtrl , state. control_key ( ) ) ;
196- io. add_key_event ( Key :: ModAlt , state. alt_key ( ) ) ;
197- io. add_key_event ( Key :: ModSuper , state. super_key ( ) ) ;
194+ io. add_key_event ( Key :: LeftShift , state. shift_key ( ) ) ;
195+ io. add_key_event ( Key :: LeftCtrl , state. control_key ( ) ) ;
196+ io. add_key_event ( Key :: LeftAlt , state. alt_key ( ) ) ;
197+ io. add_key_event ( Key :: LeftSuper , state. super_key ( ) ) ;
198198 }
199199 WindowEvent :: KeyboardInput { ref event, .. } => {
200200 if event. state . is_pressed ( ) {
@@ -506,10 +506,10 @@ fn to_imgui_key(key: winit::keyboard::Key, location: KeyLocation) -> Option<Key>
506506
507507fn handle_key_modifier ( io : & mut Io , key : & WinitKey , down : bool ) {
508508 match key {
509- WinitKey :: Named ( NamedKey :: Shift ) => io. add_key_event ( imgui:: Key :: ModShift , down) ,
510- WinitKey :: Named ( NamedKey :: Control ) => io. add_key_event ( imgui:: Key :: ModCtrl , down) ,
511- WinitKey :: Named ( NamedKey :: Alt ) => io. add_key_event ( imgui:: Key :: ModAlt , down) ,
512- WinitKey :: Named ( NamedKey :: Super ) => io. add_key_event ( imgui:: Key :: ModSuper , down) ,
509+ WinitKey :: Named ( NamedKey :: Shift ) => io. add_key_event ( imgui:: Key :: LeftShift , down) ,
510+ WinitKey :: Named ( NamedKey :: Control ) => io. add_key_event ( imgui:: Key :: LeftCtrl , down) ,
511+ WinitKey :: Named ( NamedKey :: Alt ) => io. add_key_event ( imgui:: Key :: LeftAlt , down) ,
512+ WinitKey :: Named ( NamedKey :: Super ) => io. add_key_event ( imgui:: Key :: LeftSuper , down) ,
513513 _ => { }
514514 }
515515}
0 commit comments