In comp.windows.x, Spiros Bousbouras <
spi...@gmail.com> wrote:
> I have a Cherry QWERTY keyboard which has the usual keys and some unusual
> ones which include a key with a calculator symbol on it. I will be referring
> to this as CalcKey. CalcKey doesn't do anything as a default so I decided to
> experiment with making it do something. xev says that it has keycode 161.
> After some experiments where I wasn't getting exactly what I was expecting ,
> I decided to make CalcKey reproduce precisely the behaviour or a preexisting
> key , in particular the following line from the output of xmodmap -pke :
>
> keycode 19 = 0 parenright braceright degree braceright degree
My xmodmap manpage says up to eight keysyms can be assigned to a keycode
but "the last four are not used in any major X server implementation."
This may be a case of the documentation being out of date.
> The specific key (which is the common 0 key on top of a QWERTY keyboard)
> produces
>
> No modifier 0
> Shift )
> Control 0
> Alt ° (degree symbol , code 176 in ISO-8859-1)
> AltGr }
>
> (My keyboard also has 2 keys with the MS Windows logo but I don't know if
> these count as modifier keys. They don't seem to modify the output of any
> key but xev says they are Super_L and Super_R .Anyway , they are not
> very relevant to this question)
The xev output is telling you, yes, those are modifiers.
> So I did
>
> xmodmap -e 'keycode 161 = 0 parenright braceright degree braceright degree'
>
> Now CalcKey gives
>
> No modifier 0
> Shift )
> Control 0
> Alt ° (degree symbol , code 176 in ISO-8859-1)
> AltGr 0
>
> Note the difference with what the 0 key produces. So do you have any
> explanation as to what is happening ?
I don't know, but I suspect that something is happening on a different
layer than xmodmap operates.
> And some related questions : can I give xmodmap an octet to output ? For
> example
Use Uxxxx for four digit Unicode codepoints or Uxxxxxx for six digit
Unicode codepoints.
> Which Xlib man pages should I look at to understand the mechanisms
> involved at a deeper level ? In particular which Xlib function
> does xmodmap use to edit the modifier map ? XRebindKeysym() only
> modifies what's happening for the application which called it.
I can't say for sure. I'd start looking at the source for xmodmap and
xev for changing them and looking up them. I know I have seen xev
versions that can look up modifiers and keysyms for keyboard events.
Elijah
------
has modified xev for personal use in the past