Beispiel #1
0
        private static void ProcessKeyEvent(Sdl2NativeWindow window, Event ev)
        {
            bool key_pressed = ev.Key.State == State.Pressed;
            Key  key         = TranslateKey(ev.Key.Keysym.Scancode);

            if (key_pressed)
            {
                window.OnKeyDown(key, ev.Key.Repeat > 0);
            }
            else
            {
                window.OnKeyUp(key);
            }
        }
 static void ProcessKeyEvent(Sdl2NativeWindow window, Event ev)
 {
     bool key_pressed = ev.Key.State == State.Pressed;
     Key key = TranslateKey(ev.Key.Keysym.Scancode);
     if (key_pressed)
     {
         window.OnKeyDown(key, ev.Key.Repeat > 0);
     }
     else
     {
         window.OnKeyUp(key);
     }
 }