Exemplo n.º 1
0
 public unsafe void Subscribe(GlfwEvents events)
 {
     _handle      = events.Handle;
     events.Char += _char = (_, c) => KeyChar?.Invoke(this, (char)c);
     events.Key  += _key = (_, key, code, action, mods) =>
                           (action switch
     {
         InputAction.Press => KeyDown,
         InputAction.Release => KeyUp,
         InputAction.Repeat => null,
         _ => null
     })?.Invoke(this, ConvertKey(key), code);
Exemplo n.º 2
0
 public static extern IntPtr SetKeyCallback(Window window, GlfwCallbacks.KeyCallback callback);