Beispiel #1
0
def keytext_to_keyinfo_and_event (keytext):
    keyinfo = KeyPress.from_keydescr(keytext)
    if len(keytext) == 3 and keytext[0] == '"' and keytext[2] == '"':
        event = Event (keytext[1])
    else:
        event = Event (keyinfo.to_tuple() [3])
    return keyinfo, event
Beispiel #2
0
 def un_bind_exit_key(key):
     keyinfo = KeyPress.from_keydescr(key).tuple()
     if keyinfo in modes[mode].exit_dispatch:
         del modes[mode].exit_dispatch[keyinfo]