Support a massively-enhanced SEND_STRING equivalent

This commit is contained in:
Josh Klar
2018-09-30 21:14:30 -07:00
parent 96b5c4ee03
commit 2c05efa805
4 changed files with 62 additions and 53 deletions

View File

@@ -513,11 +513,38 @@ ALL_KEYS = KC = AttrDict({
})
char_lookup = {
"\n": (Keycodes.Common.KC_ENTER,),
"\t": (Keycodes.Common.KC_TAB,),
' ': (Keycodes.Common.KC_SPACE,),
'-': (Keycodes.Common.KC_MINUS,),
'=': (Keycodes.Common.KC_EQUAL,),
'+': (Keycodes.Common.KC_EQUAL, Keycodes.Modifiers.KC_LSHIFT),
'~': (Keycodes.Common.KC_GRAVE,),
"\n": Common.KC_ENTER,
"\t": Common.KC_TAB,
' ': Common.KC_SPACE,
'-': Common.KC_MINUS,
'=': Common.KC_EQUAL,
'[': Common.KC_LBRACKET,
']': Common.KC_RBRACKET,
"\\": Common.KC_BACKSLASH,
';': Common.KC_SEMICOLON,
"'": Common.KC_QUOTE,
'`': Common.KC_GRAVE,
',': Common.KC_COMMA,
'.': Common.KC_DOT,
'~': ShiftedKeycodes.KC_TILDE,
'!': ShiftedKeycodes.KC_EXCLAIM,
'@': ShiftedKeycodes.KC_AT,
'#': ShiftedKeycodes.KC_HASH,
'$': ShiftedKeycodes.KC_DOLLAR,
'%': ShiftedKeycodes.KC_PERCENT,
'^': ShiftedKeycodes.KC_CIRCUMFLEX,
'&': ShiftedKeycodes.KC_AMPERSAND,
'*': ShiftedKeycodes.KC_ASTERISK,
'(': ShiftedKeycodes.KC_LEFT_PAREN,
')': ShiftedKeycodes.KC_RIGHT_PAREN,
'_': ShiftedKeycodes.KC_UNDERSCORE,
'+': ShiftedKeycodes.KC_PLUS,
'{': ShiftedKeycodes.KC_LEFT_CURLY_BRACE,
'}': ShiftedKeycodes.KC_RIGHT_CURLY_BRACE,
'|': ShiftedKeycodes.KC_PIPE,
':': ShiftedKeycodes.KC_COLON,
'"': ShiftedKeycodes.KC_DOUBLE_QUOTE,
'<': ShiftedKeycodes.KC_LEFT_ANGLE_BRACKET,
'>': ShiftedKeycodes.KC_RIGHT_ANGLE_BRACKET,
'?': ShiftedKeycodes.KC_QUESTION,
}