07-09-2021, 02:32 AM
(This post was last modified: 07-09-2021, 11:57 AM by Jose Nilton Pace.)
Hi Paul, maybe I didn't explain it clearly... I didn't say that you should replace all your OnKeyPress events with OnKeyDown events for all your requirements.
They are different events and they behave differently. More importantly:
*The keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered*
Please have a look at the spec: https://developer.mozilla.org/en-US/docs...down_event
So, don't expect OnKeyDown/Up and OnKeyPress events to receive the same parameters when they are triggered. They won't.
They are different events and they behave differently. More importantly:
*The keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered*
Please have a look at the spec: https://developer.mozilla.org/en-US/docs...down_event
So, don't expect OnKeyDown/Up and OnKeyPress events to receive the same parameters when they are triggered. They won't.