Esempio n. 1
0
        public string GetKeyName(Keyboard.Key key)
        {
            var name = Keyboard.GetSpecialKeyName(key);

            if (name != null)
            {
                return(Loc.GetString(name));
            }

            name = GLFW.GetKeyName(Keyboard.ConvertGlfwKeyReverse(key), 0);
            if (name != null)
            {
                return(name.ToUpper());
            }

            return(Loc.GetString("<unknown key>"));
        }
Esempio n. 2
0
 public string GetKeyNameScanCode(int scanCode)
 {
     return(GLFW.GetKeyName(Keys.Unknown, scanCode));
 }