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

Device scanning interferes with keyboard key presses #39

Closed
leif81 opened this issue Mar 24, 2016 · 6 comments
Closed

Device scanning interferes with keyboard key presses #39

leif81 opened this issue Mar 24, 2016 · 6 comments
Milestone

Comments

@leif81
Copy link
Contributor

leif81 commented Mar 24, 2016

Ever since I integrated hid4java into my project I've noticed that when my application is running my USB keyboard behaves oddly. Specifically what happens is that when I'm typing on my keyboard (in another application) the occasional keyboard key press gets duplicated. So if I were to type hello world into an application like Notepad the result may actually be helloo world (notice the duplicate oo). Exiting my application that is using hid4java resolves the issue and future key presses are accurate.

Today I decided to investigate this problem a bit further and I think I've narrowed it down to something that may be helpful. I believe the issue is related to the device scanning. Because if I disable device scanning by passing a value of 0 to the scanInterval param of the HidServices constructor the problem goes away.

I'm observing this issue when running my application on Windows 7 64-bit. I also run my application on a Raspberry Pi, but I haven't noticed the same problem there.

@andyrozman
Copy link

With current implementation this is little impossible to do, especially if you use HidManager. We would probably need additional method, which could pass this scan interval to HidServices instance. Or perhaps scan interval could be static variable (which we could set before calling HidManager).

@andyrozman
Copy link

I made few changes to code, which could help with this problem. @gary-rowe could you look at pull request and merge it?

@leif81
Copy link
Contributor Author

leif81 commented Mar 26, 2016

Thanks @andyrozman . This will make it a little nicer to access the singleton to avoid the issue.

But, any idea why the scanning is interfering with key presses? It would be nice to be able to have scanning on Windows.

@gary-rowe
Copy link
Owner

Thanks @andyrozman for the PR. I'll be able to dedicate time to this early next week.

@seanidzenga
Copy link

Has there been any progress on this issue?

@gary-rowe gary-rowe modified the milestone: Release 0.6.0 Jun 24, 2017
@gary-rowe
Copy link
Owner

Apologies for the slow response. There has been a lot of work in the scanning code so I think this has been resolved. If you'd like to try again, please use latest develop-SNAPSHOT version.

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

No branches or pull requests

4 participants