Aspects


vs


Onkeydown

This event is triggered when when the user is pressing a key or holding down a key.

Onkeyup

This is a JavaScript event that fires upon releasing a keyboard key

Others

Quality Example
Better

"For browsers that don t support either event you can fall back to onkeydown with a 0ms timer for the check which is a little better than onkeyup"

from question "Javascript form validation "onKeyup vs on keydown""

More preferable

"Usually onkeydown is more preferable then onkeyup for such combo"

from question "Delphi: Cannot capture Ctrl+C if user pressed the sequence too quickly"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0