[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 2nd and 3rd mouse buttons in XF4.0.2



On Mon, 12 Mar 2001, Paolo Redaelli wrote:

> Michael Hope wrote:
> > 
> > > I'm trying to get a 2nd and 3rd mouse button working in XFree 4.0.2.  I'm
> > > running kernel 2.4.2-pre3 from bitkeeper's sources.  I have the following
> > > relevant options in my kerenl conifg:
> > >
> > > CONFIG_USB=y
> > > CONFIG_USB_HID=y
> > > CONFIG_INPUT_KEYBDEV=y
> > > CONFIG_INPUT_MOUSEDEV=y
> > > CONFIG_INPUT_EVDEV=y
> > > CONFIG_INPUT_ADBHID=y
> > >
> > >
> > > /etc/sysctl.conf:
> > >
> > > dev.mac_hid.mouse_button2_keycode = 101
> > > dev.mac_hid.mouse_button3_keycode = 109
> > > dev.mac_hid.mouse_button_emulation = 1
> > 
> > I did a grep for 101 and 109 across linux/include/input.h - 101
> > is the lineffed key (?) and 109 is the pagedown key.  Personally I use
> > 
> > echo 1 > /proc/sys/dev/mac_hid/mouse_button_emulation
> > echo 87 > /proc/sys/dev/mac_hid/mouse_button2_keycode
> > echo 88 > /proc/sys/dev/mac_hid/mouse_button3_keycode
> > 
> > which sets F11 to the MMB and F12 to the RMB.
> Mhmhm.... I've an iBook and I would prefer the small enter (near
> spacebar) for 2nd button and right option for the 3rd. Does anyone know
> their codes?
> 10x in advance and cheers

Here's what I found:

showkeys maps the small enter as code 76 (0x4c) and the right option as
code 58 (0x3a).  According to src/linux/drivers/macintosh/mackeymap.map,
0x4c is mapped to KP_Enter and 0x3a is mapped to AltGr.  According to
src/linux/include/linux/input, KEY_KPENTER is code 96 and there is no
AltGR.

So the short version of the story is, use 96 for the small enter.  I don't
think you can get the right option as it has already been swallowed by a
lower layer.  I don't know much about this system, but you could try
remapping the option key to something else like right alt and then use
right alt's keycode.  How I don't know :)

-- Michael

 > -- 
> +----------------+---------------------+---------------------------------+
> | Paolo Redaelli | redaelli@edisons.it | http://redaelli.mine.nu/~paolo/
> |
> +----------------+---------------------+---------------------------------+
> 



Reply to: