<div id="debug"></div>
<script>
window.addEventListener('mousedown', function( e ){
if ( e.which == 1 ) {
document.getElementById('debug').innerHTML = 'Mouse left key down';
}
}, false);
window.addEventListener('mouseup', function( e ){
if ( e.which == 1 ) {
document.getElementById('debug').innerHTML = 'Mouse left key up';
}
}, false);
</script>