You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your crate decodes some keys into DecodedKey::RawKey objects. The enum that you provide containing keys has a Backspace variant, but, using QEmu as my example, a backspace is decoded into unicode U+0008, and as a DecodedKey::Unicode.
The text was updated successfully, but these errors were encountered:
That's because I understood 0x08 to be the ASCII value for Backspace, like 0x09 is the ASCII value for Tab. I only used DecodedKey::RawKey when there wasn't a clear mapping to an ASCII (or Unicode) value (e.g. there's no ASCII or even Unicode value corresponding to the Windows key). If you'd rather have raw key events (i.e. the KeyCode enum you mention that includes KeyCode::Backspace, plus an indication of whether the key was pressed or released), you can avoid calling process_keyevent and handle the key events yourself.
It is used if you take KeyEvents and don't decode them.
I can see your point though. I could create a new enum called UndecodableKeys or something. It would include Home, PageUp, etc, but not A, +, or Backspace. You can then match exhaustively without overlaps.
Your crate decodes some keys into
DecodedKey::RawKey
objects. Theenum
that you provide containing keys has aBackspace
variant, but, using QEmu as my example, a backspace is decoded into unicodeU+0008
, and as aDecodedKey::Unicode
.The text was updated successfully, but these errors were encountered: