Closed dbartussek closed 2 years ago
I can't find any documentation whether this is intentional or not.
This example HTML
<html> <head> <script> document.addEventListener('keydown', event => { if (!event.repeat) { document.getElementById("example").innerHTML += `keydown, key ${event.key}, which ${event.which}, whichCharCode ${String.fromCharCode(event.which)}<br>`; } }); document.addEventListener('keypress', event => { if (!event.repeat) { document.getElementById("example").innerHTML += `keypress, key ${event.key}, which ${event.which}, whichCharCode ${String.fromCharCode(event.which)}<br><br>`; } }); </script> </head> <body> <div id="example"></div> </body> </html>
Produces this output in Ultralight
keydown, key , which 65, whichCharCode A keypress, key , which 97, whichCharCode a
In Firefox, it produces
keydown, key a, which 65, whichCharCode A keypress, key a, which 97, whichCharCode a
Thanks for the report! I can reproduce, will fix.
This is fixed in latest trunk.
I can't find any documentation whether this is intentional or not.
This example HTML
Produces this output in Ultralight
In Firefox, it produces