remapping the apple & enter keys to act as mouse buttons in Linux
Posted by notKlaatu , 04 March 2008 · 102 views
remapping the apple & enter keys to act as mouse buttons in Linux This definitely works on my iBook G4 running Fedora 8. Some slight variation may be necessary for a Debian system but the idea is the same. My Slackintosh partition had this functionality turned on by default...but then again, by the time I installed Slackintosh I knew enough to be VERY careful about what keyboard to choose during installation. The iBooks have a single button below the trackpad. The Linux system was designed with the expectation that there are at least two, if not three, mouse buttons present. A good way to adapt to this is to remap the right Apple key and the small Enter key next to it to become the middle and right mouse buttons. It's not an absolute necessity but it is helpful since many functions in the Gnome desktop are easiest to access with a right click, and certainly in Blender it is very much a necessity. To remap keys in Fedora: # cat >>/etc/X11/Xmodmap keycode 108 = Pointer_Button3? keycode 116 = Pointer_Button2? then hit control-d twice to commit the cat. This adds the modifications to the Xmodmap. Log out and log back in and the change should take effect. If not, try a reboot. If you can't be bothered to reboot at the moment, or you just need to enable the modification temporarily and would rather not have it in the Xmodmap forever, you can run it on a per-session basis by simply typing: $ xmodmap -e "keycode 108 = Pointer_Button3" $ xmodmap -e "keycode 116 = Pointer_Button2" That's it. Now the right Apple (aka Command) key will be your middle mouse button and the Enter key next to it is the right-button. If you try this and it doesn't work, hold down the "fn" key when you hit the Apple or Enter key, and it should work just fine.