devshift / jnativehook

Automatically exported from code.google.com/p/jnativehook
0 stars 0 forks source link

JNativeHook only catches a single keyboard event, then stops capturing keyboard events. #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download and run the example program found in the sources at 
http://code.google.com/p/jnativehook/downloads/list
2. Disable all the listeners, except the keyboard listener. (It's optional. 
It's only to make it easier to keep track of any keyboard events.)
3. Press a couple of buttons.

What is the expected output? What do you see instead?
Upon pressing the first button, the program prints that it has detected a 
keypress and a key typed.
If you press a button again, nothing happens. Doesn't matter which button you 
press. Nothing happens.
I expected the program to detect that a key had been pressed, then typed and 
then released.
But it never captures that a key has been released.

What version of the product are you using? On what operating system?
I'm using JNativeHook 1.1.4 on Windows 8 Pro 64-bit.
I'm running the sample using the Netbeans IDE 32-bit version.

Original issue reported on code.google.com by frederik...@hotmail.com on 6 Apr 2013 at 12:05

GoogleCodeExporter commented 9 years ago
Java 32 or 64-bit?  

Original comment by a...@1stleg.com on 6 Apr 2013 at 4:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
32-bit Java.

Original comment by frederik...@hotmail.com on 6 Apr 2013 at 4:53

GoogleCodeExporter commented 9 years ago
I cannot duplicate the issue in my test environment.  Try running the attached 
jar from the command prompt and see if you can duplicate the issue.  Also, What 
languages do you have set?

Original comment by a...@1stleg.com on 8 Apr 2013 at 5:42

Attachments:

GoogleCodeExporter commented 9 years ago
I wasn't able to run it properly.
I used the command "java -jar JNativeHook.jar" (without the quotes, of course).

It resulted in the following exception: ExceptionInInitializerError.
None of the Listeners were active in the View -> Listeners memu.

I've attached a screenshot of the full error.

Original comment by frederik...@hotmail.com on 8 Apr 2013 at 6:58

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
For the language, I assume you mean system language? If that's the case, it's 
Danish.

I should mention that I once used JNativeHook in an old project, back when I 
had Windows 7 and it worked fine back then.
I don't know which version I used.

Original comment by frederik...@hotmail.com on 8 Apr 2013 at 7:06

GoogleCodeExporter commented 9 years ago
Run it with the 32-bit jvm.

Original comment by a...@1stleg.com on 9 Apr 2013 at 2:27

GoogleCodeExporter commented 9 years ago
I got the .jar you attached up and running.

However, had the same error as described in my first post. It only captures the 
first keyboard event. And only the keyPressed and keyTyped methods gets called.

Keyboard layout is 0x04060406

I also ran the .jar file on a laptop with Windows 7 64-bit and it worked 
perfectly there, so it seems to be a Windows 8 specific issue.

Original comment by frederik...@hotmail.com on 9 Apr 2013 at 10:54

GoogleCodeExporter commented 9 years ago
I did some more testing and was unable to reproduce the issue on Windows 8 
64-bin running Oracle JRE 7 32-bit.  Tried both English and Danish, both 
produced the expected result.  The only thing I can think of is that some 
application you have running is causing a conflict. 

Original comment by a...@1stleg.com on 9 Apr 2013 at 8:25

GoogleCodeExporter commented 9 years ago
Damn... Was hoping that wasn't the cause. :(

I don't know if you manually 'close' issues or mark them as fixed or something, 
but if you do, keep this one open a day or two more.

Once I get home in 6-7 hours, I'll do some testing and try to figure out which 
application is causing the conflict.
I'll report back here if I manage to find it.

Original comment by frederik...@hotmail.com on 10 Apr 2013 at 7:01

GoogleCodeExporter commented 9 years ago
I've found the conflicting application. It's an application called "LoL 
Summoner Information" or LSI for short.

In short, it's an application that pulls information about the players in a 
game of League of Legends and displays it as an in-game overlay when you hold 
down a hotkey.

It's being developed by a guy named Heina Baumstamm.
Is there some way you and he could work out this issue together?
I use his application several times a day and there's no similar application 
out there, so I can't switch to one that doesn't conflict with JNativeHook.
I will also be using the application that I'm writing, which utilizes 
JNativeHook, several times a day... So right now I kind of have to choose which 
application I need the most. :/

If you want to get in touch with the developer of LSI, he can be contacted at 
the project's Facebook page: http://www.facebook.com/LeagueLSI

Anyway, thanks for taking the time to look into this. It's great to finally 
know what's causing this issue.

Original comment by frederik...@hotmail.com on 10 Apr 2013 at 1:58

GoogleCodeExporter commented 9 years ago
Forget my previous post.

I contacted the author of LSI and he sent me a pre-release of the next version 
of LSI.
He told me that he changed how his application handles hotkeys in that version 
and asked me to test if it still conflicted with JNativeHook.
Luckily, it doesn't. Both JNativeHook and LSI works perfectly fine now, so no 
need for you to do anything.

Again, thanks for all your help.

Original comment by frederik...@hotmail.com on 10 Apr 2013 at 3:01

GoogleCodeExporter commented 9 years ago
No Problem, Glad its working.  I will contact the author anyway, I am curious 
what method he was using that was causing a conflict. 

Original comment by a...@1stleg.com on 10 Apr 2013 at 5:12