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()
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()
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
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
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()
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()