Some events in JavaScript fire before others. For example, with an input element, the keydown and keypress events fire first. Then, if the return value from those was not fa
For key events, the following is an excellent resource: http://unixpapa.com/js/key.html. There's also a page for mouse events on the same site at http://unixpapa.com/js/mouse.html that I haven't used, but I imagine is useful based on the key events page.