I tried to detect which mouse button -if any- is the user pressing during a mousemove event under jQuery, but I\'m getting ambiguous results:
no button press
Most browsers (except Safari) *) now support the MouseEvent.buttons
property (note: plural "buttons"), which is 1 when the left mouse button is pressed:
$('#whichkey').bind('mousemove', function(e) {
$('#log').html('Pressed: ' + e.buttons);
});
https://jsfiddle.net/pdz2nzon/2
*) The world is moving forward:
https://webkit.org/blog/8016/release-notes-for-safari-technology-preview-43/
https://trac.webkit.org/changeset/223264/webkit/
https://bugs.webkit.org/show_bug.cgi?id=178214