Exemple #1
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 #2
0
 private static Key TranslateKey(Scancode scan)
 {
     return(Sdl2KeyMap.GetKey(scan));
 }