Lazarus
Using the Lazarus IDE => General => Topic started by: fuzzy1985 on June 23, 2019, 11:47:01 am
-
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?
-
On which OS? Either way, this is not easy.
-
Windows 10
-
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...
-
Something like this: https://www.dicolab.com/products_teamplayer.html (https://www.dicolab.com/products_teamplayer.html)?
-
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...
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 ;) ).
-
You need to install a keyboard hook.
See: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms644985(v=vs.85) (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.
-
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 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
-
I 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.