Exemplo n.º 1
0
        /// <summary>If XNA is being used, we need to do quite a bit of logic to make sure that the correct characters are output.</summary>
        private static void KeyDownHandler(Keys key)
        {
            switch (key)
            {
            case Keys.LeftShift:
            case Keys.RightShift:
                KeyboardResolver.Shift = true;
                KeyboardResolver.Alt   = true;
                break;

            case Keys.CapsLock:
                KeyboardResolver.Caps = true;
                KeyboardResolver.Alt  = true;
                break;
            }

            KeyboardResolver.CharReceived?.Invoke(KeyboardResolver.ResolveChar(key));
        }
Exemplo n.º 2
0
 private static void KeyHeldHandler(Keys key)
 {
     KeyboardResolver.CharReceived?.Invoke(KeyboardResolver.ResolveChar(key));
 }