1
0
forked from drath/libratbag

libratbag: drop everything related to simple key action modifiers

Macros can be used for that instead, drivers can adapt them as needed.
Simple key actions will stay here for now, but I plan to completely
replace them with macros eventually.
This commit is contained in:
Yaroslav Chvanov
2023-09-25 18:50:54 +03:00
parent d155bd27ec
commit 2b878fd06a
5 changed files with 11 additions and 41 deletions

View File

@@ -741,11 +741,11 @@ class RatbagdButton(metaclass=MetaRatbag):
@property
def key(self):
return libratbag.ratbag_button_get_key(self._button, None, None)
return libratbag.ratbag_button_get_key(self._button)
@key.setter
def key(self, key):
libratbag.ratbag_button_set_key(self._button, key, None, 0)
libratbag.ratbag_button_set_key(self._button, key)
@property
def action_type(self):

View File

@@ -143,10 +143,8 @@ char *
button_action_key_to_str(struct ratbag_button *button)
{
const char *str;
unsigned int modifiers[10];
size_t m_size = 10;
str = libevdev_event_code_get_name(EV_KEY, ratbag_button_get_key(button, modifiers, &m_size));
str = libevdev_event_code_get_name(EV_KEY, ratbag_button_get_key(button));
if (!str)
str = "UNKNOWN";