Mousekeys: to point and click with the numerical keys instead of a mouse. Apparently it’s a feature of X, which once was enabled by default—but not anymore.
Luckily we can pretty easily enable and configure it, with a utility called xkbset.
To turn mousekeys on, then control the cursor as follows:
NUM 1, 2, 3, 4, 6, 7, 8, 9 Direction control NUM 5 Click – Switch to right click mode. Press 5 now to right click. / Switch to left click mode 0 (INS) Switch to select/drag mode. Now use direction control keys to select/drag stuff . (DEL) End select/drag (copied from http://abhijeetmaharana.com/blog/2007/08/31/mousekeys-on-ubuntu/)
To turn mousekeys off.
Personally I find the default configuration of mousekeys to be pretty slow (meaning moving the cursor across the screen takes a lot of time). The settings can be queried with:
These values can be changed by running
Those values work quite well for me. What every setting means and does on its own and how they work together didn't become fully clear to me even after a lot of fiddling. In the end I found the values 60 10 10 5 2 on some website (don't know which). Here is an explanation of each though.
Now there’s one more thing one will discover: after some timeout mousekeys will be turned off automatically. This can be very annoying, and needn’t be!
shows the timeout value and how this affects mousekeys (Upon Expiry Mouse-Keys will be: ..) By default this is Off, to set it to Unchanged run:
Well then, that covers what we need to know! Now to automate things I threw together a simple script that can be bound to some hotkeys in Openbox, which can then be used to toggle mousekeys on and off:
After finding all this out, I discovered that the mousekeys feature can also be activated by running:
After which it can be toggled by pressing Shift-NumLock. I didn’t find out how one can then change the default values without using xkbset though, so I stick to my script :) If the default values are right for you, adding this to your Openbox autostart would be the easiest solution. You’ll be stuck with the timeout too though…
I stumbled upon even other approaches, involving adding or changing files in /etc/X11 or somewhere else in the system files… if anyone knows about this, feel free to share your knowledge!
Couldn't resist a quick search... http://askubuntu.com/questions/149651/h … um-pad-key says:
Create a file /usr/share/X11/xorg.conf.d/90-enable-pointerkeys.conf, with contents:
Section "InputClass" Identifier "Keyboard Defaults" MatchIsKeyboard "yes" Option "XkbOptions" "keypad:pointerkeys" EndSection
That’s what I meant… still no clue as to how to change the default values without xkbset though.
- Howto: Linux Add or Remove a Linux Kernel Modules / Drivers
- How to test microphone with Audio Linux Sound Architecture ALSA
- How to display or show information about a Linux Kernel module or drivers
- Change Mod1 key to the Windows key in DWM config.h
- How to chroot into linux distro on disk when you can't boot via grub