double tablet_get_dbl_if_positive(const char *content, const char *name);
enum rotation tablet_parse_rotation(int value);
uint32_t tablet_button_from_str(const char *button);
-uint32_t mouse_button_from_str(const char *button);
void tablet_button_mapping_add(uint32_t from, uint32_t to);
void tablet_load_default_button_mappings(void);
button_map_from = tablet_button_from_str(content);
} else if (!strcasecmp(nodename, "to.map.tablet")) {
if (button_map_from != UINT32_MAX) {
- uint32_t button_map_to = mouse_button_from_str(content);
+ uint32_t button_map_to = mousebind_button_from_str(content, NULL);
if (button_map_to != UINT32_MAX) {
tablet_button_mapping_add(button_map_from, button_map_to);
}
return UINT32_MAX;
}
-uint32_t
-mouse_button_from_str(const char *button)
-{
- if (!strcasecmp(button, "Left")) {
- return BTN_LEFT;
- } else if (!strcasecmp(button, "Right")) {
- return BTN_RIGHT;
- } else if (!strcasecmp(button, "Middle")) {
- return BTN_MIDDLE;
- }
- wlr_log(WLR_ERROR, "Invalid value for mouse button: %s", button);
- return UINT32_MAX;
-}
-
void
tablet_button_mapping_add(uint32_t from, uint32_t to)
{