Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtualKeyCode::Pause not recognized when Ctrl is held down, on Windows 8.1 #930

Closed
Boscop opened this issue Aug 31, 2017 · 5 comments
Closed

Comments

@Boscop
Copy link

Boscop commented Aug 31, 2017

When I press Pause, it looks like this:

KeyboardInput { scancode: 69, state: Pressed, virtual_keycode: Some(Pause), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } }

When I press Ctrl, then Pause, then release Pause, then release Ctrl, it looks like this:

KeyboardInput { scancode: 29, state: Pressed,  virtual_keycode: Some(RControl), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } }
KeyboardInput { scancode: 70, state: Pressed,  virtual_keycode: None, modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } }
KeyboardInput { scancode: 70, state: Released, virtual_keycode: None, modifiers: ModifiersState { shift: false, ctrl: true, alt: false,logo: false } }
KeyboardInput { scancode: 29, state: Released, virtual_keycode: Some(RControl), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } }

As you can see, when Ctrl is held down, Pause has a different scancode (70 instead of 69), so it doesn't recognize it as VirtualKeyCode::Pause, but it should.

@Boscop
Copy link
Author

Boscop commented Sep 21, 2017

Weird, I also get scancode 70 when I press Ctrl + Scroll.

@tomaka
Copy link
Contributor

tomaka commented Sep 21, 2017

Maybe fixed in winit by rust-windowing/winit#274

@Boscop
Copy link
Author

Boscop commented Mar 28, 2018

Didn't that one only affect linux code (not Windows 8.1)?

@francesca64
Copy link
Member

Yes, but you should still report this issue to winit instead.

@Boscop
Copy link
Author

Boscop commented May 16, 2018

Ok, here: rust-windowing/winit#524

@Boscop Boscop closed this as completed May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants