Ciao,
tramite window.event.type dovresti sapere quale evento è stato scatenato.

Ciao