Hello there, is it possible for javascript to lock a mouse when you click on a button or a div? I was doing some google search but I failed to find a script for locking a keyboard or mouse. I just would want to add this feature on my site. Thanks!
jaepi
22
Practically a Master Poster
Recommended Answers
Jump to PostNo. No sane browser / OS setup will let a webpage 'lock the keyboard or mouse'. Think for 30 seconds why this is the case.
If you want to disable all interaction with your site when the user clicks something.. oh-k, something like
document.body.disabled = true/false;
should suffice, although …
Jump to PostIf the mouse is locked, how do you click again to unlock it?
What do you mean exactly by 'locked'? I took that to mean disabled/no longer functional.
All 6 Replies
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
jaepi
22
Practically a Master Poster
MattEvans
473
Veteran Poster
Team Colleague
Featured Poster
jaepi
22
Practically a Master Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
MidiMagic
579
Nearly a Senior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.