home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso
/
altsrc
/
articles
/
7000-7999
/
7330
< prev
next >
Wrap
Text File
|
1993-02-16
|
5KB
|
104 lines
Newsgroups: comp.sources.games.bugs,alt.sources,alt.sys.sun
Path: wupost!howland.reston.ans.net!agate!doc.ic.ac.uk!pipex!pavo.csi.cam.ac.uk!ioas09.ast.cam.ac.uk!dcr
From: dcr@mail.ast.cam.ac.uk (Derek C. Richardson)
Subject: Num_Lock hack for Sun OW & X11
Message-ID: <1993Feb16.163508.621@infodev.cam.ac.uk>
Keywords: numlock keypad sun openwindows x11
Sender: news@infodev.cam.ac.uk (USENET news)
Nntp-Posting-Host: ioas09.ast.cam.ac.uk
Reply-To: dcr@mail.ast.cam.ac.uk
Organization: Institute of Astronomy, Cambridge
Date: Tue, 16 Feb 1993 16:35:08 GMT
Lines: 89
Xref: wupost comp.sources.games.bugs:1361 alt.sources:7330 alt.sys.sun:11277
Here's a bit of a hack for those of you running OpenWindows or X11 on
a Sun who want the Num_Lock key to give the expected behaviour. In the
appended uuencoded compressed tar file there is a csh script called
"xnumlock" that toggles between "xmodmap" reads of the two supplied files
"numlock_on.map" and "numlock_off.map". Unfortunately, two invocations
of "xmodmap" seem to be required: one to get the current state and the
other to toggle it. This makes the script a bit slow (1-2 seconds on an
IPX), but it's worth it. If anyone can figure out a faster way to do
this, please post!
Those of you lucky enough to be using tcsh and xterms can actually program
the Num_Lock key to invoke xnumlock automatically! (What a concept!...)
First you need a "dummy" keysym for the Num_Lock key, one that gives a
recognizable code to tcsh. One example would be the "F" keys, say "F2".
So in your .xinitrc put in a line like:
xmodmap -e "keysym Num_Lock = F2"
then somewhere in your .tcshrc file:
bindkey -s "^[[12~" "xnumlock\n"
(assuming xnumlock is in your path). Unfortunately, OW cmdtools seem to
ignore the F keys, but it will work in an xterm. Give it a try!
This version of "xnumlock" replaces the earlier version I posted on
comp.sources.games.bugs, which altered the numeric keypad behaviour for
the duration of the session. The new version lets you toggle back and
forth. Note that as before, xnumlock immediately affects all xterms and
"true" X applications, but not OW applications. For the latter (e.g.
cmdtools), you must invoke xnumlock BEFORE starting the application.
To unpack this post, extract to a file called xnumlock.tar.Z.uu (for
example) and type:
uudecode xnumlock.tar.Z.uu
zcat xnumlock.tar.Z | tar xvf -
Note that the "map_path" variable defined at the beginning of the script
should be set to wherever you put the two .map files.
Derek
-----------------------------------------------------------
| Derek C. Richardson | Tel: (0223) 337548 x 37501 |
| Institute of Astronomy | Fax: (0223) 337523 |
| Cambridge, U.K. | |
| CB3 0HA | E-mail: dcr@mail.ast.cam.ac.uk |
-----------------------------------------------------------
begin 644 xnumlock.tar.Z
M'YV0>-S4:</FS9@U !(J7,BPH<.'$"-*G$@1 (B+-VK4 &'Q8HP8-SA>!/$Q
M9,>1'F/,B'&QQ@P:,&3$B#ES9 T;-VA8K,BSI\^?0(,*'4JTJ-&C2),JG3@B
MQ LQ:=R\,'#8@69A2,T HBX,""!Z^V $%DB!00.6:TB-DBA@VM7.>,D9,&
M#AT0=-[@?7/F#)LR(,2401/&3IHW=>2 >&,&Q)0Z;D#0 "&P31FZ8T"L*9,'
M3A@R<.>4N0MVS1?&C7N $('"B P:*40H$$W:H.DWD56S7@+E2Y$X=<*PB3U[
M-(@V8>!\\4S'JNH7:-Y8CO&"S-P75>BD8?."31HQ+[P2M TW36,4)$:$D7/&
M#H@0JF&DP(NFC!L%"<J,B;ZZRIPP9Y2A0U>5E897&)O-09E>ZYTQD'UTS.&"
M;/GAD<9=,2A@'QGFA68<'67,<9=J8.#1QAMD( ?'57"L 0(?((1QAXLG[&$>
M".BQU(-J-<@P'QQTN7$7"3/T<0(8Y9U' H@B@K C""24=IH99LS7G'WXF8BB
MBE"JN%P8S;U0H&VGN>&"BOCIQY\3 WW!A&TQCJ&='6"6088+&K(A&@@WHL?D
MB*I%229N5M9W7P):IIA<E\E]&>:8!TUIQIG)I;F?7FRVX2:<9)01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