|
|
|
@ -8,7 +8,7 @@ from socket import timeout as TimeoutError
@@ -8,7 +8,7 @@ from socket import timeout as TimeoutError
|
|
|
|
|
import libevdev |
|
|
|
|
|
|
|
|
|
from .codes import codes, types |
|
|
|
|
from .common import get_monitor, remap, wacom_max_x, wacom_max_y, log_event |
|
|
|
|
from .common import get_monitor, remap, wacom_max_x, wacom_max_y, log_event, the_cooler_remap, cool_monitor_mapping |
|
|
|
|
|
|
|
|
|
logging.basicConfig(format='%(message)s') |
|
|
|
|
log = logging.getLogger('remouse') |
|
|
|
@ -118,9 +118,15 @@ def read_tablet(rm_inputs, *, orientation, monitor_num, region, threshold, mode)
@@ -118,9 +118,15 @@ def read_tablet(rm_inputs, *, orientation, monitor_num, region, threshold, mode)
|
|
|
|
|
if codes[e_type][e_code] == 'ABS_Y': |
|
|
|
|
y = e_value |
|
|
|
|
|
|
|
|
|
if mode == 'cool': |
|
|
|
|
mapx, mapy = the_cooler_remap(x, y, monitor) |
|
|
|
|
mapped_x, mapped_y = cool_monitor_mapping(mapx, mapy, monitor, tot_width, tot_height) |
|
|
|
|
else: |
|
|
|
|
mapped_x, mapped_y = remap( |
|
|
|
|
x, y, |
|
|
|
|
wacom_max_x, wacom_max_y, |
|
|
|
|
# 20k something | presumably 3840 | 7680 15k something, |
|
|
|
|
# -> 10k something presumably 15k something |
|
|
|
|
wacom_max_x * (monitor.width / tot_width), wacom_max_y * (monitor.height / tot_height), |
|
|
|
|
mode, orientation |
|
|
|
|
) |
|
|
|
|