diff --git a/configs/sidewinder-rel.py b/configs/sidewinder-rel.py index d81f148..3e47174 100644 --- a/configs/sidewinder-rel.py +++ b/configs/sidewinder-rel.py @@ -1,4 +1,4 @@ -from cinput import * +from uinputmapper.cinput import * """ Configuration for a simple Microsoft SideWinter Game Pad Pro USB version 1.0 diff --git a/configs/sidewinder.py b/configs/sidewinder.py index 307cc4e..6a5bd0c 100644 --- a/configs/sidewinder.py +++ b/configs/sidewinder.py @@ -1,4 +1,4 @@ -from cinput import * +from uinputmapper.cinput import * """ diff --git a/configs/techinc.py b/configs/techinc.py index 5c4ea22..3bad9ae 100644 --- a/configs/techinc.py +++ b/configs/techinc.py @@ -1,5 +1,5 @@ -from cinput import * -from mapper import pretty_conf_print +from uinputmapper.cinput import * +from uinputmapper.mapper import pretty_conf_print """ diff --git a/configs/tg.py b/configs/tg.py new file mode 100644 index 0000000..580f05d --- /dev/null +++ b/configs/tg.py @@ -0,0 +1,15 @@ +from uinputmapper.cinput import * + +config = { + (0, EV_KEY) : { + BTN_MIDDLE : { + 'type' : (0, EV_KEY), + 'code' : KEY_RIGHTMETA, + 'value' : None + } + } +} + +def config_merge(c): + c.clear() + c.update(config) diff --git a/configs/touchscreen.py b/configs/touchscreen.py index 338ac83..4c114dc 100644 --- a/configs/touchscreen.py +++ b/configs/touchscreen.py @@ -1,4 +1,4 @@ -from cinput import * +from uinputmapper.cinput import * # Approx @@ -26,7 +26,7 @@ def transform_x(x): def transform_y(y): y = ry2 - y y -= ry1 - y *= h / (rx2 - rx1) + y *= h / (rx2 - rx1) # shouldn't the x here be y? return int(y) @@ -35,12 +35,24 @@ config = { ABS_X : { 'type' : (0, EV_ABS), 'code' : ABS_X, - 'value' : transform_x + 'value' : transform_x, + 'prop' : { + 'max' : 3000, + 'min' : 200, + 'flat' : 0, + 'fuzz' : 0 + } }, ABS_Y : { 'type' : (0, EV_ABS), 'code' : ABS_Y, - 'value' : transform_y + 'value' : transform_y, + 'prop' : { + 'max' : 3000, + 'min' : 200, + 'flat' : 0, + 'fuzz' : 0 + } } } } @@ -54,10 +66,10 @@ def config_merge(c): c[k] = v # Uncomment this to make touch click too - c[(0, EV_KEY)][BTN_TOUCH] = { - 'type' : (0, EV_KEY), - 'code' : BTN_TOUCH, - 'value' : lambda x: 0 - } + #c[(0, EV_KEY)][BTN_TOUCH] = { + # 'type' : (0, EV_KEY), + # 'code' : BTN_TOUCH, + # 'value' : lambda x: 0 + #}