Right and center mouse click with one-button mouse (was: Re: Icons in menu bar)
Mike Hore
mike_hore at aapt.net.au
Wed Nov 8 10:17:49 UTC 2006
> Peter Yates wrote:
>> I saw this a while ago in the redhat magazine; it may be worth a shot :
>>
>> As root, edit the |/etc/sysctl.conf| file and add the following:
>> dev.mac_hid.mouse_button_emulation = 1
>>
>> dev.mac_hid.mouse_button2_keycode = 87
>>
>> dev.mac_hid.mouse_button3_keycode = 88
>>
>
> On my keyboard I think F11 is keycode 95 and F12 is 96, but the main
> problem is when I do
> sysctl -p
> I get an error:
>
> error: "dev.mac_hid.mouse_button_emulation" is an unknown key
> error: "dev.mac_hid.mouse_button2_keycode" is an unknown key
> error: "dev.mac_hid.mouse_button3_keycode" is an unknown key
>
> I have no idea what this means or what to do about it.
>
On the PPC Mac Web Forum there's been adviced to create a file .Xmodmap
in my home directory, and put in lines
keycode 95 = Pointer_Button2
keycode 96 = Pointer_Button3
(using the keycodes my keyboard generates for F11 and F12).
I did this, restarted, got a dialog saying did I want to load the
keyboard map, I answered yes.
Now xev shows that F11 and F12 are indeed generating Pointer_Button2 and
Pointer_Button3. So far so good,
BUT THESE AREN'T DOING ANYTHING! No mouse click of any sort is occurring.
There are variations in how to get the keyboard map changed, but the end
result is always to generate Pointer_Button3 etc, and my problem isn't
at this point, but how to get this code to actually perform as advertized.
So while I could go out and buy a new mouse, I really feel there should
be an answer (just call me stubborn).
-- Mike.
More information about the ubuntu-users
mailing list