diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-06-04 22:46:17 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-06-04 22:46:17 +0000 |
| commit | ae0d84721d58731feee4888b67e7a1e55cd318b2 (patch) | |
| tree | f1596fd6c2c1f2e48b88e2b9a34e6bce05fc9969 /plugins/mouse/translate.c | |
| parent | 795d90c3bc57eaf2c98c447f3af5c1c9e7a52fa3 (diff) | |
add a leftHanded option for mouse bindings, reverses the left/right keywords
Diffstat (limited to 'plugins/mouse/translate.c')
| -rw-r--r-- | plugins/mouse/translate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mouse/translate.c b/plugins/mouse/translate.c index 9f042dd9..d849ed44 100644 --- a/plugins/mouse/translate.c +++ b/plugins/mouse/translate.c @@ -1,4 +1,5 @@ #include "../../kernel/openbox.h" +#include "mouse.h" #include <glib.h> #include <string.h> #include <stdlib.h> @@ -45,9 +46,9 @@ gboolean translate_button(char *str, guint *state, guint *button) } /* figure out the button */ - if (!g_ascii_strcasecmp("Left", l)) *button = 1; + if (!g_ascii_strcasecmp("Left", l)) *button = mouse_lefthand ? 3 : 1; else if (!g_ascii_strcasecmp("Middle", l)) *button = 2; - else if (!g_ascii_strcasecmp("Right", l)) *button = 3; + else if (!g_ascii_strcasecmp("Right", l)) *button = mouse_lefthand ? 1 : 3; else if (!g_ascii_strcasecmp("Up", l)) *button = 4; else if (!g_ascii_strcasecmp("Down", l)) *button = 5; else if (!g_ascii_strncasecmp("Button", l, 6)) *button = atoi(l+6); |
