A client of mine asked me if it was possible through a webapp to completely disable both client's keyboard & mouse. Ideally in jQuery or Html5.
I saw a way to do it but only on the web page not the whole keyboard.
A client of mine asked me if it was possible through a webapp to completely disable both client's keyboard & mouse. Ideally in jQuery or Html5.
I saw a way to do it but only on the web page not the whole keyboard.
Have you tried something like
$(document).ready(function () {
$(document).bind("keypress", function (e) {
// Prevent any key
return false;
});
$(document).bind("click", function(e) {
// Prevent clicks
return false;
});
});
It should work, but not sure if it's cross browser.
Added the click
handler also.
Using AutoIt3, for example, it's very simple. But from webapps, block mouse and keyboard for all the OS' environment isn't possible.
In AutoIt3, here's an example:
; By default, AU3 add an tray icon for closing the app. No longer:
#NoTrayIcon
; For >=Vista, windows will require administrator privilleges to do that
#RequireAdmin
; Now...
BlockInput(1) ; mouse and keyboard are both lockeds!
While 1
Sleep(100) ; loop for pause script
WEnd
Just compile that and run.