mirror of
https://github.com/moparisthebest/uinput-mapper
synced 2024-12-03 12:12:15 -05:00
Update configurations.
This commit is contained in:
parent
1dab5cfa6c
commit
6ea3c21983
@ -1,4 +1,4 @@
|
||||
from cinput import *
|
||||
from uinputmapper.cinput import *
|
||||
|
||||
"""
|
||||
Configuration for a simple Microsoft SideWinter Game Pad Pro USB version 1.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
from cinput import *
|
||||
from uinputmapper.cinput import *
|
||||
|
||||
|
||||
"""
|
||||
|
@ -1,5 +1,5 @@
|
||||
from cinput import *
|
||||
from mapper import pretty_conf_print
|
||||
from uinputmapper.cinput import *
|
||||
from uinputmapper.mapper import pretty_conf_print
|
||||
|
||||
|
||||
"""
|
||||
|
15
configs/tg.py
Normal file
15
configs/tg.py
Normal 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)
|
@ -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
|
||||
#}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user