[patch] MacAlly 2-buttons mouse support for 2.2.14

STALE9720d

7 messages, 4 authors, 2000-01-10 · open the first message on its own page

[patch] MacAlly 2-buttons mouse support for 2.2.14

From: Giuliano Pochini <hidden>
Date: 2000-01-06 19:04:38

Does anyone read my msgs ?? I posted these ones for ages but they still are
not been included into official kernels...

Bye.

Re: [patch] MacAlly 2-buttons mouse support for 2.2.14

From: BenH <hidden>
Date: 2000-01-08 14:56:10

On Thu, Jan 6, 2000, Giuliano Pochini [off-list ref] wrote:
Does anyone read my msgs ?? I posted these ones for ages but they still are
not been included into official kernels...
They look clean. I'll add them to my test kernels in order to get some
feedback. If they seem to work fine, they'll end up in the main tree.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: [patch] MacAlly 2-buttons mouse support for 2.2.14

From: Giuliano Pochini <hidden>
Date: 2000-01-08 18:03:18

They look clean. I'll add them to my test kernels in order to get some
feedback. If they seem to work fine, they'll end up in the main tree.
Tnx!

Bye.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: [patch] MacAlly 2-buttons mouse support for 2.2.14

From: Olaf Hering <hidden>
Date: 2000-01-09 19:42:45

On Sat, Jan 08, BenH wrote:
On Thu, Jan 6, 2000, Giuliano Pochini [off-list ref] wrote:
quoted
Does anyone read my msgs ?? I posted these ones for ages but they still are
not been included into official kernels...
They look clean. I'll add them to my test kernels in order to get some
feedback. If they seem to work fine, they'll end up in the main tree.
We have also a nice mouse patch :-)

cat zzz_onebutton_mouse.dif :

diff -urN linux/drivers/char/adbmouse.c linux-2.2.14pre14.SuSE.ppc/drivers/char/adbmouse.c
--- linux/drivers/char/adbmouse.c	Thu Apr 29 21:53:48 1999
+++ linux-2.2.14pre14.SuSE.ppc/drivers/char/adbmouse.c	Sat Dec 18 02:01:45 1999
@@ -50,6 +50,10 @@
 extern int adb_button2_keycode;
 extern int adb_button3_keycode;
 
+extern unsigned char onebutton_keycode;
+extern unsigned char onebutton_upflag;
+extern unsigned char onebutton_clicked;
+
 extern int console_loglevel;
 
 /*
@@ -193,6 +197,17 @@
     dx = mouse.dx;
     dy = mouse.dy;
     buttons = mouse.buttons;
+ 
+    if (buttons == 3) {
+        if (onebutton_keycode == 55)
+            buttons = 5;
+        else if (onebutton_keycode == 54)
+            buttons = 6;
+        if (onebutton_upflag)
+		onebutton_keycode = 0;
+	onebutton_clicked = 1;
+    }                                                       
+
     if (dx > 127)
 	dx = 127;
     else if (dx < -128)
diff -urN linux/drivers/char/keyboard.c linux-2.2.14pre14.SuSE.ppc/drivers/char/keyboard.c
--- linux/drivers/char/keyboard.c	Mon Aug  9 21:05:01 1999
+++ linux-2.2.14pre14.SuSE.ppc/drivers/char/keyboard.c	Sat Dec 18 01:43:26 1999
@@ -62,6 +62,9 @@
 #endif
 
 EXPORT_SYMBOL(handle_scancode);
+unsigned char onebutton_keycode = 0;
+unsigned char onebutton_upflag  = 1;
+unsigned char onebutton_clicked = 0;
 
 extern void ctrl_alt_del(void);
 
@@ -240,8 +243,14 @@
 		rep = 0;
 		if(!test_and_clear_bit(keycode, key_down))
 		    up_flag = kbd_unexpected_up(keycode);
-	} else
+	        if (onebutton_clicked)
+			onebutton_keycode = 0;
+	} else {
 		rep = test_and_set_bit(keycode, key_down);
+		onebutton_keycode = keycode;
+		onebutton_clicked = 0;
+	}
+	onebutton_upflag = up_flag;
 
 #ifdef CONFIG_MAGIC_SYSRQ		/* Handle the SysRq Hack */
 	if (keycode == SYSRQ_KEY) {
diff -urN linux/drivers/usb/mouse.c linux-2.2.14pre14.SuSE.ppc/drivers/usb/mouse.c
--- linux/drivers/usb/mouse.c	Sat Dec 18 02:14:43 1999
+++ linux-2.2.14pre14.SuSE.ppc/drivers/usb/mouse.c	Sat Dec 18 01:45:36 1999
@@ -40,6 +40,10 @@
 
 #include <asm/spinlock.h>
 
+extern unsigned char onebutton_keycode;
+extern unsigned char onebutton_upflag;
+extern unsigned char onebutton_clicked;                                         
+
 #include "usb.h"
 
 #define USB_MOUSE_MINOR 32
@@ -188,6 +192,16 @@
 				buttons |= 0x10;
 			if (mouse->dy < 0)
 				buttons |= 0x20;
+			if (buttons == 1) {
+				if (onebutton_keycode == 54)
+					buttons = 2;
+				else if (onebutton_keycode == 55)
+					buttons = 4;
+				onebutton_keycode = 0;
+				if (onebutton_upflag)
+					onebutton_keycode = 0;
+				onebutton_clicked = 1;
+			}
 			put_user(buttons, buffer);
 			buffer++;
 			retval++;


Right mouse button is CMND , middle mouse button is CTRL.
Would be nice to get some feedback. 


Gruss Olaf

-- 
 $ man 1 current_release

BUGS
       Users never read manuals...

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: [patch] MacAlly 2-buttons mouse support for 2.2.14

From: Kostas Gewrgiou <hidden>
Date: 2000-01-10 12:08:32

On Sun, 9 Jan 2000, Olaf Hering wrote:
We have also a nice mouse patch :-)
.....
Right mouse button is CMND , middle mouse button is CTRL.
Would be nice to get some feedback. 


