Subject: FVWM: Generating mouse-button click

From: David Kaasen <[email-masked]>
Date: Wed, 16 May 2001 12:59:13 +0200 (CEST)

Hello!

Is it possible to generate mouse button actions by pressing
a key, such as "Key F11   A  N MouseButton 2" ?
The CursorMove moves the cursor, but I cannot find any
function to press a button. This would make it possible to
use X-windows without a mouse (to a degree).

Thanks in advance,
David Kaasen.

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Wed, 16 May 2001 10:52:30 -0400

> use X-windows without a mouse (to a degree).

In the latest betas, you will find the FakeClick command.
It may help.  Generated mouse events are marked by X as synthetic
and may not be accepted by all applications.

There's also a mouse/buttons utility thats not part of Fvwm
whose name escapes me right now that turns the number keypad into
a mouse control.  Someone else might remember the name.

-- 
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Wed, 16 May 2001 13:48:08 -0400

> a mouse control.  Someone else might remember the name.

No, its not Flight Simulator.

How about this from the X11 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.

[thanks to Erik Fortune ([email-masked]), 6/96]

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 17 May 2001 10:57:03 +0200

On Wed, May 16, 2001 at 01:48:08PM -0400, Dan Espen wrote:
>...

I thought there was a reference in our FAQ, but I can't find it.
Is it possible that the corresponding paragraph was removed?

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Thu, 17 May 2001 08:02:49 -0400

> Is it possible that the corresponding paragraph was removed?

I wrote some Perl to go thru the FAQ revisions.  This was
removed with revision 1.21:

3.5  You can bind mouse movements to keystrokes, how about mouse
     presses?

A: Hm.  This one is a little tougher.  It could be done, but many
   programs ignore synthetic events, which is what would be generated.
   In X11R6.1 there is an extension (called XKBD?) which can do this,
   but I don't want to code to anything specific to one of the newer
   X11 versions like this.  You could try using Xse, which is a
   program to interface to XSendEvent, available at ftp.x.org.  It
   could probably be used in a simliar manner to xcb above (or in
   conjunction with it).  If anyone comes up with good examples for
   this, please send it to the fvwm mailing list for inclusion here.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 17 May 2001 14:14:45 +0200

>    this, please send it to the fvwm mailing list for inclusion here.

It won't hurt to put a reference to the X11 FAQ in our FAQ.

Bye

Dominik ^_^  ^_^