Example #1
0
        internal static Key ConvertGlfwKey(GlfwKey key)
        {
            if (_glfwKeyMap.TryGetValue(key, out var result))
            {
                return(result);
            }

            return(Key.Unknown);
        }
Example #2
0
 private void OnGlfwKey(Window *window, Keys key, int scanCode, InputAction action, KeyModifiers mods)
 {
     try
     {
         EmitKeyEvent(Keyboard.ConvertGlfwKey(key), action, mods);
     }
     catch (Exception e)
     {
         CatchCallbackException(e);
     }
 }