0

I recently bought a small USB device that acts as an "HID keyboard device" (standard USB keyboard)

It has only one key, which is bound to a lowercase 'b'.

I want it to be rebound to something else, and several options come to mind:

  1. Software rebind. Easy and simple, but I don't want to configure each machine I connect the device to.

  2. The device comes with a Windows driver. This has two inconvenients: No support for Linux/BSD/whatever, and the driver MAY be malware (considering the origin of the device, it's a realistic possibility). This driver may however allow the device to be rebound.

  3. Write my own driver. It has the inconvenient of also having to deploy it everywhere, but it could be fun to do :)

  4. Reprogram the device.

I'd like to avoid options 1 and 2. And I would certainly like to do 4, but I don't know if it's possible to reprogram a USB keyboard device to output different keys (it could be simple since the devices has ONLY 1 key).

CLARIFICATION: The device does work on all platforms as a standard USB keyboard does. However, the CD included has a custom driver that can be configured to translate the key to something the user selects

3 Answers3

1

Why don't you build your own? Just take an old Keyboard you are not using, track the keys and rebuild with only the key you want to use! Somethink like this:

One-Key-Keyboard

USB-Keyboard

Or, you can go even further and use a micro controller and some switches to send the signal to whatever key you want to use and write you own driver for the micro controller. Something like that:

KEY ---> Microcontroler ---> Data Bus ---> Keyboard electronic board

edit: Re-programing wouldn't be worth it. It will take you forever for a $2 piece of electronic. Why the letter 'b'? did the manufacturer say anything about that? Can you change this letter using the Driver? The chip in the keyboard in theory is the one sending the string 'b' using RS232. What about a physical USB key-logger?

Joe
  • 711
0

A software rebinding is the most sensible solution here. Check out autohotkey. It has an entire scripting language, and can do some really interesting things with your arguably bizarre one-key keyboard (Even LONG key combinations - which I can imagine becoming VERY strange and fun): "https://www.autohotkey.com/"

Spooler
  • 462
0

If there's a custom driver for Windows that allows reprogramming the device, install usbsnoop or similar software, capture the USB traffic while rebinding it to different keys, figure out the protocol and implement your own rebinding tool or just repeat the traffic under Linux.

If the custom Windows driver just intercepts they key event and substitutes something else, you can do the same under Linux, see e.g. here or here.

As for (4), I'd assume there's some kind of microcontroller on the device, and in principle you should be able to reprogram it given the right tools, but there'll be substantial effort to reverse engineer it first.

dirkt
  • 17,461