Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!ut-emx!walt.cc.utexas.edu!erlkonig From: erlkonig@walt.cc.utexas.edu (Christopher North-Keys) Newsgroups: comp.windows.x Subject: Re: International Keyboards and Modifier Combinations Keywords: lock, keyboards, shift, X Message-ID: <28037@ut-emx.UUCP> Date: 11 Apr 90 21:56:43 GMT References: <5567@scolex.sco.COM> Sender: news@ut-emx.UUCP Reply-To: erlkonig@walt.cc.utexas.edu (Christopher North-Keys) Organization: Packaging/Interconnect, M.C.C. Lines: 49 /----[mikep@sco.COM (Mike Patnode) The Santa Cruz Operation, Inc.] | I'm also interested in dealing with Lock keys other than Shift/Caps | Lock. Particularly, the NumLock key on a PC/AT keyboard as well as | other locking modifier keys. Caps Lock seems to be sort of hacked into | X without any provisions for other "locking" keys. The solution looks clear to me --- code a "soft-lock" or "polylock" key the applies to whichever set of modifiers is depressed when the softlock is struck. You could probably do this with a small X program; I don't think an extension would be necessary, but I not that deep in the source yet. More specifically, if: {M==meta, S==shift, L==lock, [xX]==any char, ^==up, v==down}, then the sequence: XvX^ Sv LvL^ Sv XvX^ XvX^ Sv^ XvX^ should produce the output: xXXx Also: Sv Lv^ S^ ... shift-lock (caps) set Sv Lv^ S^ ... Sv^ ... caps set, then unset Sv Mv Lv^ S^ M^ ... Mv^ caps and meta locked, then meta unlocked Lv^ all soft-locks cleared The implementation would need to track the shifted states for (say) Meta, Control, Upper(case/numeric), Super, Hyper, Greek, etc. Such a list could validly be a dozen or more long, and should indicate: state 0> unset, awaiting shift-down state 1> set, shift-down has been seen, but no shift-up yet. state 2> lock+, lock was seen while shift set, ignore next shift-up. state 3> lock, lock and shift up seen, next shift-down triggers state 1. The implementation could use a simple state transition table, and might be best coded externally from the kernel. Just thinking... ------------------------------------/\---------------------------------------- Seo: Harp[@Mcc.Com] / \/\ ^*^ Christopher North-Keys Tha mi gu trang a'cluich. / \ \ Assoc. Systems Analyst, MCC --------------------------------(disclaimer)----------------------------------