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
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)
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 ?
And some related questions : can I give xmodmap an octet to output ? For example
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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 353 |
Nodes: | 16 (2 / 14) |
Uptime: | 83:53:35 |
Calls: | 7,639 |
Files: | 12,802 |
Messages: | 5,691,861 |