From 9d21419deb1c2e52bb4aec020eeb829b19660192 Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Sun, 21 Apr 2013 01:50:49 +0200 Subject: [PATCH] Clean up create.py a bit. --- py/create.py | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/py/create.py b/py/create.py index cac6525..9220a6d 100644 --- a/py/create.py +++ b/py/create.py @@ -4,18 +4,19 @@ from cinput import * clone = True -passthrough = lambda x: -x*2 +overrule = lambda x: -x*2 +passthrough = lambda x: x config = { EV_REL : { REL_X : { 'type' : EV_REL, 'code' : REL_X, - 'value': passthrough + 'value': overrule }, REL_Y : { 'type': EV_REL, 'code': REL_Y, - 'value' : passthrough + 'value' : overrule } }, EV_KEY : { @@ -83,27 +84,3 @@ while True: except KeyError: pass - -# Config -dev = { - "input_devices" : [ - ("/dev/input/event3", "keyboard1"), - ], - "type" : "mouse", # "mixed" "mouse" "keyboard" "joystick" "clone"? - "keymap" : { - "any" : { # From - EV_KEY : { - KEY_UP : { - "type" : EV_REL, - "key" : REL_X, - "value" : lambda x: -x*10 - }, - KEY_DOWN : { - "type": EV_REL, - "key": REL_X, - "value" : lambda x: x*10 - } - } - }, - } -}