summaryrefslogtreecommitdiff
path: root/python/evemu/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/evemu/__init__.py')
-rw-r--r--python/evemu/__init__.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/python/evemu/__init__.py b/python/evemu/__init__.py
index 8a2531c..217d2cc 100644
--- a/python/evemu/__init__.py
+++ b/python/evemu/__init__.py
@@ -388,6 +388,17 @@ class Device(object):
"""
return self._libevemu.evemu_get_id_version(self._evemu_device)
+ def get_abs_current_value(self, event_code):
+ """
+ Return the current value for the given EV_ABS value.
+
+ event_code may be an int or string-like ("ABS_X").
+ """
+ if not isinstance(event_code, int):
+ event_code = event_get_value("EV_ABS", event_code)
+ return self._libevemu.evemu_get_abs_current_value(self._evemu_device,
+ event_code)
+
def get_abs_minimum(self, event_code):
"""
Return the axis minimum for the given EV_ABS value.