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

Re: Can extra keyboard keys execute shell commands?

On Sat, Apr 14, 2001 at 04:40:47PM -0700, brandtd@linuxfreemail.com wrote:
> Just curious .... anyway that I can assign a key on my keyboard (I 
> already know how to name and map the keys) to execute a command?  
> If you want tu know, I'm know using XFree86 4.0.2 and
> Window Maker

Yup.  The easiest way I know to do it is to have your window manger
handle it.  That's because it's already listening to all the keyboard
events that come in from the X server.  It is possible that there are
other, WM independent programs out there to do it, but I don't know of

In any case, you will need to edit your Window Maker menu.  That's made
a bit difficult (impossible?) if you're running the Debian generated
menus.  If you're not, the the following (taken from
~/GNUstep/Library/WindowMaker/menu) will help:

 * Syntax is:
 * <Title> [SHORTCUT <Shortcut>] <Command> <Parameters>
 * <Title> is any string to be used as title. Must be enclosed with " if
 *      has spaces
 * SHORTCUT specifies a shortcut for that item. <Shortcut> has the
 * same syntax of the shortcuts key options in the 
 * $HOME/GNUstep/Defaults/WindowMaker file, such as RootMenuKey or

I've got a MS Natural Pro keyboard with "Internet keys".  Using the
Window Maker shortcuts I've set up the "Sleep" key to run xlock, another
key to hide all the windows except that which currently has focus, and
another to unhide all windows.  I've still got several more keys, but I
don't know what to do with them.  8^)


| Web: http://web.morgul.net/~frodo/
| PGP Public Key: http://web.morgul.net/~frodo/mail.html 

Attachment: pgpDF9x3D6U1_.pgp
Description: PGP signature

Reply to: