Created
October 25, 2012 12:57
-
-
Save Crenshinibon/3952406 to your computer and use it in GitHub Desktop.
Right hand key class and sample keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum keyCodes { | |
KC__ = 0, | |
KC_ErrorRollOver, | |
KC_POSTfail, | |
KC_ErrorUndefined, | |
// ... | |
KC_N, | |
KC_O, | |
KC_P, | |
// ... | |
} | |
enum keyType {MODIFIER, NORMAL, EXTMOD, NOFUNCTION, MOUSE}; | |
struct Key { | |
byte keyCode; | |
uint8_t keyType; | |
boolean pressed; | |
uint8_t bounceKey; | |
Key(byte kc, uint8_t kt) : keyCode(kc), keyType(kt), pressed(false), bounceKey(NOT_BOUNCING) {}; | |
}; | |
Key * const NOKEY = new Key(0x00,NOFUNCTION); | |
Key * const LMOUSE = new Key(0x02,MOUSE); | |
Key * const RMOUSE = new Key(0x01,MOUSE); | |
Key * const L = new Key(KC_L,NORMAL); | |
Key * const X = new Key(KC_X,NORMAL); | |
Key * const C = new Key(KC_C,NORMAL); | |
//... | |
Key * const J = new Key(KC_J,NORMAL); | |
Key * const SPACE = new Key(KC_SPACEBAR,NORMAL); | |
Key * const M2R = new Key(0x02,MODIFIER); | |
Key * const M2L = new Key(0x20,MODIFIER); | |
//... | |
Key * const ALTR = new Key(0x04,MODIFIER); | |
Key * const ALTL = new Key(0x40,MODIFIER); | |
Key * const M3 = new Key(0x01,EXTMOD); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment