Skip to content

Commit aeb9045

Browse files
authored
Add code getter for Keyboard events (#50)
1 parent 0334f13 commit aeb9045

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/ReactEvent.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ module Keyboard = {
8282
})
8383
@get external altKey: t => bool = "altKey"
8484
@get external charCode: t => int = "charCode"
85+
@get external code: t => string = "code"
8586
@get external ctrlKey: t => bool = "ctrlKey"
8687
@send
8788
external getModifierState: (t, string) => bool = "getModifierState"

src/ReactEvent.resi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ module Keyboard: {
130130
@send external persist: t => unit = "persist"
131131
@get external altKey: t => bool = "altKey"
132132
@get external charCode: t => int = "charCode"
133+
@get external code: t => string = "code"
133134
@get external ctrlKey: t => bool = "ctrlKey"
134135
@send
135136
external getModifierState: (t, string) => bool = "getModifierState"

0 commit comments

Comments
 (0)