On Thu, Jan 23, 2003 at 03:04:54AM -0000, terry_z wrote:
> hi there.
>
> thank you for your help.
> I try this config. now I can start FVWM without mouse. and use
> keyboard function key instead of mouse device. but there is a
> problem. how can I use the keyboard function key instead of the
> left button and right button of the mouse?
The XKB X server extension allows to bind mouse events to the
keyboard. Q 3.5 in our FAQ has a short description of that
feature:
----------------------------------------------------------------------
3.5 You can bind mouse movements to keystrokes, how about mouse
presses?
A: Although fvwm has commands for binding movements to keystrokes,
controlling the pointer with the keyboard should really be handled by
the X server. The following is an excerpt of the X FAQ on this topic:
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 (erik_at_westworld.engr.sgi.com), 6/96]
----------------------------------------------------------------------
Personally, I have this in my $HOME/.Xmodmap:
keycode 0x73 = Pointer_Button3 Pointer_Drag3 Super_L
keycode 0x74 = Pointer_Button2 Pointer_Drag2 Super_R
keycode 0x75 = Pointer_Button1 Pointer_Drag1 Pointer_EnableKeys
This binds button 1 to the "menu" key on my keyboard (one of those
pesky Micro$oft keys), Button 2 to the left windoze key and
button 3 to the right one. Dragging with a button is a bit more
complicated. You have to press Shift-<key> to start dragging,
then Shift-<key> again to stop dragging.
What is really annoying about this feature is that the button
emulation times out every few minutes and you have to enable it
again by pressing RightAlt-menukey. To enable it permanently, you
need some external program, but I do not remember how it is
called.
> >----- Original Message -----
> > From: Dominik Vogt <fvwm_at_fvwm.org>
> > To: terry_z <terry_z_at_hklc.com>,fvwm <fvwm_at_fvwm.org>
> > Sent: Wed, 22 Jan 2003 10:28:34 +0100
> > Subject: Re: FVWM: can I start FVWM without mouse device?
> >
> > On Wed, Jan 22, 2003 at 07:00:30AM -0000, terry_z wrote:
> > > hi there.
> > > I have a problem.
> > > can I start the X without mouse device?
> >
> > Yes, you can. It will be difficult to use some applications, but
> > fvwm does quite a good job without the mouse.
> >
> > The mouse can also be emulated with the keyboard, but it is tricky
> > to set it up. See question 3.5 in the fvwm FAQ. If you have
> > trouble setting it up, I can post the relevant parts of my config.
> >
> > Next, you will want to be able to change the keyboard focus
> > without the mouse. I have this in my config file:
> >
> > Style * SloppyFocus
> >
> > Key Left A M Direction West (!Iconic, CurrentPage) RaiseAndWarp
> > Key Right A M Direction East (!Iconic, CurrentPage) RaiseAndWarp
> > Key Up A M Direction North (!Iconic, CurrentPage) RaiseAndWarp
> > Key Down A M Direction South (!Iconic, CurrentPage) RaiseAndWarp
> >
> > AddToFunc RaiseAndWarp
> > + I Raise
> > + I WarpToWindow $[cw.width]p $[cw.height]p
> >
> > But you may be better off using ClickToFocus. Use
> >
> > Style * ClickToFocus
> >
> > instead of SloppyFocus and replace the "WarpToWindow" with
> > "Focus":
> >
> > AddToFunc ...
> > + I Raise
> > + I Focus
> >
> > With this, you can press Alt-<sursor key> to change focus to the
> > next window in the direction you pressed.
> >
> > Additionally it may be a good idea to bind pointer movement to
> > keystrokes:
> >
> > Key Left A SC CursorMove -1p 0
> > Key Right A SC CursorMove +1p +0
> > Key Up A SC CursorMove +0 -1p
> > Key Down A SC CursorMove +0 +1p
> >
> > Shift+Control+<cursor key>: move cursor by one pixel.
> >
> > Key Left A CM CursorMove -1 0
> > Key Right A CM CursorMove 1 0
> > Key Up A CM Cursormove 0 -1
> > Key Down A CM Cursormove 0 1
> >
> > Alt+Control+<cursor key>: move cursor by one percent of page size.
> >
> > If you do not even want the pointer, I guess all you have to do is
> > to remove the line
> >
> > InputDevice "Mouse0" "CorePointer"
> >
> > from the ServerLayout section in the XF86Config file. On my
> > system it is found in /etc/X11/XF86Config-4. But I don't
> > recommend this as you will be in trouble should you ever encounter
> > an application that requires the mouse for input.
> >
> > Finally, you may want to try the "unclutter" program (no idea
> > where to get it). It hides the mouse pointer after a configurable
> > time of inactivity.
Bye
Dominik ^_^ ^_^
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Thu Jan 23 2003 - 02:35:57 GMT