Author Topic: Adding keys to an old PS/2 keyboard?  (Read 2369 times)

0 Members and 1 Guest are viewing this topic.

Offline THX1138b

  • Thread Starter
  • Posts: 23
Adding keys to an old PS/2 keyboard?
« on: Wed, 04 October 2017, 20:50:30 »
I have an AST KB-102 keyboard but it doesn't have Windows or context menu keys. Is it possible that I could add a couple of switches to the surface of the board and then wire them up into the matrix so they will give useful scancodes to the operating system?

Is that a socket that the ribbons can be removed from and reinserted into? I'm afraid to tug on the ribbons lest I cause damage. I checked and the ribbon can be removed. I don't know how well adhered the conductor is to the plastic though. It looks a little scratched.



« Last Edit: Wed, 04 October 2017, 23:43:33 by THX1138b »

Offline Findecanor

  • Posts: 5036
  • Location: Koriko
Re: Adding keys to an old PS/2 keyboard?
« Reply #1 on: Thu, 05 October 2017, 01:06:42 »
The options I see are:
* Replace the controller board with something custom-made and custom-programmed, or
* Wire the additional switches to a separate controller, or
* Wire the additional switches to sacrificial keys and use a PS/2-to-USB converter that is capable of remapping keys. That would make your new Windows key activate for instance Scroll Lock - and the converter would change the Scroll Lock code into a Windows key code. That would of course also mean that pressing the Scroll Lock key would produce the Windows key code.

I don't believe in modifying the membrane - I have not seen any mod of a membrane that has been durable.

... or you could get used to pressing Ctrl+Esc instead of using the Windows key. It won't work with combinations with the Windows key though - it can only open the Start menu (or screen).

Offline THX1138b

  • Thread Starter
  • Posts: 23
Re: Adding keys to an old PS/2 keyboard?
« Reply #2 on: Thu, 05 October 2017, 06:22:08 »
I found five locations in the matrix which are not used by the keyboard but do send scancodes to the PC!

All I did to find them was connect my keyboard to the PC and use a breadboard jumper cable to connect the solder pads sequentially, using a keyscan program to record the results. I compared the lists of scancodes I got this way to the list of scancodes I got from pressing every button on the keyboard and found five unique codes after confirming. There could be some that I missed but five will do (I figured I might as well add another three switches).

Quite a lot (I guess all the other 21) of the unused matrix positions seem to result in a beeping noise being played through my speakers (or headset). That's kind of strange and doesn't sound like a normal Windows error noise but I guess they aren't usable positions and this is how the system communicates that something is wrong.

I checked the resistances of two different switches and got 70 and 100 ohms. I don't know if that's typical.

I'm thinking of using switches like the ones in the below photograph which I will glue in position on the case. I'll lead the wires along the top of the case too and try to give it the cyberpunk look that's so hot right now :P



« Last Edit: Thu, 05 October 2017, 06:25:11 by THX1138b »

Offline THX1138b

  • Thread Starter
  • Posts: 23
Re: Adding keys to an old PS/2 keyboard?
« Reply #3 on: Thu, 05 October 2017, 11:19:18 »
Hey, do I need to use diodes in this augmentation? I just recalled that people making their own keyboards have diodes for each key.

I measured the resistance of two of my keys to be 100 ohms and 70 ohms; I guess that's because of the diodes? Or are there resistors in there?

I didn't use a diode when I was probing my circuit to find vacancies in the matrix. Was that risking causing damage to the controller?

I just used my ammeter to check the current flow between shorted terminals and it's only 40 uA and that's with only the resistance of the ammeter.

Offline THX1138b

  • Thread Starter
  • Posts: 23
Keyboard error sound in Windows 10 when stimulating invalid matrix position
« Reply #4 on: Thu, 05 October 2017, 13:30:01 »
I wanted to add some keys to my PS/2 keyboard. The controller has eight rows and 16 columns but the keyboard has 102 or 103 buttons (not sure) so that leaves 20-something matrix positions unaccounted for. I used a breadboard jumper wire to connect the rows and columns in sequence and found five usable vacant matrix positions. I also found a lot of whatever this is; some kind of error? It's what I came to ask about. Does anyone recognise this sound? When I make a quick contact with the jumper wire, I get two beeps but if I hold it down for longer, I can get a bunch of beeps. The sound comes from my proper speakers, not the motherboard piezo thing. Please disregard the image in the below video; it's just what happened to be on my screen when recording the sound. Is the keyboard in distress when I do this or what? Does any other situation cause this sound?

I'm using Windows 10.

Edit: this thread got moved here which is kind of stupid since I'm asking about the error in general, not specifically to this situation. Pretty much no-one is going to read this and also happen to know about this sound so I'm basically not going to get an answer. Thanks, moderator. I'll go ask on Deskthority.


Mod Edit: Merged related topics
« Last Edit: Thu, 05 October 2017, 13:46:13 by THX1138b »

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Adding keys to an old PS/2 keyboard?
« Reply #5 on: Thu, 05 October 2017, 14:39:12 »
Interesting to hear of your investigations... I've wondered about doing this... lucky you found the extra scan codes. It would be interesting to know what they correspond to. (Media keys maybe??)

The diode is used to prevent "ghosting" so is generally not strictly speaking required in all cases.

I presume there are diodes on every key, but you'd have to verify this. Here's one description... http://www.openmusiclabs.com/learning/digital/input-matrix-scanning/index.html there are many more all over the web.  (Got photos of the keyboard PCB?)

Cheers.
Today's quote: '...“but then the customer successfully broke that.”