Search code examples
javascriptflashairweb

Detecting user idle from computer


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!


Solution

  • 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