You can connect any number of keyboards. So just connect two and work. WIndows knows which keyboard because the generic HID gets the tagging info to identify the actual device.
There's an OpenSource program called "AutoHotKey". It's a scripting language that allows users to easily create small to complex scripts for all kinds of tasks such as: form fillers, auto-clicking, macros, etc.
Probably you only need AutoHotkey.
Also there was another unsupported software piece named LuaMacros. Not easy but this was developed for a Flight Simulator to connect with several keyboards. It's initially difficult to write lua scripts but possibly someone may have done it for Photoshop.