USB keyboard lazarus / 13-General ---------------------------------------------------------------------- fuzzy1985 · 2019-06-23 09:47 Hi, I'm trying to make a program for a local club. The program needs to be used for judging. Now i have multiple keyboard. How can i know from whick keyboard the key is pressed? I already saw some documentation on codeprojects for c#, but i do not understand it. Can someone help me? ---------------------------------------------------------------------- SymbolicFrank · 2019-06-23 11:04 On which OS? Either way, this is not easy. ---------------------------------------------------------------------- fuzzy1985 · 2019-06-23 11:52 Windows 10 ---------------------------------------------------------------------- trev · 2019-06-24 05:52 Could you elaborate on this unusual setup where Windows 10 has multiple keyboards? Perhaps describe the use case? I know Windows 10 _can_ have multiple keyboards plugged in, but the keystrokes from all of them end up in the same place, as does the mouse pointer. I'm failing to see how multiple people can use their keyboard/mouse all at the same time... ---------------------------------------------------------------------- SymbolicFrank · 2019-06-24 06:43 Something like this: https://www.dicolab.com/products_teamplayer.html? ---------------------------------------------------------------------- PascalDragon · 2019-06-24 07:02 Quote from: trev on June 24, 2019, 07:52:11 amI know Windows 10 _can_ have multiple keyboards plugged in, but the keystrokes from all of them end up in the same place, as does the mouse pointer. I'm failing to see how multiple people can use their keyboard/mouse all at the same time... Well, there certainly are possibilities as the remastered versions of the games Settler I and II (released November '18) support split screen multiplayer with two mice (as they did back on DOS ). ---------------------------------------------------------------------- SymbolicFrank · 2019-06-24 07:19 You need to install a keyboard hook. See: https://docs.microsoft.com/en-us/previous- versions/windows/desktop/legacy/ms644985(v=vs.85) But it doesn't say if you have to do that once (and how you determine the keyboard), or if you can select the keyboard. And if that doesn't work, you have to write an USB HID driver. ---------------------------------------------------------------------- avra · 2019-06-24 08:04 Quote from: fuzzy1985 on June 23, 2019, 11:47:01 amI'm trying to make a program for a local club. The program needs to be used for judging. Now i have multiple keyboard. How can i know from whick keyboard the key is pressed?I would prefer hardware way to solve such a problem. Like using some embedded microcontroller (like Arduino) via RS485, Bluetooth, or USB to provide custom buttons for each judge. If sticking with USB, then you can either emulate a HID gamepad/joystick, or give each judge a different set of HID keyboard keys. Some related links: https://www.obdev.at/products/vusb/prjhid.html https://github.com/MHeironimus/ArduinoJoystickLibrary https://github.com/Amadiro/arcade-joystick https://github.com/menczel/avrhid https://www.engineersgarage.com/contribution/atmega-32u4-based-gamepad https://www.engineersgarage.com/contribution/atmega-32u4-based- generic-usb-keyboard http://www.fourwalledcubicle.com/LUFA.php ---------------------------------------------------------------------- engkin · 2019-06-25 03:27 Quote from: fuzzy1985 on June 23, 2019, 11:47:01 amI already saw some documentation on codeprojects for c#, but i do not understand it. Can someone help me? Perhaps a link to the article would help.