Exemplo n.º 1
0
def GUI_keyboard_click(*KEYBOARD_NAMES):
    frame = inspect.currentframe()
    _, _, _, values = inspect.getargvalues(frame)
    vals = [int(val) for val in values['KEYBOARD_NAMES']]
    last_clicked_value = max(vals)
    if last_clicked_value > 0:
        clicked_button = FLAT_KEYBOARD_KEYS[vals.index(max(vals))]
        system.xdotool_key(clicked_button)
    return u'clicked'
Exemplo n.º 2
0
def GUI_shortcuts_click(*SHORTCUT_NAMES):
    frame = inspect.currentframe()
    _, _, _, values = inspect.getargvalues(frame)
    vals = [int(val) for val in values['SHORTCUT_NAMES']]
    last_clicked_value = max(vals)
    if last_clicked_value > 0:
        clicked_button = SHORTCUTS[vals.index(max(vals))]
        system.xdotool_key(clicked_button[1])
    return u'clicked'
Exemplo n.º 3
0
def GUI_key_control(clicks, value):
    if clicks > 0:
        system.xdotool_key(value)
    return u'executed'
Exemplo n.º 4
0
def API_call_key():
    key = flask.request.args.get('key')
    system.xdotool_key(key)
    return jsonify({'message': 'key called', 'rc': 0})