[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Can keyboard assignment use Windows key?
- Subject: Re: Can keyboard assignment use Windows key?
- From: Carl Distefano cld@xxxxxxxx
- Date: Mon, 10 Jan 2011 00:08:24 -0500
Reply to note from "Martin J. Osborne"
Sun, 09 Jan 2011 22:05:45 -0500
> Many thanks---this sounds like an interesting challenge! I'll
> see what I can come up with and report back.
I'll be interested to hear what you find. Over the weekend I played
with reconfiguring the Win key as PrintScreen/SysReq or Pause/Break,
then using one of these as a shifting key in XyWrite, but they were
non-starters as neither returns a key code in XyWrite (at least, not
in Xy4). I also tried reconfiguring Win key as Scroll Lock, but I
couldn't get the reconfigured Win key to issue a key code to XyWrite
(the expected key code is 70). All in all, a pretty frustrating
experience.
In the process, I did develop some XPL to reconfigure the Win key.
The routine below disables or re-enables one or both Win keys (then
quits XyWrite and reboots Windows), but it could easily be adapted
to reconfigure the Win keys as another (actual or virtual) key. It
should work in Win 2K, Win XP, and Win Server 2003 (tested
successfully here in XP Pro SP3). Do not use lightly -- it edits the
Windows Registry -- and if you do try it, it's recommended that you
back up the Registry first. (This is a widely-used Reg edit, and
should do no harm, but ... be forewarned.)
At the end of the day, I benefitted by getting around to something
I've been meaning to do for a long time -- disable the left Win key,
which I often hit by mistake while typing.
Good luck!
XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5disableWinkey*}} Disable|Re-enable Left|Right|Both Window
s Logo keys (Warning: Edits the Windows Registry!) [CLD rev.1
/8/11][cr|lf]{002};*;[cr|lf];*; Supported commands:[cr|lf];*
; DisableWinkeyLEFT[cr|lf];*; DisableWinkeyRIGHT[cr|lf];*; DisableWinkeyBOTH[cr|lf];*; Disa
bleWinkeyUNDO (Re-enables both Winkeys)[cr|lf];*;[cr
|lf]{<}PRAre you sure? (y|N){>}{<}IF@upr({<}RK{>})=="Y"{>};*;
[cr|lf];*;[cr|lf]{<}SX01,@upr({<}VA$FR{>}){>}{<}SV02,02{>};*;
[cr|lf]{<}IF{<}IS01{>}{240}"LEFT"{>}{<}SV01,00,00,5B,E0{>}{<}
EI{>};*;[cr|lf]{<}IF{<}IS01{>}{240}"RIGHT"{>}{<}SV01,00,00,5C
,E0{>}{<}EI{>};*;[cr|lf]{<}IF{<}IS01{>}{240}"BOTH"{>}{<}SV02,
03{>}{<}SV01,00,00,5B,E0,00,00,5C,E0{>}{<}EI{>};*;[cr|lf]{<}I
F{<}IS01{>}{240}"UNDO"{>}{<}SV02,-{>}{<}SV03,{>}{<}EI{>};*;[c
r|lf];*;[cr|lf]{<}SX50,{<}VA$ED{>}{>}[JM_]2.GetPath[Q2_]{<}SX
50,{<}IS50{>}+"\winkeys.reg"{>}{<}SX03,"Windows Registry Edit
or Version 5.00[cr|lf][cr|lf][HKEY_LOCAL_MACHINE\SYSTEM\Curre
ntControlSet\Control\Keyboard Layout][cr|lf]""Scancode Map""=
"{>}{<}IF{<}IS02{>}<>"-"{>}{<}SX03,{<}IS03{>}+"hex:00,00,00,0
0,00,00,00,00,"+{<}IS02{>}+",00,00,00,"+{<}IS01{>}+",00,00,00
,00[cr|lf][cr|lf]"{>}{<}LBa{>}[BX_]sa %03,{<}PV50{>}[Q2_][BX_
]wt[Q2_][BX_]dos/nv/x/z /c cmd.exe /c start regedit.exe /s {<
}PV50{>}[Q2_][BX_]p[Q2_][JM_]2.rebootwin[Q2_]{<}PRChange take
s effect after reboot{>}{<}EX{>}{<}EI{>}{<}SX03,{<}IS03{>}+"-
[cr|lf][cr|lf]"{>}{<}GLa{>}{<}EI{>}{<}PRNo operation{>}{002}[
cr|lf][cr|lf]{{;5rebootwin}} Quit XyWrite and Reboot Windows{032}
[CLD][cr|lf]{002}{<}PRQuit XyWrite and Reboot Windows? (y|N){
{062}}{<}IF@upr({<}RK{>})=="Y"{>}[BX_]es 1[Q2_]{<}SX50,{<}VA$ED{>
}{>}[JM_]2.GetPath[Q2_]{<}SX50,{<}IS50{>}+"\$reboot$.bat"{>}[
BX_]exist {<}PV50{>}[Q2_]{<}IF@not({<}ER{>}){>}[BX_]ernv {<}P
V50{>}[Q2_][BX_]wt[Q2_]{<}
EI{>}{<}SX01,"@echo off[cr|lf]%systemroot%\system32\shutdown.
exe -r -f -t 15"{>}[BX_]sa %01,{<}PV50{>}[Q2_][BX_]wt[Q2_][BX
_]dos/nv/x/z /c %systemroot%\system32\cmd.exe /c start {<}PV5
0{>}[Q2_];*;[cr|lf][BX_]quit/nv[Q2_]{<}EX{>}[cr|lf];*;[JM_]2.
finito[Q2_]{<}EX{>}[cr|lf];*;[JM_]2.xquit[Q2_]{<}EX{>}[cr|lf]
{<}EI{>}{<}PRNo operation{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE
--
Carl Distefano
cld@xxxxxxxx