Update configurations.

This commit is contained in:
Merlijn Wajer 2013-05-24 14:17:12 +02:00
parent 1dab5cfa6c
commit 6ea3c21983
5 changed files with 40 additions and 13 deletions

View File

@ -1,4 +1,4 @@
from cinput import * from uinputmapper.cinput import *
""" """
Configuration for a simple Microsoft SideWinter Game Pad Pro USB version 1.0 Configuration for a simple Microsoft SideWinter Game Pad Pro USB version 1.0

View File

@ -1,4 +1,4 @@
from cinput import * from uinputmapper.cinput import *
""" """

View File

@ -1,5 +1,5 @@
from cinput import * from uinputmapper.cinput import *
from mapper import pretty_conf_print from uinputmapper.mapper import pretty_conf_print
""" """

15
configs/tg.py Normal file
View File

@ -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)

View File

@ -1,4 +1,4 @@
from cinput import * from uinputmapper.cinput import *
# Approx # Approx
@ -26,7 +26,7 @@ def transform_x(x):
def transform_y(y): def transform_y(y):
y = ry2 - y y = ry2 - y
y -= ry1 y -= ry1
y *= h / (rx2 - rx1) y *= h / (rx2 - rx1) # shouldn't the x here be y?
return int(y) return int(y)
@ -35,12 +35,24 @@ config = {
ABS_X : { ABS_X : {
'type' : (0, EV_ABS), 'type' : (0, EV_ABS),
'code' : ABS_X, 'code' : ABS_X,
'value' : transform_x 'value' : transform_x,
'prop' : {
'max' : 3000,
'min' : 200,
'flat' : 0,
'fuzz' : 0
}
}, },
ABS_Y : { ABS_Y : {
'type' : (0, EV_ABS), 'type' : (0, EV_ABS),
'code' : ABS_Y, '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 c[k] = v
# Uncomment this to make touch click too # Uncomment this to make touch click too
c[(0, EV_KEY)][BTN_TOUCH] = { #c[(0, EV_KEY)][BTN_TOUCH] = {
'type' : (0, EV_KEY), # 'type' : (0, EV_KEY),
'code' : BTN_TOUCH, # 'code' : BTN_TOUCH,
'value' : lambda x: 0 # 'value' : lambda x: 0
} #}