A couple of weeks ago I posted a question asking how to turn the NUM LOCK
key on and program the function keys at boot time or on starting Openwindows.
I got some requests for a SUMMARY from this list but I did not have an answer
at that time on turning on the NUM LOCK key.
After talking to SUN tech support I got the following that I would like
to share with you.
--> Included message
The *state* of a Num_Lock modifier (or any modifier) can only be
altered by user action, not X client requests.
However, the problem you describe above lends itself nicely to the
simple solution of just mapping the keypad keys such that the only
possible interpretations are numeric. Presto! - global and permanent
"Num_Lock".
Run "xmodmap -pk | grep KP_ >some_file". Edit the file (.xmodmaprc
might be a good choice for the name) to change the lines to xmodmap
expressions that eliminate non-numeric keysyms from the mappings
(you can also eliminate any lines where the mapping is already numeric
keypad only), e.g.:
75 0xffd8 (F27) 0xffd8 (F27) 0xffb7 (KP_7) 0xff50 (Home)
becomes:
keycode 75 = KP_7
Then modify the .xinitrc or .xsession file to invoke "xmodmap .xmodmaprc".
(BTW, newer versions of xmodmap have a "-pke" option that makes this a
little easier.)
-- End of included message.
Enjoy
-- Osvaldo Gold, Apex Voice Communications
-- osvaldo@apexvoice.com
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:10 CDT