@@ -191,10 +191,10 @@ impl WinitPlatform {
191
191
// We need to track modifiers separately because some system like macOS, will
192
192
// not reliably send modifier states during certain events like ScreenCapture.
193
193
// 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 ( ) ) ;
198
198
}
199
199
WindowEvent :: KeyboardInput { ref event, .. } => {
200
200
if event. state . is_pressed ( ) {
@@ -506,10 +506,10 @@ fn to_imgui_key(key: winit::keyboard::Key, location: KeyLocation) -> Option<Key>
506
506
507
507
fn handle_key_modifier ( io : & mut Io , key : & WinitKey , down : bool ) {
508
508
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) ,
513
513
_ => { }
514
514
}
515
515
}
0 commit comments