Latching shift key (shift lock) -- need some help - Page 1
Forum section: electronics / projects

author: kolonelkadat
author_rank: Regular Contributor
timestamp: January 22, 2014, 10:32:04 pm
content: Overview :I want my keyboard to have a key that functions similarly to capslock but will also type the alternate symbols, particularly I want _ instead of -. I was informed that Cherry corp makes a mechanically latching switch, but I decided that between the $15 price tag and the loss of the momentaryness of the shift key I would be better off designing my own circuit to put in parallel with the shift key.What I eventually came up with was a Hold on-push off nand gate latch that would sit in parallel with the switch. This way the shift key functions normally unless it is held for some arbitrary amount of time at which point the circuit will latch, keeping shift enabled until the key is pressed again.here is the schematic. the caps are 22uf ceramics and the nand gates are a quad 2-input nand (SN74AHC00n)The problem:it works fine when it has a single switch attached (no keyboard).It LATCHES correctly when attached to the keyboard; however, it appears that the shift key then activates ALL the keys attached to the shift keys row and/or column in the key matrix.Can anyone give me some pointers?I dont have a lot of components to throw at this problem, but id like to stick to what I have on hand. I'd also like to keep it small so I can fit the circuit inside the keyboard.I have plenty of 74XX 2 input logic gate chips.I have a couple of PHP45N03LTA mosfets that may (or may not) be functional.I can probably salvage some d1616a transistors.I have several of what I assume are optocouplers/isolators.basically what ever i can salvage out of an old ATX power supply.

author: Jon86
author_rank: Frequent Contributor
timestamp: January 22, 2014, 10:35:57 pm
content: Forgive me if I've missed something in your explanation, I'm quite tired. But what instantly came to mind for me was just using a CMOS switch to connect the shift key contacts together, and then all you'd need is a toggle switch of some sort on the side of your keyboard to switch it on and off. Or otherwise come up with some kind of soft latching switch circuit to control it if you didn't want to use a toggle.I don't think there's any need for all of that unless you want to actually integrate it into your existing keys, which I can see as possibly being quite a challenge.

author: Joule Thief
author_rank: Regular Contributor
timestamp: January 22, 2014, 10:52:33 pm
content: How about using a freeware software package that remaps the keyboard or individual keys.I believe individual keys can be remapped thru the windows registry

author: kolonelkadat
author_rank: Regular Contributor
timestamp: January 22, 2014, 11:11:53 pm
content: Quote from: Jon86 on January 22, 2014, 10:35:57 pmThats the thing though. IREALLYwant it integrated into the right shift key. And yes, it is proving much more complicated than i had initially imagined.Quote from: Joule Thief on January 22, 2014, 10:52:33 pmyes, yes. this is a 10 minute software solution in windows. a call to setwindowshookex to read/write keypresses, a timer, and a call to DeviceIoControl to blink the capslock indicator led. but thats not what I want. I want a hardware solution. that way it works in mac and linux and solaris and bsd

author: NiHaoMike
author_rank: Super Contributor
timestamp: January 22, 2014, 11:31:43 pm
content: There's a X11 hack out there to make the caps lock work like a shift lock.

author: papo
author_rank: Regular Contributor
timestamp: January 23, 2014, 02:21:44 am
content: Keyboards are typically multiplexed. Assuming your schematic is correct, you have two problems:1. One terminal of your "to keyboard matrix" shorts the matrix row (or column) down to ground. I am a bit confused by that... the switch that you have in the schematic is the actual shift key? Why do you connect it to ground? Is it grounded in the matrix?2. Where does vout go? Generally,thisarticle explains how the matrix works. There is a couple of different topologies, but essentially, note that neither of the two terminals of any switch/key is connected to ground or to the supply permanently. By shorting such a terminal to ground or supplying vout, you are affecting other keys whenever the matrix driver drives anything other than the row/column corresponding to the shift key.The easiest way to address this is most likely to really fake the key-press. You might want to consider using a transistor or an optocoupler to do so. If using the former, you have to reverse-engineer and understand the multiplexed matrix topology to wire it up correctly.Also make sure that your circuit can cope with the pulses coming from the multiplexer (I didn't check).HTH, regardsMatt

author: kolonelkadat
author_rank: Regular Contributor
timestamp: January 23, 2014, 10:15:14 am
content: Quote from: papo on January 23, 2014, 02:21:44 amokay. wow. it wasnt connected to ground. Im an idiot or blind or both. and yes it is the actual shift key.Quote from: papo on January 23, 2014, 02:21:44 amit was powering a led just for a visual cue the circuit was working. the next step would have been to hook it up to a transistor or optocoupler to latch the switch.I have it working now. although not as precisely as I would like. Thanks for the help man.