[refactor] Breaking out key codes

Trying to start breaking apart the large circular dependencies between
modules. Most of the dependencies are similar to this pattern where
there is one stand-alone member that is needed, so the entire module
gets brought along with.
This commit is contained in:
Steven Evans
2018-07-18 12:50:31 -04:00
parent 1412b01be5
commit 0bea4e0430
4 changed files with 35 additions and 31 deletions
+30
View File
@@ -0,0 +1,30 @@
import { IMap } from "../../src/types";
/**
* Keyboard key codes
*/
export const KEY: IMap<number> = {
A: 65,
B: 66,
C: 67,
CTRL: 17,
D: 68,
DOWNARROW: 40,
E: 69,
ENTER: 13,
F: 70,
H: 72,
J: 74,
K: 75,
L: 76,
M: 77,
N: 78,
O: 79,
P: 80,
R: 82,
S: 83,
TAB: 9,
U: 85,
UPARROW: 38,
W: 87,
};