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

Re: Can a keyboard pretend to be a mouse?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 5 Feb 1999 10:15:43 -0500 (EST), servis@purdue.edu wrote:

>>>I'm looking for a bit of software that'll let me use a combination of
>>>key strokes (in X) where a mouse is called for.  Numberpad '6' moves
>>>pointer to the right; '5' simulates a click -- that kind of thing.
>>     X does this already.

>I'm sorry but how about giving some pointers on how to make this
>happen. A quick search didn't turn up any docs on this.

- From the X Window System FAQ:
Subject:  36)! How can I control the mouse with the keyboard?

If you have the X Keyboard (XKB) Extension, you can enable mouse keys, which
makes it possible to generate mouse motion and button events using the
keyboard.  Events generated by MouseKeys are completely transparent -- they
will work with any application that connects to a server that has the X
Keyboard Extension, regardless of whether the application itself uses XKB.

XKB is enabled by default in X11R6.1.

First, set up the Num Lock key so that Shift+Num_Lock toggles mouse
keys:

xmodmap -e "keysym Num_lock = Num_Lock Pointer_EnableKeys"

(XFree86 3.1.2E is based on R6.1 and has the X Keyboard Extension; it also
has a binding to Pointer_EnableKeys in its default keymap.  You use
Alt+Shift+Num_Lock to toggle MouseKeys on and off.  If you are using an
earlier release of X or XFree86, you won't have XKB and the instructions
will not work. See http://www.XFree86.org/FAQ for more information.)

You might also have to turn off server num lock for this to work. Now press
"Shift+Num_Lock" to enable MouseKeys.  When MouseKeys are on:

o)   The keypad arrow keys move the pointer
o)   The keypad '5' key behaves like the 'default' pointer button
o)   The keypad '0' key locks the default pointer button (for easy
dragging)
o)   The keypad '.' key unlock the default pointer button (to release a
drag)
o)   The keypad '+' key double-clicks the default pointer button.
o)   The keypad '/' key sets the 'default' button to Button1
o)   The keypad '*' key sets the default button to Button2
o)   The keypad '-' key sets the default button to Button3

This is the default configuration, but the mechanism allows for nearly
infinite configurability. 

- -- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
- -------------------------------+---------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: PGPsdk version 1.0 (C) 1997 Pretty Good Privacy, Inc

iQA/AwUBNrtXjHpf7K2LbpnFEQKeUQCeORToAQUr8AZdgdFNcmP9t/p/9SwAoOwY
DEDgUjhOO33sRxDEP0G+rca8
=DBbC
-----END PGP SIGNATURE-----



Reply to: