From: iwona@Software.Mitel.COM (Iwona Hawrylak)
Newsgroups: comp.windows.x,comp.windows.x.motif
Subject: Accelerators, Key Bindings.
Date: 24 Dec 92 18:11:53 GMT
Organization: Mitel. Kanata (Ontario). Canada.

I'm working on 486 running Interactive UNIX, and Metrolink Motif.
The keyboard is the standard PC keyboard. I've  ran the "xev"
program (described in "X Window System User's guide" Volume 3)
and I found out the following:

 - the key labeled PgDn (and "3" above) has keycode 89 and
   keysym Next (0xff56)
 - the key labeled PageDown has keycode 134 and
   keysym Next (0xff56) 

I want to use those keys as menu button accelerators by specifying
the following modifier-keysym sequence:
  Alt<Key>Next

The problem is that this works for key labeled PgDn (keycode 89)
which is mapped to keysym Next, but it does not work for the key
labeled PageDown (keycode 134) which is also mapped to keysym Next.

Does anybody have any idea why is it happening this way?
What can I do to be able to use the Alt PageDown (keycode 134)
as an accelerator?

****************************************************************

I've searched all the literature I have to solve it. The only
thing that I think might have any influence are the Motif Virtual
binding (osf<keysym>). First of all I didn't find any osf... 
binding for Alt<Key>Next in XKeysymDB (which is by the way in hex 
code which is hard to understand) or in any of the widget's
translations, and I don't have any .motifbind file in my home
directory. But even if it would be somewhere, for example:
osfsomekeysym  : Alt <Key>Next
then I shoudn't be able to redefine it for the PgDn (keycode 89)
key either because it has the same keysym Next as key PageDown
(keycode 134).

More questions:
1. I cannot find the vendor-specific defaults for virtual bindings
   as mentioned in "Motif Programming Manual Vol 6" of O'Reilly &
   Associates, Inc. book page 786. Should I have one? Where would
   it be located.

2. In ...../motif/bindings directory there is a README file. There
   it says that I should copy one of the files containing bindings
   for specific keyboards to my home directory. But the only files
   that are there are sun_mit and sun_news files. There is no bindings
   file for PC keyboard. Do I need it? How do I get it?
   
3. In "Motif Programmer Reference" in Virtual Bindings man pages
   the format of the specification for mapping osf keysyms is
   described. It is also mentioned that as with event translations,
   more specific event descriptions must precede less specific
   descriptions. For example, an event description for a key with
   a modifier must precede a description for the same key without
   the same modifier. So for example:

   osfPageRight  : Ctrl    <Key>Next
   osfPageDown   :         <Key>Next

   With this definitions it works the following way:
     - if Ctrl<Key>Next is pressed the action defined for osfPageRight
       is executed.
     - if <Key>Next is pressed by itself or with any other modifier
       the action defined for osfPageDown is executed.
   How can I specify not to bind Alt<Key>Next to any osf keysym (for
   translations one could use "~" symbol in front of the modifier.
   
4. How to understand the format of ..../motif/lib/X11/XKeysymDB file
   and is it a some kind of default that the X server reads?

5. When I ran "xev" or "xmodmap -pk" programs I can see what are the
   current keycode-keysym bindings. Where are they read from?

I would really appreciate some help.
Thanks,
Iwona
-- 
***********************************************************************
Iwona Hawrylak	 Mitel Corp.		    iwona@Software.Mitel.COM
(613) 592-2122	 350 Legget Drive, Kanata   ...uunet!mitel!spock!iwona
ext. 3043	 Ontario, Canada, K2K 1X3
Newsgroups: comp.windows.x