summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-02-23 13:55:27 +0000
committervaxerski <vaxry@vaxry.net>2023-02-23 13:55:27 +0000
commit14a2de0d0e0565ff889bcb1f5f803421a05cffc1 (patch)
tree137431a0943b986cd5473f564d2a7c7d930b0f40 /src/managers/KeybindManager.cpp
parent2bf7f9e4136ebef6db1159c636b163ecb96f23cc (diff)
add mouse_left _right
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index efeb2a07..c58ae7b6 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -258,16 +258,20 @@ bool CKeybindManager::onAxisEvent(wlr_pointer_axis_event* e) {
bool found = false;
if (e->source == WLR_AXIS_SOURCE_WHEEL && e->orientation == WLR_AXIS_ORIENTATION_VERTICAL) {
- if (e->delta < 0) {
+ if (e->delta < 0)
found = handleKeybinds(MODS, "mouse_down", 0, 0, true, 0);
- } else {
+ else
found = handleKeybinds(MODS, "mouse_up", 0, 0, true, 0);
- }
-
- if (found)
- shadowKeybinds();
+ } else if (e->source == WLR_AXIS_SOURCE_WHEEL && e->orientation == WLR_AXIS_ORIENTATION_HORIZONTAL) {
+ if (e->delta < 0)
+ found = handleKeybinds(MODS, "mouse_left", 0, 0, true, 0);
+ else
+ found = handleKeybinds(MODS, "mouse_right", 0, 0, true, 0);
}
+ if (found)
+ shadowKeybinds();
+
return !found;
}