Skip to contentSkip to conversation

adb_buttons kernel argument

DISCUSSION Paul Mackerras 5 participants 9 messages Mar 29, 2000 – Mar 30, 2000

lore
Share & tools
lore
#0 lore raw

I have just realized that with 2.3.xx (since 2.3.18) the format of the arguments for the adb_buttons=xxx kernel command-line argument has changed. With 2.2 you can say adb_buttons=1 to emulate buttons 2 and 3 with the right control and option keys, or you can say adb_buttons=xx,yy to use keycodes xx and yy to emulate buttons 2 and 3. With 2.3 you now have to say adb_buttons=1,xx,yy.

I propose to change 2.3 back to the 2.2 behaviour since that is what is documented. Does anybody have any problem with that?

--
Paul Mackerras, Senior Open Source Researcher, Linuxcare, Inc. +61 2 6262 8990 tel, +61 2 6262 8991 fax [email protected], http://www.linuxcare.com.au/
Linuxcare. Support for the revolution.

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

#1 lore raw
Quoted 7 lines

I have just realized that with 2.3.xx (since 2.3.18) the format of the arguments for the adb_buttons=xxx kernel command-line argument has changed. With 2.2 you can say adb_buttons=1 to emulate buttons 2 and 3 with the right control and option keys, or you can say adb_buttons=xx,yy to use keycodes xx and yy to emulate buttons 2 and 3. With 2.3 you now have to say adb_buttons=1,xx,yy.

That explains my problems with adb_buttons in 2.3.48 - though I had looked for a different cause. By accident the values for yy was xx + 8 on my machine, and the xev output for button x was xx + 8 as well ...

Quoted 2 lines

I propose to change 2.3 back to the 2.2 behaviour since that is what is documented. Does anybody have any problem with that?

Please change it back. Or make it look like

static int __init adb_mouse_setup(char *str)

{
        int ints[4]={-1,-1,-1,-1};

        str = get_options(str, ARRAY_SIZE(ints), ints);
 	if ( ints[0] > 0
             && (adb_emulate_buttons = (ints[1] >=0)||(ints[2] >=0)) ) {
		if (ints[1] > 1)
	                adb_button2_keycode = ints[1];
	        if (ints[0] >= 2 && ints[2] >= 0)
                        adb_button3_keycode = ints[2];
        }
        return 1;
}

Michael

P.S.: Did you ever receive my 2.3.48 adb.c patch?

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

#2 lore raw
In reply to Paul Mackerras

Am Wed, 29 Mar 2000 schrieb Paul Mackerras:

Quoted 9 lines

I have just realized that with 2.3.xx (since 2.3.18) the format of the arguments for the adb_buttons=xxx kernel command-line argument has changed. With 2.2 you can say adb_buttons=1 to emulate buttons 2 and 3 with the right control and option keys, or you can say adb_buttons=xx,yy to use keycodes xx and yy to emulate buttons 2 and 3. With 2.3 you now have to say adb_buttons=1,xx,yy.

I propose to change 2.3 back to the 2.2 behaviour since that is what is documented. Does anybody have any problem with that?

Well, change the documentation. I think somebody is integrating my xpmac-style adb_buttons support and so there will be a adb_buttons=2,xx,yy soon. I think the old syntax was a little bit strange anyway and probably was only a mistake and no intended behaviour.

Franz.

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

#3 lore raw
Quoted 4 lines · Franz Sirl

Well, change the documentation. I think somebody is integrating my xpmac-style adb_buttons support and so there will be a adb_buttons=2,xx,yy soon. I think the old syntax was a little bit strange anyway and probably was only a mistake and no intended behaviour.

Yes, please! I have been using the adb_buttons=2,xx,yy patch for more than a year now on both 2.2.x and 2.3.x. It would be nice to have it integrated in the kernel, so I don't have to patch it every time. If someone wants a version for 2.3.99, I can mail it.

--
Martin

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

#4 lore raw
Quoted 10 lines
Quoted 5 lines

Well, change the documentation. I think somebody is integrating my xpmac-style adb_buttons support and so there will be a adb_buttons=2,xx,yy soon. I think the old syntax was a little bit strange anyway and probably was only a mistake and no intended behaviour.

