Fix the event key code variable name (#1219)

This commit is contained in:
Ryan G 2019-10-11 11:41:49 -04:00 committed by GitHub
parent 157ca9cd17
commit bedb889693
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ pub fn mouse_scroll_delta(event: &MouseWheelEvent) -> Option<MouseScrollDelta> {
}
pub fn scan_code<T: JsSerialize>(event: &T) -> ScanCode {
let key_code = js! ( return @{event}.key_code; );
let key_code = js! ( return @{event}.keyCode; );
key_code
.try_into()