Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Every time a key is pressed on a regular keyboard, a numeric 'key code' is sent to the computer, eg. 32 or 51 which represent specific keys.

Unrelated to my default keyboard which I am using to type this post, I want to be able to plug in a keyboard via USB and have its key codes all shifted up by some constant C.

Thus, when pressing the 'a' key on this side keyboard, the computer would not receive the keycode for 'a', but rather some higher number which the computer does not have a planned response to.

These out-of-conventional-range keystrokes will control a program of mine which knows what they are and will be listening for them.

Hardware or software solution would work for me. Perhaps there are special keyboards sold for this end, or maybe some software-related modification could let this be accomplished for any regular keyboard-- I have no idea. What is crucial is that the keycode shift applies only for my side keyboard and not my default keyboard which I use for regular stuff.

Edit: I'm on Windows.

share|improve this question
Related to… – Mechanical snail Oct 15 '11 at 23:07

The problem you are running into here is that windows is going to recognize your USB keyboard with the HID (Human Interface Driver) and assign it the default/active keyboard mapping that you are using on that system. (Windows and to my knowledge no other desktop OS supports multiple keyboard mappings at the same time.)

Joe's comment of a 72 button mouse might be your ticket. Otherwise, coding out your software to poll the secondary keyboard instead of using the native interrupt signals may work.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .