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;
            }
        }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
        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;
            }
        }
Exemple #4
0
        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);
            }
        }