ratpoison-devel
[Top][All Lists]
Advanced

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

[RP] X11, keyboards and mice: the full story.


From: twb
Subject: [RP] X11, keyboards and mice: the full story.
Date: Sun Jul 6 04:12:13 2003

Quoth Joe Corneli <address@hidden> on or about Sat, 05 Jul 2003 20:22:21 -0700:
> --mouse stuff--

Yes, X11 definitely supports mouse-from-keyboard internally.  

On my X, pressing S-<NumLock> toggles mousekeys on the  numeric
keypad.  If you  want to remap  keysyms using XModmap, refer to
$X11R6/include/X11/keysymdef.h, codes 0xFE70 to 0xFEFC for the sym
names.

Here's the default mapping:

(keypad buttons)
7/8/9 = NW/N/NE
4/6   = W/E
1/2/3 = SW/S/SE

5 = one click (or release)
0 = drag
addition = double click
division = set button to 1
multiplication = set button to 2
subtraction = set button to 3

I'm not sure if it's possible to access mouse-4 and -5 (scrollup/dn).

You can only  use the mouse keysysms when  MouseKeys_Enable is toggled
on :(

The alternative is to cut up a mouse and glue the hardware to the side
of your keyboard, which I nearly did :)

It's not very  useful for xterm-cutbuffer copy/paste, because the 
default   acceleration  and  speed  are   lethargic.   I  haven't
investigated how to change them.

BTW, does anybody  know how to change emacs  font (while it's running)
without doing S-<mouse1>?

>Maybe this thing  in combination with the source  code for xclip will
>get me  going on an  app that  will help. But  I don't think  this is
>really  the best  way to  go.   My primary  interest here  is not  in
>controlling the  mouse with the  keyboard: instead I want  to control
>the  disposition of the  text cache  that is  interfaced with  by the
>mouse.

The word for this cache is ``Cut Buffer''.  There's probably a section
in XLib  on it.   There are actually  three(?) buffers, and  there has
traditionally  been argument  about  how they  work  (NETWM sorted  it
out?).

It really has nothing to do with  the mouse, that's just the way X11 /
xterm manipulate it by default, since keybindings inside xterm tend to
be used up by the shell.  You may be able to change xterm specifically
inside  your .Xdefaults file  somewhere.  Emacs  by default  (i think)
doesn't use  X's cutbuffers (instead  just keeping it's  internal copy
ring).  You need to troll through customize-apropos for that.

GTK+ used to use  C-x = cut, C-c = copy, C-y or  C-v = paste.  In GTK2
this is configurable (see  /usr/share/themes/emacs).  I'm not sure how
other  widget sets interface  with the  cutbuffers, and  programs in
pure XLib could do anything.

Quoth Shawn:
>...that encourages rat use and  discourages keyboard use, and I wanna
>use it by  moving the the rat with the keyboard.  How about finding a
>program that does what XYZ does but with the keyboard?

I  myself use  emacs' M-x  shell for  anything  requiring cut/pasting.
xterm isn't really good for interclient comms.

-trent



reply via email to

[Prev in Thread] Current Thread [Next in Thread]