Reputation: 3461
Solution found thanks to @Trinh Hoang Nhu:
Credits to @stacker ( Java Keyboard/Mouse activity (even outside of my app) ) http://ksquared.de/blog/2011/07/java-global-system-hook/
Is there any way to detect keystrokes and/or mouse acitivity from javascript even if page is not active? I'd like to just detect if user is idle or not. I'm sure it is not possible in pure javascript, baut mybe some flash applications can do it and iteract with javascript?
Browser addon is also an option. Can browser(firefox) addon monitor keyboard and mouse when inactive?
Also i have no exprience with adobe air, maybe this could be also an option?
NOTE! I want to detect all activity, enev if my page in in backround. Ex: If user is writing it notepad(not in my page), id'd like still know that user is active..
Thanks in advance!
Upvotes: 3
Views: 1949
Reputation: 3461
From comments: Sure, java applet can interact with JS. Java applet have more power than Flash and it may handle thing like your request – Trinh Hoang Nhu
Eventallly found this: ksquared.de/blog/2011/07/java-global-system-hook
Upvotes: 1
Reputation: 2399
yes your can detect keystrokes and/or mouse activity from JavaScript try to look at this post may be this will help you
How can I detect with JavaScript/jQuery if the user is currently active on the page?
Upvotes: 0