예제 #1
0
파일: Input.py 프로젝트: Orchaldir/Pyro
def on_key_down(key):
    global keys_down_action
    
    if key in keys_down_action:
        action_id = keys_down_action[key]
        action = get_function(action_id)
        if action is not None:
            print 'down : ' + str(key) + ' -> ' + action_id
            action()
예제 #2
0
파일: Input.py 프로젝트: Orchaldir/Pyro
def on_key_up(key):
    global keys_up_action, keys_up
    
    keys_up.append(key)
    
    if key in keys_up_action:
        action_id = keys_up_action[key]
        action = get_function(action_id)
        if action is not None:
            print 'up : ' + str(key) + ' -> ' + action_id
            action()