internal void ProcessKeyboardEvent(KeyboardEvent e) { bool pressed = e.State != 0; var scancode = e.Keysym.Scancode; Key key = Sdl2KeyMap.GetKey(scancode); if (key != Key.Unknown) { state[key] = pressed; } }
internal void ProcessKeyboardEvent(KeyboardEvent e) { Key key; bool pressed = e.State != 0; var scancode = e.Keysym.Scancode; if (KeyMap.TryGetValue(scancode, out key)) { state.SetKeyState(key, (byte)scancode, pressed); keyboards[0].SetKey(key, (byte)scancode, pressed); } }
internal void ProcessKeyboardEvent(KeyboardEvent e) { bool pressed = e.State != 0; var scancode = e.Keysym.Scancode; Key key = Sdl2KeyMap.GetKey(scancode); if (key != Key.Unknown) { state[key] = pressed; } }
internal void ProcessKeyboardEvent(KeyboardEvent e) { Key key; bool pressed = e.State != 0; var scancode = e.Keysym.Scancode; if (KeyMap.TryGetValue(scancode, out key)) { state.SetKeyState(key, (byte)scancode, pressed); keyboards[0].SetKey(key, (byte)scancode, pressed); } }