Re: FVWM: Binding 3 mystery keys

From: stu <swl_at_ucs.co.za>
Date: Wed, 18 Feb 2004 12:54:24 +0200

On Tue, 17 Feb 2004 11:10:16 +0100
Dominik Vogt <fvwm_at_fvwm.org> wrote:

> On Tue, Feb 17, 2004 at 10:36:31AM +0200, stu wrote:
> > Hi everyone
> >
> > I'm running fvwm 2.5.8, XFree86 4.3.0, Debian unstable.
> >
> > I have a 106 key keyboard. There are 3 keys(top row, to right of
> > function keys) which I wish to bind. There appears to be no entry in
> > /usr/include/X11/keysymdef.h for any of these keys. The keys have
> > symbols on them - my interpretation of them is that they represent
> > a 'No lock' key, a 'sleep' key (symbol of a moon) and an 'alarm'
> > key.
> >
> > Does anyone have any advice as to how would I go about getting the
> > Keyname of these keys(or creating ones) so I could then bind them to
> > my desired functions?
>
> According to the xev output below, they have no names attached to
> them yet. To be able to bind anything to them, you need to assign
> KeySyms to them first. You can use xkeycaps to find a keyboard
> layout that activates them and then let it generate an Xmodmap
> file for it. Or you can do that manually with the xmodmap
> command.
>
> > The output of xev for these keys gives the following(besides the
> > headings in single quotes) :
> >
> > 'No lock key'
> >
> > KeyPress event, serial 29, synthetic NO, window 0x1800001,
> > root 0x8d, subw 0x0, time 2218910772, (576,439), root:(583,472),
> > state 0x0, keycode 222 (keysym 0x0, NoSymbol), same_screen YES,
> > XLookupString gives 0 bytes: ""
> >
> > 'Sleep key'
> >
> > KeyPress event, serial 29, synthetic NO, window 0x1800001,
> > root 0x8d, subw 0x0, time 2218916146, (576,439), root:(583,472),
> > state 0x0, keycode 223 (keysym 0x0, NoSymbol), same_screen YES,
> > XLookupString gives 0 bytes: ""
> >
> > 'Alarm key'
> >
> > KeyPress event, serial 29, synthetic NO, window 0x1800001,
> > root 0x8d, subw 0x0, time 2218917875, (576,439), root:(583,472),
> > state 0x0, keycode 227 (keysym 0x0, NoSymbol), same_screen YES,
> > XLookupString gives 0 bytes: ""
> >

Thanks for all the suggestions, everyone. For anyone who may be
interested, I created a .xmodmaprc file in my home directory containing:

keycode 222 = F33
keycode 223 = F34
keycode 227 = F35

I had to use F33, F34 and F35 (my keyboard doesn't have them) as xmodmap
complained if I used a keysym name that wasn't in keysymdef.h - I'm not
sure if it's safe to add my own entries to keysymdef.h. I've added

xmodmap .xmodmaprc

to my .xinitrc, and bound the above keys to some handy xmms functions.
It all works like a charm!
 
> Ciao
>
> Dominik ^_^ ^_^

Cheers
-- 
Stuart Logie
Programmer
UNIVERSAL COMPUTER SERVICES (PTY) LTD
A member of South Africa's largest retail software vendor, the UCS Group
Tel : (011) 712 1371   Cell : 082 902 5632
Fax : (011) 339 3421
Internet : http://ucs.co.za
"I am the Unconquerable Spirit."
               -- Poet Unknown
   
Powered by Debian GNU/Linux - testing/unstable


--
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 Wed Feb 18 2004 - 04:57:15 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:56 BST