Gruss Olaf

  Hmm how are you going to get double clicks with this ? 
Also keep in mind that many window managers/programs use
ctrl|meta|alt-mousebutton.

I still feel that at least for X it should (and can) be 
handled from inside X and not from the kernel. We still
need something for the console though.

 Kostas Gewrgiou


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: [patch] MacAlly 2-buttons mouse support for 2.2.14

From: Olaf Hering <hidden>
Date: 2000-01-10 14:49:46

On Mon, Jan 10, Kostas Gewrgiou wrote:
quoted
Right mouse button is CMND , middle mouse button is CTRL.
Would be nice to get some feedback. 
  Hmm how are you going to get double clicks with this ? 
Also keep in mind that many window managers/programs use
ctrl|meta|alt-mousebutton.

I still feel that at least for X it should (and can) be 
handled from inside X and not from the kernel. We still
need something for the console though.
It work also on the console. I guess there is no easy way for
ALT+double_click.

Or do you miss something? It is for the copy&paste function, I will
check what I can do to solve the problem with Xterm. You can not change
the size of the font.
If someone really need a application that depends on "complex mouse
clicks" ;-) then go and by a more button mouse.

BTW, where can I get a more button ADB mouse?


Gruss Olaf

-- 
 $ man 1 current_release

BUGS
       Users never read manuals...

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: [patch] MacAlly 2-buttons mouse support for 2.2.14

From: Kostas Gewrgiou <hidden>
Date: 2000-01-10 15:52:59

On Mon, 10 Jan 2000, Olaf Hering wrote:
On Mon, Jan 10, Kostas Gewrgiou wrote:
quoted
quoted
Right mouse button is CMND , middle mouse button is CTRL.
Would be nice to get some feedback. 
quoted
  Hmm how are you going to get double clicks with this ? 
Also keep in mind that many window managers/programs use
ctrl|meta|alt-mousebutton.

I still feel that at least for X it should (and can) be 
handled from inside X and not from the kernel. We still
need something for the console though.
It work also on the console. I guess there is no easy way for
ALT+double_click.

Or do you miss something? It is for the copy&paste function, I will
check what I can do to solve the problem with Xterm. You can not change
the size of the font.
If someone really need a application that depends on "complex mouse
clicks" ;-) then go and by a more button mouse.
  I mean that you can map keyboard keys to mouse clicks under X *without* any
kernel changes. Take a look at http://people.a2000.nl/omoerbe/ for a better
description.  
BTW, where can I get a more button ADB mouse?
  Can't help there, at least in Greece its much easier (and cheaper) to find/buy
a usb pci card :(.
Gruss Olaf
 Kostas Gewrgiou


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help