Monday 23 May 2016

Disable Caps Lock in Windows - Without hacking and without Registry Editing!

I'm back from tinkering, trying to help some poor unfortunate souls... Like old64goat, whom advise removing the caps lock key as a way to stop it operating... And then Lloyd here has actually broken his keyboard, and recommends you take your key off... Guys, if you remove your caps-lock key, all you have is a BROKEN KEYBOARD!

So, just calm down, calm down, everything will be okay, I'm going to explain everything to help you out... Lloyd, the "noise" thing... I cover that... And to all, read on, because there is of course a better solution.

I'm not saying this is an easier solution, because it's not, it's complex and all about configuring software, but there are No HACKS!  No Hammers! And No Needle Nosed Pliers required!

Best of all however, your keyboard can remain fully functional, other people can come and use your machine without being absolutely frustrated at your having acted like some kind of keyboard mohel.

Before I start however, I'd like to shout out to vwestlife as he pointed this one out, and I recently caught up with all this very interesting coverage and made me aware of this world of keyboard destruction.

The Video
From my live stream of the 23rd May 2016... Read the full solution below, this video is very rough & ready...


Unacceptable Sound Solution
So, what can you do to sort his problem out?... Go down to the start menu and type just the word "Keyboard" without any ENTER key, just the word and watch what comes up...


I've highlighted the first and simplest one which can help with the caps lock problem...

"Change How Your Keyboard Works"

Now, if you're not a touch type-expert and are constantly looking down at your keyboard, rather than at the screen, this can really help you hear if you've hit the caps-lock key... Lloyd, that's for you!

Simply go into that option and turn on the  option to hear a tone whenever the caps-lock key is pressed, now if you have speakers, or headphones on, you can hear a passing impression of an old Pong machine whenever you press the caps-lock key!!!


However, that just might drive you stark raving mad after a while, and since Lloyd posted his rant in 2009, I'm sure he's pretty much sick to his hind teeth of his machine beeping like this, if he ever found this solution out.

Unacceptable Horrible Hackery Solutions
And as I made mention, there are horrible, trickster hackery tricks to go into the bowels of the Windows Registry and unmap the caps lock key, however, this pretty much going to do the same as taking the key off, but worse, because it's removing the functionality for all users, and unlike with pushing the key back on, there's not a quick and simple way to undo the change!

Plus some applications you do actually need the caps-lock key!

DO NOT HACK, DO NOT HAMMER, DO NOT PRY YOUR KEYS!

Acceptable Solution
There is a much better, though more complex, software solution... If you go back to the start menu and now type "region", you'll be able to see "region & language"...


Selecting it opens this box:


And you can immediately see the tab at the top about the keyboard and languages, we're going to be coming into this later, remember this page!


Then we see this intriguing "Change Keyboards" control.  What can we do in there?  Well, we can see there's a way to add other language keyboard layouts, and if we add them, the language bar becomes available to switch between language and layouts.


However, ALL the layouts in there have the CAPS lock key set to  modulate the letter key codes, what we need is a new language/layout we can add, which does not respond to the caps-lock key.

Unlucky for us we have to create this layout... Luckily though Microsoft provide the "keyboard layout creator", which we'll now need to download & install from this link:


Install that and open it, you'll get a program looking like this:


Of course you can install your own keys now, clicking on each one, toggling it... etc... Play about, but all we want to do is create a clone of our favoured layout, for me this is "English (United Kingdom)", so from the file menu we can load that existing layout:



And it's presented to us...


We don't want to change any keys at this time, but we do want to change the properties to give the keyboard layout we're creating a name so we can spot it.

So, open the Project menu and select properties...


You'll get the default values...


Change them... so I'm going with this....


And just save this new layout project file...


You'll get a file, where-ever you saved it, looking like this...


Open it in Notepad, or whatever text-editor you favour...

Click to zoom in!

This looks like a lot of information, but whatever text editor you're using TURN OFF WORD WRAPPING!!!!!

And you'll see these columns in the center... the third column is "caps".

This column tells the keyboard controller (when is uses this mapping) what to do with a key when the VK_CAPITAL key code is received.  We want all the keys to do nothing, and some already do - such as the number keys.

Those keys already ignoring caps have zero's int his column, so we need to edit the letter keys to do nothing when caps is pressed, change any 1's or 5's you see in that column, especially against the a-z keys to a zero....

Click to zoom in!

Save the text file, and now re-open that "klc" file in the Layout Creator application from Microsoft again... I did this by right clicking on the file and selecting "open with"...

Don't touch anything, don't twiddle any values!!!!  If you do, the creator takes liberties and can change things back in your klc file.

Just go back into "project" and select "Build DLL and Setup package"...


The application will now try to validate the keyboard and you will be told (hopefully) that the verification succeeded, but that there were warnings, you can view the result I got...


Here...

Click to zoom in!

Those warnings tell you pretty much that everything worked as we expected, the CAPS LOCK is not set between 'a' and 'A'... etc... that's what we want to see!!!

When the DLL is built you can open the folder straight away...


And doing so, we see we have a bunch of msi and a setup executable...


Install the setup executable...


You will see that the name I entered in the properties is the window title, so this is "United Kingdom - NoCaps"....

Go back into the region & languagages menu, the keyboard again, and this time when you look you should see either... "United Kingdom - NoCaps", but more likely it just says "United Kingdom - Custom".  Select to enable them!  Anything new, this is a little sketchy, but this is Microsoft not what you've done.

Now, because you have more than one keyboard layout available in the languages, the language bar should show up...

Click to zoom in!

In that you can pull it down to select the "NoCaps" version!!!

Doing so in an editor now, I find caps lock has no effect!!! Exactly what people have been looking for.  And this only affects the capslock key, you can still get capital letters using shift!

You're Not hacked anything... Not been in to the guts of the registry, and best of all, you can uninstall it later... or deploy the same keyboard layout to any version of windows you like (above windows Vista at least).

And, best of all, you can just go back to the language bar and select the original standard "United Kingdom" default layout, and the caps lock is back on and working!

There are other options to let you select between key layouts on the fly too, so you can opt into and out of the NoCaps version at the press of a key combination... The default being "Left ALT + Shift", search your windows for "Text Services and Input Languages".

No comments:

Post a Comment