Yes, please! I have been using the adb_buttons=2,xx,yy patch for more than a year now on both 2.2.x and 2.3.x. It would be nice to have it integrated in the kernel, so I don't have to patch it every time. If someone wants a version for 2.3.99, I can mail it.

Could you please describe what adb_buttons=2,xx,yy does different than adb_buttons=xx,yy (2.2 style) would do?
Please keep in mind that the adb mouse code is shared with the m68k Mac port. I'm sure people there would like to get a heads-up about changes to the syntax too.

Michael

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

#5 lore raw
Quoted 13 lines · Michael Schmitz
Quoted 4 lines
Quoted 1 line

Well, change the documentation. I think somebody is integrating my

xpmac-style

Quoted 1 line

adb_buttons support and so there will be a adb_buttons=2,xx,yy soon. I

think

Quoted 8 lines
Quoted 1 line

the old syntax was a little bit strange anyway and probably was only a

mistake

Quoted 1 line

and no intended behaviour.

Yes, please! I have been using the adb_buttons=2,xx,yy patch for more than a year now on both 2.2.x and 2.3.x. It would be nice to have it integrated in the kernel, so I don't have to patch it every time. If someone wants a version for 2.3.99, I can mail it.

Quoted 5 lines

Could you please describe what adb_buttons=2,xx,yy does different than adb_buttons=xx,yy (2.2 style) would do?
Please keep in mind that the adb mouse code is shared with the m68k Mac port. I'm sure people there would like to get a heads-up about changes to the syntax too.

Providing we m68k Mac folk can actually keep our 2.3/4 tree up to date and bootable. *sigh*

Speaking of which, if any of you folk have some old 68k Mac hardware laying around and need a break from PPC hacking, feel free to contribute! The info and stuff is at <http://www.mac.linux-m68k.org/>, or drop by #Linux-Mac68k on the openprojects irc network.

Cheers - Tony :)

--
Tony Mantler Renaissance Nerd Extraordinaire [email protected]
Winnipeg, Manitoba, Canada http://www.escape.ca/~eek

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

#6 lore raw
In reply to Michael Schmitz
Quoted 5 lines · Michael Schmitz

Could you please describe what adb_buttons=2,xx,yy does different than adb_buttons=xx,yy (2.2 style) would do?
Please keep in mind that the adb mouse code is shared with the m68k Mac port. I'm sure people there would like to get a heads-up about changes to the syntax too.

It defines key_xx + mouseclick as middle button and key_yy + mouseclick as right button. This is one of the two default bindings of Xpmac, which has Opt_left+click and Opt_right+click as buttons 2 and 3. I use adb_buttons=2,58,124 to get the same also in the console (with gpm) and in XF_FBDev.

--
Martin

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

#7 lore raw
Quoted 7 lines
Quoted 6 lines

Could you please describe what adb_buttons=2,xx,yy does different than adb_buttons=xx,yy (2.2 style) would do?
Please keep in mind that the adb mouse code is shared with the m68k Mac port. I'm sure people there would like to get a heads-up about changes to the syntax too.

Quoted 5 lines

It defines key_xx + mouseclick as middle button and key_yy + mouseclick as right button. This is one of the two default bindings of Xpmac, which has Opt_left+click and Opt_right+click as buttons 2 and 3. I use adb_buttons=2,58,124 to get the same also in the console (with gpm) and in XF_FBDev.

OK, that's indeed not covered by the standard adb_buttons syntax. Funny binding - how do you get a left+right button press in Xpmac?

Michael

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

#8 lore raw
Quoted 2 lines · Michael Schmitz

OK, that's indeed not covered by the standard adb_buttons syntax. Funny binding - how do you get a left+right button press in Xpmac?

Standard Xpmac:
button 2 (middle): emulated by Opt + 2 and also by LeftOption + mouseclick
button 3 (right) : emulated by Opt + 3 and also by RightOption + mouseclick

This supposes, of course, that you have a keyboard that has 2 Option keys (keycodes called LALT and RALT). And that the handler of your keyboard is set to 3 and not to 2 (left=right) nor to 5 (no modifiers, at least for me).

--
Martin

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