[
Thread Prev][
Thread Next] >
Date Index
>
Thread Index
[wmx] Remappable buttons...
Glyn Faulkner -
Sat Jun 15 18:30:45 2002
Hi,
Dunno if this will be any use to anyone, but here's a patch to wmx-6 that'll
let you reconfigure your mouse buttons -- It changes a few lines in Buttons.C
and adds 5 new #defines to Config.h
I've been using this dodgy hack for about 6 months now and it doesn't seem to
break anything. Let me know if you have any problems with it.
I hope the website handles quoted-printable encoding. :)
Cheers
Glyn
--- wmx-6/Buttons.C Wed Apr 4 09:58:31 2001
+++ wmx-6-buttons/Buttons.C Sat Jun 15 16:00:18 2002
@@ -20,3 +20,3 @@
#if CONFIG_GNOME_BUTTON_COMPLIANCE == False
- if (e->button == Button3 && m_channelChangeTime == 0) {
+ if (e->button == CONFIG_CIRCULATE_BUTTON && m_channelChangeTime == 0) {
if (dConfig.rightCirculate())
@@ -41,3 +41,3 @@
- if (e->button == Button4 && CONFIG_CHANNEL_SURF) {
+ if (e->button == CONFIG_NEXTCHANNEL_BUTTON && CONFIG_CHANNEL_SURF) {
// wheel "up" - increase channel
@@ -45,3 +45,3 @@
return ;
- } else if (e->button == Button5 && CONFIG_CHANNEL_SURF) {
+ } else if (e->button == CONFIG_PREVCHANNEL_BUTTON && CONFIG_CHANNEL_SURF) {
// wheel "down" - decrease channel
@@ -54,3 +54,3 @@
#if CONFIG_GNOME_BUTTON_COMPLIANCE != False
- if ((e->button == Button1 || e->button == Button3)
+ if ((e->button == CONFIG_CLIENTMENU_BUTTON || e->button == CONFIG_CIRCULATE_BUTTON)
&& m_channelChangeTime == 0) {
@@ -62,3 +62,3 @@
- if (e->button == Button2 && m_channelChangeTime == 0) {
+ if (e->button == CONFIG_COMMANDMENU_BUTTON && m_channelChangeTime == 0) {
ClientMenu menu(this, (XEvent *)e);
@@ -68,3 +68,3 @@
- if (e->button == Button1 && m_channelChangeTime == 0) {
+ if (e->button == CONFIG_CLIENTMENU_BUTTON && m_channelChangeTime == 0) {
ClientMenu menu(this, (XEvent *)e);
@@ -75,3 +75,3 @@
- if (e->button == Button2) {
+ if (e->button == CONFIG_COMMANDMENU_BUTTON) {
#if CONFIG_USE_CHANNEL_MENU
@@ -82,3 +82,3 @@
- } else if (e->button == Button1 && m_channelChangeTime != 0) {
+ } else if (e->button == CONFIG_CLIENTMENU_BUTTON && m_channelChangeTime != 0) {
@@ -88,3 +88,3 @@
- } else if (e->button == Button2 && m_channelChangeTime == 0) {
+ } else if (e->button == CONFIG_COMMANDMENU_BUTTON && m_channelChangeTime == 0) {
dConfig.scan();
@@ -95,3 +95,3 @@
- if (e->button == Button2 && CONFIG_CHANNEL_SURF) {
+ if (e->button == CONFIG_COMMANDMENU_BUTTON && CONFIG_CHANNEL_SURF) {
#if CONFIG_USE_CHANNEL_MENU
@@ -103,3 +103,3 @@
return;
- } else if (e->button == Button1 && m_channelChangeTime != 0) {
+ } else if (e->button == CONFIG_CLIENTMENU_BUTTON && m_channelChangeTime != 0) {
// allow left-button to push down a channel --cc 19991001
@@ -467,3 +467,3 @@
- if (e->button == Button1) {
+ if (e->button == CONFIG_CLIENTMENU_BUTTON) {
if (m_border->hasWindow(e->window)) {
--- wmx-6/Config.h Wed May 24 16:48:59 2000
+++ wmx-6-buttons/Config.h Sat Jun 15 15:57:06 2002
@@ -236,2 +236,13 @@
+// Mouse Configuration
+// Use this section to remap your mouse button actions.
+// Button1 = LMB, Button2 = MMB, Button3 = RMB
+// Button4 = WheelUp, Button5 = WheelDown
+
+#define CONFIG_CLIENTMENU_BUTTON Button1
+#define CONFIG_COMMANDMENU_BUTTON Button2
+#define CONFIG_CIRCULATE_BUTTON Button3
+#define CONFIG_PREVCHANNEL_BUTTON Button5
+#define CONFIG_NEXTCHANNEL_BUTTON Button4
+
Next: