viewpoint_core/page/keyboard/keys/definition.rs
1//! Key definition type for keyboard input.
2
3/// Key definition with all required properties for CDP.
4#[derive(Debug, Clone)]
5pub struct KeyDefinition {
6 /// The key code (e.g., "`KeyA`", "Enter").
7 pub code: &'static str,
8 /// The key value (e.g., "a", "Enter").
9 pub key: &'static str,
10 /// Windows virtual key code.
11 pub key_code: i32,
12 /// The text generated by this key (if any).
13 pub text: Option<&'static str>,
14 /// Whether this key is on the keypad.
15 pub is_keypad: bool,
16 /// The location of the key (0 = standard, 1 = left, 2 = right, 3 = numpad).
17 pub location: i32,
18}