rustwasm / wasm-bindgen

Facilitating high-level interactions between Wasm modules and JavaScript

Home Page:https://rustwasm.github.io/docs/wasm-bindgen/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backspace does not register in web-sys registered event listener

callmeclover opened this issue · comments

Describe the Bug

Backspace (and all other non-ASCII keys) do not register towards a keypress event listener.

Steps to Reproduce

Simply running the app and typing in keys will log them to the console. (It does not do this for all non-ASCII keys.)

Repository

Expected Behavior

The listener should log the backspace key

Actual Behavior

The listener does not register backspace keystroke. Upon logging all pressed keys, all non-ASCII keys do not log.

Whoops! Forgot my JS docs and accidentally used keypress instead of keydown, which matches non-printable characters. Don't make my mistakes, people.