views:

280

answers:

2

I mean the real USB keyboard, not a software keyboard driver.

I know that keybords differ, but in general is it easy/possible to reprogram / rewire it? Maybe there are models that are easier to do that?

And yes, I can use soldering iron / hardware flash reprogrammer.

+2  A: 

In general, no. Most keyboards that you find have a small bit of brains and a switch matrix and not much else. They have just enough brains to communicate over USB while scanning their switch matrix. The entire mess is in one mask-programmed chip that you can't change the programming of.

There are a few keyboards out there that do things like key remapping or macro programming in the keyboard, but they are pretty rare and/or pretty expensive. And, in my experience, pretty damned annoying when you accidentally hit the 'program macro' key accidentally.

You could, in theory, tear akeyboard apart, remove it's existing brains, install a micro-controller and write code to send whatever codes you want to the host when a given point on the switch matrix is hit. You'll need to work out what traces are what on the switch matrix, and you'll need to write/find micro-controller code to talk USB. And don't forget that a switch matrix is susceptible to ghosting effects (one keypress masks others), so don't try to put things like shift, control, alt on keys that are subject to ghosting.

If you don't/can't do the micro-controller work yourself, you could use something like an ipac (it's the micro-controller part that I just described) to do the job, but you'll have to get something that understands a switch matrix.

Michael Kohne
excellent answer, thank you.
Łukasz Lew
+3  A: 

For some keyboards it is possible, as a recent hack of an Apple keyboard revealed.

starblue