Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ynsta/steamcontroller.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/sc-callbacks.py')
-rw-r--r--scripts/sc-callbacks.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/sc-callbacks.py b/scripts/sc-callbacks.py
index 042df21..41d4078 100644
--- a/scripts/sc-callbacks.py
+++ b/scripts/sc-callbacks.py
@@ -46,6 +46,9 @@ def touchpad_touch_callback(evm, pad, x, y):
def stick_pressed_callback(evm):
print "Stick pressed"
+def stick_axes_callback(evm, x, y):
+ print "Stick Position is {}, {}".format(x, y)
+
def evminit():
evm = EventMapper()
evm.setButtonCallback(SCButtons.STEAM, button_pressed_callback)
@@ -63,6 +66,7 @@ def evminit():
evm.setButtonCallback(SCButtons.BACK, button_pressed_callback)
evm.setPadButtonCallback(Pos.LEFT, touchpad_touch_callback)
evm.setPadButtonCallback(Pos.RIGHT, touchpad_click_callback, clicked=True)
+ evm.setStickAxesCallback(stick_axes_callback)
evm.setStickPressedCallback(stick_pressed_callback)
return evm