Пример #1
0
def err_arr_num_string():
    test("Press button 0 or 1")
    arr_success = [
        pyspacemouse.ButtonCallback("1", call1),
        pyspacemouse.ButtonCallback("2", call2),
    ]
    dev = pyspacemouse.open(button_callback_arr=arr_success)
    while True:
        state = dev.read()
Пример #2
0
def success():
    test("Press button 0 or 1")
    arr_success = [
        pyspacemouse.ButtonCallback([0], call1),
        pyspacemouse.ButtonCallback([1], call2),
    ]
    dev = pyspacemouse.open(button_callback_arr=arr_success)
    while True:
        state = dev.read()
Пример #3
0
def err_obj_arr_string():
    test("Press button 0 or 1")
    arr_success = pyspacemouse.ButtonCallback(["1"], call1)

    dev = pyspacemouse.open(button_callback_arr=arr_success)
    while True:
        state = dev.read()