added 8 to scancode to match tkinter
This commit is contained in:
@@ -12,6 +12,7 @@ use pixels::{Error, Pixels, SurfaceTexture};
|
||||
use winit::dpi::LogicalSize;
|
||||
use winit::event::{Event, WindowEvent};
|
||||
use winit::event_loop::EventLoop;
|
||||
use winit::platform::modifier_supplement::KeyEventExtModifierSupplement;
|
||||
use winit::platform::scancode::PhysicalKeyExtScancode;
|
||||
use winit::window::Window;
|
||||
use winit_input_helper::WinitInputHelper;
|
||||
@@ -89,7 +90,7 @@ fn main() -> Result<(), Error> {
|
||||
match event.state {
|
||||
winit::event::ElementState::Pressed => {
|
||||
if let Some(val) = event.physical_key.to_scancode() {
|
||||
kbref.store(val, std::sync::atomic::Ordering::Relaxed);
|
||||
kbref.store(val + 8, std::sync::atomic::Ordering::Relaxed);
|
||||
}
|
||||
}
|
||||
winit::event::ElementState::Released => {
|
||||
|
||||
Reference in New Issue
Block a user