Is it possible to use two keyboards independently with different layouts/mapping for each keyboard

keyboardkeyboard shortcutskeyboard-layout

I was wondering if it is possible to have two keyboards on one machine, each working independent of the other. I would like to assign different key mapping on each keyboard. Will try my best to explain as i'm not sure i'm phrasing my question correctly or using the right terminology.
For example What i'm trying to achieve is:
– Keyboard no.1 would work with the default key layout and mapping, with all keys functioning normally as they are supposed to.
– Keyboard no.2 would have a different set of functions assigned to each key, suppose i press the "spacebar" key on keyboard no.2 it would execute an undo command shortcut (ie. ctrl+z), without altering the function of "spacebar" key on keyboard no.1

Thanking you in advance for your time and consideration,
Sincerely,
Sam

Best Answer

I'm modifying this answer, as I found a clear-cut solution, which wasn't clear before.

See LuaMacros (written by the author of HidMacros, you can probably use it instead if you wish), you can use it to have multiple keyboards work independently of each other. You can have exactly what you want - one keyboard working normally, and another doing as you please.

This tool lacks in documentation at the moment, as it's at a rather early stage of development, so for info on how to use it be sure to inspect this example script