From owner-ntemacs-users@june Wed Dec 4 13:08:06 1996 X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] [nil "" " 4" "December" "1996" "14:36:21" "-0600" "Shane Holder" "holder@mordor.rsn.hp.com" nil "43" "Re: Re[2]: problem with caps/ctrl swap on NT 4.0" "^From:" nil nil "12" nil nil nil nil] nil) Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id NAA12889 for ; Wed, 4 Dec 1996 13:08:06 -0800 Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id NAA30887 for ; Wed, 4 Dec 1996 13:08:05 -0800 Received: from palrel1.hp.com (palrel1.hp.com [15.253.72.10]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with ESMTP id MAA09089 for ; Wed, 4 Dec 1996 12:30:35 -0800 Received: from mordor.rsn.hp.com (mordor.rsn.hp.com [15.99.150.126]) by palrel1.hp.com with ESMTP (8.7.5/8.7.3) id MAA01588; Wed, 4 Dec 1996 12:30:27 -0800 (PST) Received: (from holder@localhost) by mordor.rsn.hp.com (8.7.1/8.7.1) id OAA16403; Wed, 4 Dec 1996 14:36:22 -0600 (CST) References: <9611038496.AA849638009@cccpp.com> In-Reply-To: "Jeff McCarrell"'s message of Tue, 03 Dec 96 10:30:02 pdt Message-ID: Lines: 43 X-Mailer: Red Gnus v0.66/Emacs 19.34 From: Shane Holder To: "Jeff McCarrell" Cc: cmcmahan@Teknowledge.COM, Jonathan Payne , ntemacs-users@cs.washington.edu Subject: Re: Re[2]: problem with caps/ctrl swap on NT 4.0 Date: 04 Dec 1996 14:36:21 -0600 Found this on the net somewhere. Add this value: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\KeyBoard Layout\Scancode Map It's a binary value that lets you map keystrokes in the low-level keyboard drivers in NT. As a result you don't have to worry about applications bypassing mappings that you've done at a higher level (i.e. it just works). Here's the format of the value: DWORD: 0x00000000 header DWORD: 0x00000000 header DWORD: length (in DWORDs) of remaining data, including terminating DWORD DWORD: mapping 1 ... DWORD: mapping n DWORD: 0x00000000 terminating null DWORD Each mapping DWORD has two parts: the input scancode, and an output scancode. To map scancode 0x1d (left control) to scancode 0x3a (caps lock), you want a value of 0x003a001d. Note that this does not swap the keys. Using just this mapping value, both the left control and the caps lock key will behave as caps-lock. To swap, you also need to map 0x3a to 0x1d, using 0x001d003a. So, the complete registry value you'd use to swap left-control and caps-lock is: 00 00 00 00 00 00 00 00 03 00 00 00 1d 00 3a 00 3a 00 1d 00 00 00 00 00 This works on NT 4.0, I don't know about 3.51. This registry value is system wide, and can't be made user-specific. It also only takes affect on reboot. -- Shane Holder e-mail: holder@rsn.hp.com Hewlett Packard phone: (214)497-4182 3000 Waterview Never underestimate the bandwidth Richardson, TX 75083 of a truck moving at 70 MPH.