Closed GoogleCodeExporter closed 9 years ago
This can be tested with the sample app present at:
http://code.google.com/p/jnativehook/downloads/list
Original comment by hkumar.a...@gmail.com
on 21 Jan 2013 at 2:27
What machine are you running JNativeHook on? The remove machine you are
connecting to or the local machine running the remove desktop client?
One of two possibilities is happening. First if the JNativeHook library is
running on the remove machine, Microsoft is inserting key events at a higher
level than JNativeHook is listening at. It maybe possible to fix that problem
but it would be unlikely due to the way that windows provides event hooks.
The other possibility is that you are running JNativeHook on the local machine
and Microsoft is removing key events from a lower level than I am currently
listening at. This would be impossible to fix because the events would be
removed from the event queue prior to being delivered to my code.
I would need to know what computer is running the library to test and determine
if it is possible to fix this problem.
Original comment by a...@1stleg.com
on 22 Jan 2013 at 4:41
Hi,
Thanks for the reply.
I have tested it on different OS'es. JNativeHook should be running on the
local machine and NOT the remote machine.
I have used both Windows 7 and Windows XP. The remote machine was running
Windows 2003 server.
Note that, if the remote machine is NOT in the full screen mode everything
works fine.
Its only when you make the remote machine as full screen, JNativeHook stops
capturing.
By full screen mode I mean the case when you dont see the host (local)
machine's task bar at all and are seeing the desktop of the remote machine
only.
Let me know what additional details do you want.
Thanks again.
Thanks & Regards
Hemant
Original comment by hkumar.a...@gmail.com
on 22 Jan 2013 at 4:52
[deleted comment]
Hemant,
Thanks for the quick response. It sounds like this will not be possible to
fix, however, I will take a look into it in case I missed something.
Original comment by a...@1stleg.com
on 22 Jan 2013 at 4:55
Hi,
Could you give me a clue as to why does it work in the non-full screen mode
and not on full-screen ?
I could explore it further !
Thanks & Regards
Hemant
Original comment by hkumar.a...@gmail.com
on 22 Jan 2013 at 5:00
For the keyboard hook on windows, jnativehook uses the SetWindowsHookEx with
WH_KEYBOARD_LL and WH_MOUSE_LL. These are the lowest level keyboard hooks that
can be installed via the Windows API. I am guessing that when in full screen
mode, Microsoft has probably decided to get keyboard input directly (from the
kernel?) and bypassed their own API for event delivery... You could try
implementing a workaround near
[https://code.google.com/p/jnativehook/source/browse/branches/1.1/src/native/win
dows/NativeThread.c#482 line 482] but I am not sure if anything can be done.
The only thing I can think of is dll injection directly into the RDP client
application but that will be difficult and wont work for any other application.
Original comment by a...@1stleg.com
on 22 Jan 2013 at 5:16
Thanks. Will take a look. Will revert in case I can think of something. Do
let me know in case you come up with something.
Thanks & Regards
Hemant
Original comment by hkumar.a...@gmail.com
on 22 Jan 2013 at 5:21
Just an update. The only information I have found regarding this problem is
outlined here:
http://stackoverflow.com/questions/14596117/setwindowshookex-wm-keyboard-ll-not-
coming-through-with-full-screen-rdc/14613658
I have not tested their proposed solution so no idea if it will even work. You
maybe able to test it in java by restarting the native hook in some kind of
timer and opening RDP in full screen, then wait and see if it receives any
events.
Original comment by a...@1stleg.com
on 1 Mar 2013 at 12:28
I know it has been close to forever, but this bug is now fixed in the trunk.
See issue https://github.com/kwhat/jnativehook/issues/30 for more information.
Original comment by a...@1stleg.com
on 2 Jan 2015 at 6:24
Original issue reported on code.google.com by
hkumar.a...@gmail.com
on 21 Jan 2013 at 2:26