Esempio n. 1
0
def key_pressed(key):
    key = key.lower()
    print key
    if key == 'esc' or key == 'q':
        main.stop()

    if key == 'd':
        global decorated
        decorated = not decorated
        window.hide()
        window.set_decorated(decorated)
        window.show()
Esempio n. 2
0
def key_pressed(key):
    key = key.lower()
    print key
    if key == "esc" or key == "q":
        main.stop()

    if key == "d":
        global decorated
        decorated = not decorated
        window.hide()
        window.set_decorated(decorated)
        window.show()
Esempio n. 3
0
File: input.py Progetto: clones/kaa
def key_released(key, window_name):
    print 'Key Released: ', key, window_name
    if key in ('esc', 'q', 'Q'):
        main.stop()
    elif key in ('t','T'):
        if input_window.get_visible():
            input_window.hide()
        else:
            input_window.show()
    elif key in ('p', 'P'):
        if hasattr(input_window, 'proxy_for'):
            del input_window.proxy_for
        else:
            input_window.proxy_for = window
Esempio n. 4
0
def key_released(key, window_name):
    print 'Key Released: ', key, window_name
    if key in ('esc', 'q', 'Q'):
        main.stop()
    elif key in ('t', 'T'):
        if input_window.get_visible():
            input_window.hide()
        else:
            input_window.show()
    elif key in ('p', 'P'):
        if hasattr(input_window, 'proxy_for'):
            del input_window.proxy_for
        else:
            input_window.proxy_for = window
Esempio n. 5
0
File: shaped.py Progetto: clones/kaa
def key_pressed(key):
    key = key.lower()
    if key == 'esc' or key == 'q':
        main.stop()
    
    if key == 'd':
        global decorated
        decorated = not decorated
        window.hide()
        window.set_decorated(decorated)
        window.show()
    
    if key == 's':
        global shaped
        shaped = not shaped
        if shaped:
            window.set_shape_mask_from_imlib2_image(image, (0,0))
        else:
            window.reset_shape_mask()
Esempio n. 6
0
def key_pressed(key):
    key = key.lower()
    print key
    if key == 'esc' or key == 'q':
        main.stop()

    if key == 'd':
        global decorated
        decorated = not decorated
        window.hide()
        window.set_decorated(decorated)
        window.show()

    if key == 's':
        global shaped
        shaped = not shaped
        if shaped:
            window.set_shape_mask_from_imlib2_image(image, (0, 0))
        else:
            window.reset_shape_mask()