summaryrefslogtreecommitdiffstats
path: root/config.def.h
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2017-10-05 13:53:29 +0200
committerBert Münnich <ber.t@posteo.de>2017-10-06 10:15:43 +0200
commit8081cbebf36e48297a589af02db400687c4ef261 (patch)
tree9740972bf4c7684fe80acc291915f2a3aa8060d5 /config.def.h
parentee908ca0a197ac579ab8abc5695c9ce421a96a21 (diff)
downloadnsxiv-8081cbebf36e48297a589af02db400687c4ef261.tar.zst
Improve mouse support
None of the mouse mappings uses a keyboard modifier, making it possible to access the most basic features by only using the mouse. Next/previous image with left button depending on cursor position, middle button for dragging, right button for switching to thumnail mode and wheel for zooming. Users can keep the old behaviour by simply not adapting the changes to the buttons array in config.def.h to their config.h file.
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/config.def.h b/config.def.h
index e211c0d..5af745d 100644
--- a/config.def.h
+++ b/config.def.h
@@ -150,17 +150,11 @@ static const keymap_t keys[] = {
/* mouse button mappings for image mode: */
static const button_t buttons[] = {
/* modifiers button function argument */
- { 0, 1, i_navigate, +1 },
- { 0, 3, i_navigate, -1 },
+ { 0, 1, i_cursor_navigate, None },
{ 0, 2, i_drag, None },
- { 0, 4, i_scroll, DIR_UP },
- { 0, 5, i_scroll, DIR_DOWN },
- { ShiftMask, 4, i_scroll, DIR_LEFT },
- { ShiftMask, 5, i_scroll, DIR_RIGHT },
- { 0, 6, i_scroll, DIR_LEFT },
- { 0, 7, i_scroll, DIR_RIGHT },
- { ControlMask, 4, g_zoom, +1 },
- { ControlMask, 5, g_zoom, -1 },
+ { 0, 3, g_switch_mode, None },
+ { 0, 4, g_zoom, +1 },
+ { 0, 5, g_zoom, -1 },
};
#endif