geekhack

geekhack Community => Keyboards => Topic started by: spremino on Thu, 03 September 2009, 14:24:01

Title: Caps Lock, you are fired! (Windows only)
Post by: spremino on Thu, 03 September 2009, 14:24:01
Since it seems that someone here is annoyed by Caps Lock, I'm referencing a Windows freeware which allows you to remap any key on your keyboard, Caps Lock included. The freeware is SharpKeys:

http://www.randyrants.com/sharpkeys/

Warning: this is a system wide setting, shared by all users.

If you prefer a user local setting, than AFAIK you can use Autohotkey (but I don't know how much that would be reliable, since the mapping does not happen at the driver level).
Title: Caps Lock, you are fired! (Windows only)
Post by: JBert on Thu, 03 September 2009, 14:47:40
AutoHotkey can do a pretty good job of remapping the key. The only problem is that it doesn't work for your log-in screen and other stuff which talks directly to the driver.

Registry remapping (as done by SharpKeys and other programes) happens on a low level though.
Title: Caps Lock, you are fired! (Windows only)
Post by: kode on Thu, 03 September 2009, 18:01:01
For a moment I thought this was going to be about that woman who got fired over writing with bold red caps (http://www.foxnews.com/story/0,2933,545221,00.html?test=latestnews).

Back on windows I always use a registry hack to turn caps lock into another ctrl. :)
Title: Caps Lock, you are fired! (Windows only)
Post by: spremino on Thu, 03 September 2009, 18:15:10
Quote from: kode;114551
For a moment I thought this was going to be about that woman who got fired over writing with bold red caps (http://www.foxnews.com/story/0,2933,545221,00.html?test=latestnews).


What a funny coincidence :-D

Quote from: kode;114551
Back on windows I always use a registry hack to turn caps lock into another ctrl. :)


That's exactly what SharpKeys accomplishes, with a user friendly GUI instead of making you mess with scan codes. I have remapped my keyboard heavily (and I have sent a donation to SharpKeys' author).
Title: Caps Lock, you are fired! (Windows only)
Post by: timw4mail on Thu, 03 September 2009, 21:27:49
Considering I only wanted Caps Lock re-mapped to Control, this works well enough for me.
Title: Caps Lock, you are fired! (Windows only)
Post by: ed_ on Thu, 03 September 2009, 21:55:58
I press control with the ridge of my hand, and press it without leaving the home row, fatiguing my pinky or otherwise making it unavailable for combos.
Title: Caps Lock, you are fired! (Windows only)
Post by: quadibloc on Fri, 04 September 2009, 10:47:18
I looked into AutoHotKey when I saw your article about turning any keyboard into an HHKB, but apparently it doesn't let you use scan codes, so for what I want to do, it would be necessary to modify the (supplied) source code.

What I want to do is:

1) Turn Scroll Lock into a "mode" key, to select from a number of possible key mappings.
2) Turn Caps Lock into Ctrl
3) Turn left Ctrl into a "Fn" key, to allow access to extra keys.

Then I can get the two "lost" keys back, and add many others.

Thus: Fn-J is Scroll Lock. Fn-K is Caps Lock. Fn-L could be the international key, and Fn-M the Windows Menu key.

Fn-F1 through Fn-F12 can be, in imitation 122 mode, PF13 through PF24. Fn-1 through Fn-0 can take the place of the keys on the side (that, confusingly, have the F1 - F10 scan codes) with F1 through F12 being, in that mode, remapped to PF1 - PF12.

Another mode would let the keyboard pretend to be a Japanese keyboard.

I could get more extreme, and use the Tab key as the Windows Shift key, lettng Fn-U perhaps be the tab key, so that a 101-key keyboard would no longer suffer the lack of Windows keys (since making a shift key Fn-something isn't workable). Of course, going that route, I could easily choose a key that is not ideal in terms of rollover.
Title: Caps Lock, you are fired! (Windows only)
Post by: Rajagra on Fri, 04 September 2009, 11:48:29
Quote from: ed_;114616
I press control with the ridge of my hand, and press it without leaving the home row, fatiguing my pinky or otherwise making it unavailable for combos.


I can't believe I never thought of doing that. On a Windowsless board it works well enough to consider remapping shift onto the control key(s).
Title: Caps Lock, you are fired! (Windows only)
Post by: timw4mail on Fri, 04 September 2009, 13:35:10
Quote from: ripster;114763
Show Image
(http://geekhack.org/attachment.php?attachmentid=4195&stc=1&d=1251745782)


LOL - I just noticed in the Pic the angle is off on the screen printing for Alphalock.   Well, with Steve it was the IDEAS that mattered more than the EXECUTION.

Are those keys triple-shot?
Title: Caps Lock, you are fired! (Windows only)
Post by: JBert on Fri, 04 September 2009, 14:32:29
Quote from: quadibloc;114745
I looked into AutoHotKey when I saw your article about turning any keyboard into an HHKB, but apparently it doesn't let you use scan codes, so for what I want to do, it would be necessary to modify the (supplied) source code.
Ripster already said it: yes you can use scancodes.

For example, this is a valid hotkey:
Code: [Select]
SC01F::a
Using these, I made myself an improved Colemak autohotkey script which doesn't need your keyboard layout to be set to Qwerty.
Title: Caps Lock, you are fired! (Windows only)
Post by: quadibloc on Fri, 04 September 2009, 16:04:09
Quote from: JBert;114835
Ripster already said it: yes you can use scancodes.

For example, this is a valid hotkey:
Code: [Select]
SC01F::a


Yes, but can you use them the other way around:

Code: [Select]
::SC007

where stands for the conventional way for naming the F1 key, telling the program that I want AutoHotKey to tell Windows that the key with (Scan Code Set 1) scan code 07 hex was pushed?

I had gotten the impression that you couldn't from the way the documentation pages said that the added buttons on newer keyboards were added to the program.
Title: Caps Lock, you are fired! (Windows only)
Post by: JBert on Fri, 04 September 2009, 16:48:38
You could try that with this:
Code: [Select]
F1::{sc007} or
Code: [Select]
F1::Send {sc007}The latter form may have a larger chance of working, but it sends the scancode while untoggling any modifier.

But I don't get what you are intending to do. What key is scancode number 007 exactly, and why do you want to send raw scancodes anyway? Most special keys have a special identifier as can be read on the Key list page (http://www.autohotkey.com/docs/KeyList.htm), hence it could be more interesting to specify one of those.
Title: Caps Lock, you are fired! (Windows only)
Post by: quadibloc on Sat, 05 September 2009, 08:46:02
Quote from: JBert;114865
What key is scancode number 007 exactly, and why do you want to send raw scancodes anyway?


Scan code number 7 is PF1 on a Host Connected keyboard. The PF1 through PF12 keys have different scan codes than F1 through F12, since the scan codes for F1 through F10 are used for the keys on the left side, in the positions the function keys had on the 83-key and 84-key keyboards.

So what I'm seeking to do is to have a way of toggling from normal keyboard operation to emulating a 122-key keyboard.
Title: Caps Lock, you are fired! (Windows only)
Post by: ch_123 on Sat, 05 September 2009, 09:39:36
For those interested - GNOME or KDE based Linux distros have a built-in option in the keyboard settings screen.