Welcome, Guest. Please login or register.

Author Topic: AmiBrowser & broken JavaScript keyboard events  (Read 36 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline mike-tawsTopic starter

  • Newbie
  • *
  • Join Date: Apr 2025
  • Posts: 7
  • Country: ch
  • Thanked: 1 times
  • Gender: Male
  • Amiga fan from almost the beginning.
    • mrupp.ch
AmiBrowser & broken JavaScript keyboard events
« on: February 16, 2026, 05:51:53 PM »
Hi there

First of all, kudos for AmiBrowser, that's really a neat trick with the backend rendering and all. Very well done!
I was surprised in seeing how well my TAWS project (https://taws.ch) runs on it. After some more intense testing, I noticed something, though: keyboard control with the simulated HippoPlayer doesn't seem to work properly and now I finally triggered it down to why that is:

It seems that JavaScript keyboard events are... well... behaving strange, to put it mildly. Here's a test page and you'll notice the wild things it reports with AmiBrowser when comparing to any other browsers:
https://mrupp.ch/Test/KeyTest.htm

Most keys report a correct "key", but some faulty "code". "Enter" key reports "code" as F2 or even F18 on the "onkeyup" event. If you try a non u.s. keyboard layout (like german) things get mixed up even more: some events still report a "z" to be a "y", but "onkeypress" reports a correct "keyChar" nevertheless.

This has been tested with AmiBrowser 46.37 (13.02.26).

Keep up the good work and I hope that my little test page helps in tracking this down and fixing it.

Cheers,
Michael
Check out TAWS - The Amiga Workbench Simulation
taws.ch