> I am wondering if some more knowledgeable can tell me exactly how
> would I go about binding the window and menu keys to something in
> emacs (ran under X of course).  According to what I can find, those
> keys would be bound with [lmenu] and [rmenu] but I don't what to do in
> the X setup/config files.

OK, first you have to make sure your X server sees the keys.  In
brief, XFree86 works, and none of the others seem to (I spent a long
time trying to make Metro-X work but the server just wouldn't do it).
I have no clue about AccelX or SUSE.  The ACID TEST is to use "xev".
If "xev" does not register an event when you press those three keys,
don't even bother trying to move forward.

If anyone tells you you need to play around with commands like
"loadkeys", "dumpkeys", and "showkey", don't listen to them because
that won't help you one iota inside X.  Trust me on this.

The next step is to set up your keysyms.  Here is what I put in my
XKeysymDB (you can use whatever names you want, of course):

XF86Win_Left            :1008FF02
XF86Win_Right           :1008FF03
XF86Win_Menu            :1008FF04

Third step is to bind the keysyms to the keyboard events using
"xmodmap".  You can run the commands manually:

xmodmap -e "keycode 115 = XF86Win_Left"
xmodmap -e "keycode 116 = XF86Win_Right"
xmodmap -e "keycode 117 = XF86Win_Menu"

Now go back and run "xev" to see if the new names show up when you
press the keys.

To install the xmodmaps permanently you have to put those commands
into one of the X setup files.  You can probably get away with putting
them in your ".Xinitrc" or whatever else you use.  $HOME/.Xmodmap
should also work.

Once you've done this you should be able to bind keys in emacs.  This
is from my .emacs (don't know about lmenu or rmenu):

(global-set-key [XF86Win_Left] 'execute-extended-command)
(global-set-key [XF86Win_Right] 'execute-extended-command)
(global-set-key [XF86Win_Menu] 'execute-extended-command)

Feel free to email me if you need more help.  Be prepared to tell me
what server, what version of the sever, and what window manager you
are using.

HTH.

-- 
+--------------------------------------------------------------+
| Richard S. Smith / [EMAIL PROTECTED] / http://www.idiom.com/~rss |
| Progress DBMS Stuff: http://www.idiom.com/~rss/progress.html |
+--------------------------------------------------------------+


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to