9

On Windows, if you connect two USB keyboards, they behave like one. AFAIK (I can't try at the moment) it even synchronizes CapsLock and NumLock.

I'm looking for a way to map keyboard shortcuts to the second keyboard, e.g.

  • if Ctrl+C is copy on the "normal" keyboard, I want to assign that to just C on the second keyboard.
  • if AltGr+M gives µ on the "normal" keyboard, I want to assign that to just M on the second keyboard
  • I want to type . on the second keyboard and get an ellipsis (...)

The software should

  • work on Windows 7 and Windows 10, 64 bit
  • should be gratis
  • support many keyboards
  • not have problems with internationalization (e.g. assigning Chinese characters)
  • be able to identify keyboards (i.e. remember which one is which)

My idea is to use some cheap keyboards, re-label the keys with icons or similar and thus be able to type foreign language characters or have keyboard shortcuts for some games.

LuaMacros [Github] (Release download), the successor of HID Macros almost does what I need, except it can't remember the keyboards (or I didn't figure out how) and assigning the shortcuts is done in a programmatical way and you need to know how to write Lua scripts. I'm looking for a more guided way of assigning the keyboard shortcuts.

2

1 Answer 1

0

[Update] Read @huy's comment below. It requires the ability to code, but this part of teh article shows how to determine which keyboard sent a key-stroke (I am not usure if it woudl work with identical keyboards; you might have to dig deeper for that.

// Load the device name into the buffer
GetRawInputDeviceInfo (raw->header.hDevice, RIDI_DEVICENAME, stringBuffer, &bufferSize);

I woudl delet this answer, which is really a comment, but that would also delete the comment. Unless, Huy, if you post a new answer, then I wil upvote it and delete this. Welcome aboard, and thanks for a good contribution.

I just norticed that Thomas asked this, and I know that you can code, Thomas - or maybe give this as an exercise to a srudent :-)


Sorry to post an answer, but this is too long for a comment.

Tl'dr; As far as I know, this can't be (easily) done.

Each keyboard/mouse/joystick is just a dumb HID and Windows combines their inputs into one single queue.

Now, you can (if you can code) hook the event queue and intercept keyboard events. If you find one that interests you, you can "consume" it and prevent it being passed further.

A quick Google doesn't show a device Id attached to each event, which would allow you to do so easily.

However, you can get get the keyboard layout, so if you already have, or are willing to buy, two non-identical keyboards, you might be able to differentiate in hook code ad solve your problem.

As to an off the shelf app to do this, I am sorry, but I cannot help you.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.