fix key codes

This commit is contained in:
Vadim Lopatin 2015-02-17 14:21:24 +03:00
parent cf4ba4a9a3
commit 7ed43feb7f
1 changed files with 5 additions and 2 deletions

View File

@ -1088,14 +1088,15 @@ uint parseKeyName(string name) {
case "Right": return KeyCode.RIGHT; case "Right": return KeyCode.RIGHT;
case "Up": return KeyCode.UP; case "Up": return KeyCode.UP;
case "Down": return KeyCode.DOWN; case "Down": return KeyCode.DOWN;
case "Ins": return KeyCode.DEL; case "Ins": return KeyCode.INS;
case "Del": return KeyCode.INS; case "Del": return KeyCode.DEL;
case "[": return KeyCode.KEY_BRACKETOPEN; case "[": return KeyCode.KEY_BRACKETOPEN;
case "]": return KeyCode.KEY_BRACKETCLOSE; case "]": return KeyCode.KEY_BRACKETCLOSE;
case ",": return KeyCode.KEY_COMMA; case ",": return KeyCode.KEY_COMMA;
case ".": return KeyCode.KEY_PERIOD; case ".": return KeyCode.KEY_PERIOD;
case "Backspace": return KeyCode.BACK; case "Backspace": return KeyCode.BACK;
case "Enter": return KeyCode.RETURN; case "Enter": return KeyCode.RETURN;
case "Space": return KeyCode.SPACE;
default: default:
return 0; return 0;
} }
@ -1260,6 +1261,8 @@ string keyName(uint keyCode) {
return "]"; return "]";
case KeyCode.BACK: case KeyCode.BACK:
return "Backspace"; return "Backspace";
case KeyCode.SPACE:
return "Space";
case KeyCode.RETURN: case KeyCode.RETURN:
return "Enter"; return "Enter";
default: default: