Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for determining keyboard used? #12

Closed
28andrew opened this issue Feb 24, 2017 · 11 comments
Closed

Support for determining keyboard used? #12

28andrew opened this issue Feb 24, 2017 · 11 comments
Assignees

Comments

@28andrew
Copy link

I wonder if it is possible to add support for determining the keyboard being used. Maybe return the unique keyboard "id".

@kristian kristian self-assigned this Feb 26, 2017
@kristian
Copy link
Owner

Good idea. I think that'd fit the library really well. Unfortunately I don't think the LowLevel routines provided by Windows do provide such a "keyboard id". Input it input, regardless of which device the input came from. If somebody has an idea, please feel ree to comment. I'll let this issue stay open for reference.

@28andrew
Copy link
Author

Interception does it somehow. I think it uses a driver. LuaMacros also does it, I don't think it uses a driver.
Both of these aren't in Java but maybe you can do something similar with JNI.
https://github.com/oblitum/Interception
https://github.com/me2d13/luamacros

@28andrew 28andrew reopened this Feb 26, 2017
@28andrew
Copy link
Author

28andrew commented Feb 26, 2017

Oops sorry, closed it by accident.

@kristian
Copy link
Owner

Nice, I'll take a look at it as soon as I find some spare time.

@kristian kristian removed the inactive label Jun 8, 2017
@kristian
Copy link
Owner

kristian commented Jun 8, 2017

Hello Andrew, good news. With the next major revision of this library, I decided switching from the Windows "Hook Functions" to the newer "Raw Input" API. This will essentially drop support for Windows 2000 machines, whilst bringing a lot of advantages along:

  • The raw input API is newer and better documented by Microsoft
  • It's even "lower" level, than the Hook Functions used so far, which I think fits this library very well
  • It removes some "wonky" debris of the old implementation (e.g. dead key handling)
  • And, last but not least, it adds the possibility of determining on which input device the key was pressed!

I'll use this issue to keep you updated about the progress. Hope this helps.

@28andrew
Copy link
Author

28andrew commented Jun 8, 2017

Wow, that's amazing. I didn't expect you to still consider supporting it months later. I'm looking forward on the progress. 😄

@mwss1996
Copy link

mwss1996 commented Jun 9, 2017

This will be a great improvement. Could we expect a release date?

@kristian
Copy link
Owner

kristian commented Jun 9, 2017

Hello Michael, if everything goes as planned maybe already this Sunday. For the third major release I am planning to do some major changes to the library:

@mwss1996
Copy link

mwss1996 commented Jun 9, 2017

Wow, i was thinking this wanna take months.
It's possible to get the devices names too? I was thinking in let the user to choose the proper device to get the input.

@kristian
Copy link
Owner

kristian commented Jun 9, 2017

No promises, but I'll try to add that as well.

kristian added a commit that referenced this issue Jun 11, 2017
functions to list connected keyboards / mice, see #12, fixed some bugs
kristian added a commit that referenced this issue Jun 11, 2017
functions to list connected keyboards / mice, see #12, fixed some bugs
@kristian
Copy link
Owner

Done. Released version 3.0. Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants