Add scancode and virtual key and fix some sdl stuff on Windows
This commit is contained in:
@@ -19,7 +19,7 @@ void EventState::Enter(Ndk::StateMachine& fsm)
|
||||
Nz::EventHandler& eventHandler = m_context.window.GetEventHandler();
|
||||
m_keyPressedSlot.Connect(eventHandler.OnKeyPressed, [&] (const Nz::EventHandler*, const Nz::WindowEvent::KeyEvent& key)
|
||||
{
|
||||
if (key.code == Nz::Keyboard::Key::M && key.shift)
|
||||
if (key.virtualKey == Nz::Keyboard::VKey::M && key.shift)
|
||||
{
|
||||
fsm.ChangeState(StateFactory::Get(EventStatus::Menu));
|
||||
}
|
||||
@@ -90,4 +90,4 @@ Nz::String EventState::ToString(const Nz::WindowEvent& event) const
|
||||
default:
|
||||
return "Not handled";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user