Opened 3 months ago

Last modified 3 months ago

#15038 new enhancement

Add KeyboardEvent.key and KeyboardEvent.code (DOM2?)

Reported by: sneaky Owned by: pulkomandy
Priority: normal Milestone: Unscheduled
Component: Applications/WebPositive Version: R1/Development
Keywords: webkit Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

Some w3c docs:

https://www.w3.org/TR/uievents/#keydown

https://www.w3.org/TR/uievents/#interface-keyboardevent

Nice www demo/test:

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code

https://keycode.info/

Why:

Mostly for games. Some of the phaser.io demos didn't work.

I can give other examples in telegram.

Attachments (1)

D2.diff (10.2 KB) - added by sneaky 3 months ago.
stab at fix

Download all attachments as: .zip

Change History (5)

Changed 3 months ago by sneaky

Attachment: D2.diff added

stab at fix

comment:1 Changed 3 months ago by sneaky

nope, dom3 attributes... just referring to title... here's a list for codes https://www.w3.org/TR/2014/WD-DOM-Level-3-Events-code-20140612/#keyboard-key-codes

... This is what I was looking for before...

comment:2 Changed 3 months ago by pulkomandy

It would be great if you could submit this as a pull request to github.com/haiku/webkit so that you get proper credit for the work. Otherwise I'll jsut apply the patch, which looks ok at a first glance.

Version 0, edited 3 months ago by pulkomandy (next)

comment:3 Changed 3 months ago by korli

Summary: Add KevboardEvent.key and KeyboardEvent.code (DOM2?)Add KeyboardEvent.key and KeyboardEvent.code (DOM2?)

comment:4 Changed 3 months ago by pulkomandy

Patch has been merged on WebKit side and will be included in the next haikuwebkit release.

Note: See TracTickets for help on using tickets.