|
|
@ -72,6 +72,22 @@ def create_master(name: str = "touch"): |
|
|
|
return completed.returncode |
|
|
|
|
|
|
|
|
|
|
|
def get_xi_id_by_name(name): |
|
|
|
"""find device id from name |
|
|
|
|
|
|
|
Args: |
|
|
|
name (str): name of the device |
|
|
|
""" |
|
|
|
completed = subprocess.run( |
|
|
|
["xinput list --id-only", name], capture_output=True |
|
|
|
) |
|
|
|
|
|
|
|
if completed.returncode == 1: |
|
|
|
return -1 |
|
|
|
else: |
|
|
|
int(completed.stdout.decode(ENCODING)) |
|
|
|
|
|
|
|
|
|
|
|
def map_to_output(output, device_id): |
|
|
|
# TODO |
|
|
|
pass |
|
|
|