Beispiel #1
0
def press_key(keyString):
    isUpper = keyString.isupper()
    isSpecial = keyString in specialBindings

    if isSpecial:
        keyString = str(specialBindings[keyString])

    if isSpecial or isUpper:
        key_down(16)
            
    key_down(char2keycode(keyString.lower()))
    key_up(char2keycode(keyString.lower()))
            
    if isSpecial or isUpper:
        key_up(16)
Beispiel #2
0
def _handle_char(c, keys, shift):
    if shift:
        keys.append((MODIFIERS['+'], True))
    _append_code(keys, char2keycode(c))
    if shift:
        keys.append((MODIFIERS['+'], False))
Beispiel #3
0
def _handle_char(c,keys,shift):
    if shift:
        keys.append((MODIFIERS['+'],True))
    _append_code(keys, char2keycode(c))
    if shift:
        keys.append((MODIFIERS['+'],False))
Beispiel #4
0
def _handle_char(c, keys, shift):
    if shift:
        keys.append((MODIFIERS['+'], True))
    _append_code(keys, char2keycode(bytes(c, encoding='ascii')))
    if shift:
        keys.append((MODIFIERS['+'], False))