Author Topic: Latching shift key (shift lock) -- need some help  (Read 4865 times)

0 Members and 1 Guest are viewing this topic.

Offline kolonelkadatTopic starter

  • Regular Contributor
  • *
  • Posts: 202
  • Country: us
  • Obviously, windows are central to Windows.
    • Force Project X
Latching shift key (shift lock) -- need some help
« on: January 22, 2014, 10:32:04 pm »
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. |O


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.
 

Offline Jon86

  • Frequent Contributor
  • **
  • Posts: 526
  • Country: gb
Re: Latching shift key (shift lock) -- need some help
« Reply #1 on: January 22, 2014, 10:35:57 pm »
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.
Death, taxes and diode losses.
 

Offline Joule Thief

  • Regular Contributor
  • *
  • Posts: 249
  • Country: us
Re: Latching shift key (shift lock) -- need some help
« Reply #2 on: January 22, 2014, 10:52:33 pm »
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 ???
Perturb and observe.
 

Offline kolonelkadatTopic starter

  • Regular Contributor
  • *
  • Posts: 202
  • Country: us
  • Obviously, windows are central to Windows.
    • Force Project X
Re: Latching shift key (shift lock) -- need some help
« Reply #3 on: January 22, 2014, 11:11:53 pm »
Forgive me if I've missed something in your explanation, I'm quite tired. But ... all you'd need is a toggle switch of some sort on the side of your keyboard ... unless you want to actually integrate it into your existing keys, which I can see as possibly being quite a challenge.
Thats the thing though. I REALLY want it integrated into  the right shift key. And yes, it is proving much more complicated than i had initially imagined.

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 ???
yes, 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
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9388
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Latching shift key (shift lock) -- need some help
« Reply #4 on: January 22, 2014, 11:31:43 pm »
There's a X11 hack out there to make the caps lock work like a shift lock.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline papo

  • Regular Contributor
  • *
  • Posts: 93
  • Country: ch
Re: Latching shift key (shift lock) -- need some help
« Reply #5 on: January 23, 2014, 02:21:44 am »
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, this article 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, regards
Matt
 

Offline kolonelkadatTopic starter

  • Regular Contributor
  • *
  • Posts: 202
  • Country: us
  • Obviously, windows are central to Windows.
    • Force Project X
Re: Latching shift key (shift lock) -- need some help
« Reply #6 on: January 23, 2014, 10:15:14 am »
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?
:palm: okay. wow. it wasnt connected to ground. Im an idiot or blind or both. and yes it is the actual shift key.

2. Where does vout go?
it 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf