Crate uievents_code

Source
Expand description

§uievents-code

crates.io crates.io

Crate offering constants for the KeyboardEvent.code property, according to the latest (as of 11 February, 2023) W3C Candidate Recommendation, 01 June 2017.

When using web_sys, you can obtain the value of the KeyboardEvent.code property from web_sys::KeyboardEvent::code(&self).

§Features

  • legacy (disabled by default) - enables constants for legacy keys.
  • non_standard_intl (disabled by default) - enables constants for non-standard. keys on international keyboards.
  • enum (disabled by default) - enables the KeyboardEventCode enum with all the known constants.

§License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Re-exports§

pub use writing_system::*;
pub use functional::*;
pub use self::control_pad::*;
pub use self::arrow_pad::*;
pub use self::numpad::*;
pub use self::function::*;
pub use self::media::*;
pub use self::legacy::*;legacy
pub use self::non_standard_intl::*;non_standard_intl
pub use self::special::*;

Modules§

arrow_pad
Arrow Pad Keys as defined in https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-arrowpad-section
control_pad
Control Pad Keys as defined in https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-controlpad-section.
function
Function Keys as defined in https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-function-section
functional
Functional Keys as defined in https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-alphanumeric-functional.
legacylegacy
Legacy Keys as defined in https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-legacy.
media
Media Keys as defined in https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-media.
non_standard_intlnon_standard_intl
Non-Standard International Keys as defined in https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-legacy
numpad
Numpad Keys as defined in https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-numpad-section
special
Special Keys as defined in https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-legacy. Currently, only the Unidentified key is defined.
writing_system
Writing System Keys as defined in https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-alphanumeric-writing-system.

Enums§

KeyboardEventCodeenum
Enum with various KeyboardEvent.code values as per the latest the latest (as of 11 February, 2023) W3C Candidate Recommendation, 01 June 2017.