Clean up create.py a bit.

This commit is contained in:
Merlijn Wajer 2013-04-21 01:50:49 +02:00
parent 98fdbecccf
commit 9d21419deb
1 changed files with 4 additions and 27 deletions

View File

@ -4,18 +4,19 @@ from cinput import *
clone = True clone = True
passthrough = lambda x: -x*2 overrule = lambda x: -x*2
passthrough = lambda x: x
config = { config = {
EV_REL : { EV_REL : {
REL_X : { REL_X : {
'type' : EV_REL, 'type' : EV_REL,
'code' : REL_X, 'code' : REL_X,
'value': passthrough 'value': overrule
}, },
REL_Y : { REL_Y : {
'type': EV_REL, 'type': EV_REL,
'code': REL_Y, 'code': REL_Y,
'value' : passthrough 'value' : overrule
} }
}, },
EV_KEY : { EV_KEY : {
@ -83,27 +84,3 @@ while True:
except KeyError: except KeyError:
pass 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
}
}
},
}
}