mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
ratbagd: Drop KeyMapping from the DBus interface
Plan is to remove the key mapping altogether and make it transparent from the Macro mappings (in libratbag/the drivers). Meanwhile, remove the DBus API so nothing can actually start using it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Jente Hidskes
parent
4c7f644599
commit
afaf3fa83d
@@ -187,13 +187,6 @@ def print_button(d, p, b, level):
|
||||
|
||||
if b.action_type == RatbagdButton.ACTION_TYPE_BUTTON:
|
||||
print("{}'button {}'".format(header, b.mapping))
|
||||
elif b.action_type == RatbagdButton.ACTION_TYPE_KEY:
|
||||
bmap = ""
|
||||
for m in b.key:
|
||||
code = evdev.ecodes.KEY.get(m, m)
|
||||
bmap = bmap + "{}".format(code)
|
||||
|
||||
print("{}'{}'".format(header, bmap))
|
||||
elif b.action_type == RatbagdButton.ACTION_TYPE_SPECIAL:
|
||||
print("{}'{}'".format(header, button_specials_strmap[b.special]))
|
||||
elif b.action_type == RatbagdButton.ACTION_TYPE_MACRO:
|
||||
|
||||
@@ -386,7 +386,7 @@ class TestRatbagCtlButton(TestRatbagCtl):
|
||||
r = self.launch_good_test("button 0 get test_device")
|
||||
self.assertEqual(r, "Button: 0 type left is mapped to 'button 0'")
|
||||
r = self.launch_good_test("button 1 get test_device")
|
||||
self.assertEqual(r, "Button: 1 type middle is mapped to 'KEY_3'")
|
||||
self.assertEqual(r, "Button: 1 type middle is mapped to UNKNOWN")
|
||||
r = self.launch_good_test("button 2 get test_device")
|
||||
self.assertEqual(r, "Button: 2 type right is mapped to 'profile-cycle-up'")
|
||||
r = self.launch_good_test("button 3 get test_device")
|
||||
|
||||
@@ -621,7 +621,6 @@ class RatbagdButton(_RatbagdDBus):
|
||||
ACTION_TYPE_NONE = 0
|
||||
ACTION_TYPE_BUTTON = 1
|
||||
ACTION_TYPE_SPECIAL = 2
|
||||
ACTION_TYPE_KEY = 3
|
||||
ACTION_TYPE_MACRO = 4
|
||||
|
||||
ACTION_SPECIAL_UNKNOWN = (1 << 30)
|
||||
@@ -783,7 +782,7 @@ class RatbagdButton(_RatbagdDBus):
|
||||
def action_type(self):
|
||||
"""An enum describing the action type of the button. One of
|
||||
ACTION_TYPE_NONE, ACTION_TYPE_BUTTON, ACTION_TYPE_SPECIAL,
|
||||
ACTION_TYPE_KEY, ACTION_TYPE_MACRO. This decides which
|
||||
ACTION_TYPE_MACRO. This decides which
|
||||
*Mapping property has a value.
|
||||
"""
|
||||
return self._get_dbus_property("ActionType")
|
||||
|
||||
Reference in New Issue
Block a user