geekhack

geekhack Community => Keyboards => Topic started by: nsrexler on Wed, 12 December 2012, 10:20:32

Title: Cherry MX Lock / Locking Caps Lock
Post by: nsrexler on Wed, 12 December 2012, 10:20:32
Hey everyone, this is my first post so I apologize if this is in the wrong place.
Many years ago I had an Apple keyboard on which the Caps Lock key would literally lock down when pressed, and I really liked this feature because it was a nice tactile indication of Caps Lock. How could I go about getting this behavior on a modern keyboard? I know that a "Cherry MX Lock" switch exists, but I don't have much faith in my DIY skills so I'd like to find a keyboard that comes with this already. Do any such keyboards exist?
Bonus points if it also has an LED directly on the Caps Lock key.
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: Findecanor on Wed, 12 December 2012, 10:29:01
Welcome to the board!

I'm afraid that you can't avoid getting into hardware modding. I don't think that you need any deeper skills in electronics or programming, though.
There are a few DIY projects that does locking caps lock keyboards with modern Mac and PCs.
There are some issues, though, especially with programs that try to set/unset the Caps lock mode/light on their own accord.

* With Hasu's ADB-to-USB adapter firmware (http://geekhack.org/index.php?topic=14290.0), you could use a vintage Apple keyboard with a modern computer. It will translate the locking Caps Lock key's codes into presses from a non-locking key.
You will need a Teensy microcontroller board (http://www.pjrc.com/teensy/) and solder the connectors to it and then download Hasu's firmware onto it.
I think that this might be the easiest option.

* There are also people who have built their own keyboards with locking Caps Lock switches, and with custom microcontroller firmware that do have similar emulation.
Look in the threads about the Phantom firmware. Several guys who built the "Phantom" DIY keyboard kit are using MX Lock switches for Caps Lock, Scroll Lock, etc.

* User "Aleksander" on Deskthority's forum Modified an existing keyboard (http://deskthority.net/workshop-f7/mod-use-a-mx-lock-as-capslock-switch-t4503.html) to use MX Lock.
He used the Poker, which has PCB-mounted switches and no metal plate. He wrote a custom program for a tiny microcontroller just for the switch.
(Has he posted here too?)
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: esoomenona on Wed, 12 December 2012, 10:36:04
There is a setting in Windows where you can get an aural indication via distinctive beeps for on and off of the different locks. I really like this, as it allows you the ability to change the CapsLock key to some other use without having it lock every time you press it.
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: nsrexler on Wed, 12 December 2012, 10:37:27
Thanks for responding! I'm not really interested in using an actual ADB keyboard though, I'd like to have a more modern one with the locking key feature.
What would happen if I took a normal Cherry MX keyboard and replaced the Caps Lock switch with a locking switch, without making any changes to the microcontroller?
Alternatively, how difficult would it be to reprogram a microcontroller for something like this? I've been programming for years, but I have absolutely no experience with embedded programming.
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: Findecanor on Wed, 12 December 2012, 10:50:15
First of all, the keyboard needs to be built with a diode per switch (have N-key rollover) or have a separate line to the Caps Lock (like the Apple keyboards).
This includes most modern keyboards with Cherry MX switches, but not the Razer BlackWidow or Cherry's own G80 series.

Most microcontrollers for existing keyboards can not be reprogrammed. You would have to replace it.
Bpiphany used to sell a custom reprogrammable microcontroller for the Filco tenkeyless (http://geekhack.org/index.php?topic=35065.0) boards that could replace the existing controller. The group order is closed, now, but you could check it out to see if there are any spares or if someone who ordered one no longer wants his.

BTW, I edited my post above and added another link.
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: samwisekoi on Wed, 12 December 2012, 12:53:56
Interesting.  7bit shows MXLOCK switches in stock for $3.60 USD:

http://deskthority.net/marketplace-f11/cherry-mx-taking-pre-orders-t2760.html

This might be a fun mode to try.

 - Ron | samwisekoi
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: TotalChaos on Wed, 12 December 2012, 15:37:08
Hey everyone, this is my first post so I apologize if this is in the wrong place.
Many years ago I had an Apple keyboard on which the Caps Lock key would literally lock down when pressed, and I really liked this feature because it was a nice tactile indication of Caps Lock.
I have the same thing on all my old Amiga keyboards from 1980s and 1990s and there is even an LED light inside the Capslock that lights up when it is locked down.  Back then that was considered "way cool" :)



Quote
How could I go about getting this behavior on a modern keyboard? I know that a "Cherry MX Lock" switch exists, but I don't have much faith in my DIY skills so I'd like to find a keyboard that comes with this already. Do any such keyboards exist?
Bonus points if it also has an LED directly on the Caps Lock key.
Can't u just buy an adapter for your old Apple keyboard?

I bought a little adapter thingy a zillion years ago to use my Amiga 2000 keyboard from 1987 on all my bgcpcs.  The Amiga 2000 keyboard used a 5 pin DIN plug.    Cherry Black switches and totally indestructible. The adapter makes it a PS/2. connector.

I am not familiar with your keyboard so I donno if it can work with an adapter or not.  Something to think about.

Lots of ppl on GeekHack are still using their keyboards from 1980s.  Its the kewl thing to do.  :cool:

Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: jdcarpe on Wed, 12 December 2012, 16:00:05
You have to be able to let the microcontroller know what is going on when you replace a momentary switch with a lock switch. Think about how the caps lock works. You press it once, it activates. You press it again, it deactivates. Now think about that with a lock switch. You press once, the switch sends the keypress, but the switch stays in the locked position. Now you press it again, which unlocks the switch, but send no further keypress. So you would again have to press the lock switch (twice) to deactivate the caps lock.
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: TotalChaos on Wed, 12 December 2012, 16:06:20
@jdcarpe

I am not sure it works like you said.

On keyboards, all keys send out a keycode when u activate them, and then another when you deactivate it. KEYDOWN and KEYUP events.

I know because when I code games I sometimes wait for a KEYDOWN event and other times I  specifically wait for a KEYUP event.  They are 2 different things.

So it is possible to have a locking capslock that "just works" like any other key.

I am not saying that real capslock keys work like that or not because I don't know.  All I am saying is it possible for them to work like any other key to the controller and the computer.
 
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: jdcarpe on Wed, 12 December 2012, 16:16:09
@TotalChaos

I'm not sure, I haven't tried it either. I don't have any MX Lock switch.

I would prefer to have a "Shift Lock" key, using a lock switch. For me, caps lock works fine as is.
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: alaricljs on Wed, 12 December 2012, 16:27:00
Caps lock activates on the KEYDOWN event, but it doesn't de-activate on the KEYUP event, it takes a KEYDOWN event to do so.  It would require software or a driver on the computer side to make it behave any other way.

If you implement a locking switch for Caps Lock in a KB firmware then you have to account for a few things.  1: You have to send a KEYDOWN event to transition between the 2 lock states.  You also have to re-apply the correct state any time the OS changes it.
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: samwisekoi on Wed, 12 December 2012, 17:13:22
Caps lock activates on the KEYDOWN event, but it doesn't de-activate on the KEYUP event, it takes a KEYDOWN event to do so.  It would require software or a driver on the computer side to make it behave any other way.

If you implement a locking switch for Caps Lock in a KB firmware then you have to account for a few things.  1: You have to send a KEYDOWN event to transition between the 2 lock states.  You also have to re-apply the correct state any time the OS changes it.

Oooh.  Good points.  On to other things...

 - Ron | samwisekoi
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: TotalChaos on Wed, 12 December 2012, 17:16:04
alaricljs always payed attention in Keyboard Science class :)
Title: Re: Cherry MX Lock / Locking Caps Lock
Post by: rjohn on Wed, 25 December 2019, 09:07:20
hello

i know its old topic ,but similar idea to use a locked switch on SHIFT ,will it require custom firmware ?
also any source for those cherry mx locked switches ?