Skip to content

Commit 6d773bb

Browse files
committed
Merge pull request #56 from l15k4/charCode
Add charCode method binding to KeyboardEvent
2 parents 9384ae4 + c6a2319 commit 6d773bb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/scala/org/scalajs/dom/lib.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,8 +2357,19 @@ class Touch extends js.Object {
23572357
* text from hand-writing system like tablet PC, key events may not be fired.
23582358
*
23592359
* MDN
2360+
*
2361+
* Warning: keypress event is to be deprecated in favor of beforeinput event eventually
2362+
*
2363+
* W3C
23602364
*/
23612365
class KeyboardEvent extends UIEvent with ModifierKeyEvent {
2366+
/**
2367+
* Returns the Unicode value of a character key pressed during a keypress event.
2368+
*
2369+
* Note: Required especially in Gecko based browsers
2370+
*/
2371+
def charCode: Int = ???
2372+
23622373
/**
23632374
* A system and implementation dependent numerical code identifying the
23642375
* unmodified value of the pressed key. This is usually the decimal ASCII

0 commit comments

Comments
 (0)