PDA

View Full Version : Right-Click on a PowerBook?


FeeDawg
26th August 2005, 06:06 PM
This is the fourth Linux distro I've installed on this PowerBook G3 Lombard. FC4 (version 2.6.11-1.1369_FC4)
I have scoured the universe, the install guide, everything including this forum and I can't seem to find what key is assigned to the right-click contextual menu that you get if you have a two/three-button mouse attached. On the Mac side, you hold down Ctrl. In Yellow Dog, it's the F11 key. Ubuntu, same but they add the F12 key also. I'm crying Uncle! Can anyone give me the poop? Thanks

Twey
26th August 2005, 06:20 PM
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

The above will allow the F11 and the F12 keys on the keyboard to provide the middle and right click mouse buttons.

You can get the keycode of a key by running xev, then pressing the key. The output will be something like this:
KeyPress event, serial 28, synthetic NO, window 0x3400001,
root 0x115, subw 0x0, time 11656203, (411,455), root:(461,501),
state 0x0, keycode 95 (keysym 0xffc8, F11), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

FeeDawg
27th August 2005, 04:02 PM

You can get the keycode of a key by running xev, then pressing the key. The output will be something like this:
KeyPress event, serial 28, synthetic NO, window 0x3400001,
root 0x115, subw 0x0, time 11656203, (411,455), root:(461,501),
state 0x0, keycode 95 (keysym 0xffc8, F11), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
Thank you kindly. Worked like a charm. It's the little things sometimes ...
FeeDawg