1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = UiEvent , extends = Event , extends = :: js_sys :: Object , js_name = KeyboardEvent , typescript_type = "KeyboardEvent")]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `KeyboardEvent` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub type KeyboardEvent;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = charCode)]
    #[doc = "Getter for the `charCode` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/charCode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn char_code(this: &KeyboardEvent) -> u32;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = keyCode)]
    #[doc = "Getter for the `keyCode` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn key_code(this: &KeyboardEvent) -> u32;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = altKey)]
    #[doc = "Getter for the `altKey` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/altKey)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn alt_key(this: &KeyboardEvent) -> bool;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = ctrlKey)]
    #[doc = "Getter for the `ctrlKey` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/ctrlKey)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn ctrl_key(this: &KeyboardEvent) -> bool;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = shiftKey)]
    #[doc = "Getter for the `shiftKey` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/shiftKey)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn shift_key(this: &KeyboardEvent) -> bool;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = metaKey)]
    #[doc = "Getter for the `metaKey` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/metaKey)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn meta_key(this: &KeyboardEvent) -> bool;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = location)]
    #[doc = "Getter for the `location` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/location)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn location(this: &KeyboardEvent) -> u32;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = repeat)]
    #[doc = "Getter for the `repeat` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn repeat(this: &KeyboardEvent) -> bool;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = isComposing)]
    #[doc = "Getter for the `isComposing` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn is_composing(this: &KeyboardEvent) -> bool;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = key)]
    #[doc = "Getter for the `key` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn key(this: &KeyboardEvent) -> String;
    # [wasm_bindgen (structural , method , getter , js_class = "KeyboardEvent" , js_name = code)]
    #[doc = "Getter for the `code` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn code(this: &KeyboardEvent) -> String;
    #[wasm_bindgen(catch, constructor, js_class = "KeyboardEvent")]
    #[doc = "The `new KeyboardEvent(..)` constructor, creating a new instance of `KeyboardEvent`."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn new(type_arg: &str) -> Result<KeyboardEvent, JsValue>;
    #[cfg(feature = "KeyboardEventInit")]
    #[wasm_bindgen(catch, constructor, js_class = "KeyboardEvent")]
    #[doc = "The `new KeyboardEvent(..)` constructor, creating a new instance of `KeyboardEvent`."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`, `KeyboardEventInit`*"]
    pub fn new_with_keyboard_event_init_dict(
        type_arg: &str,
        keyboard_event_init_dict: &KeyboardEventInit,
    ) -> Result<KeyboardEvent, JsValue>;
    # [wasm_bindgen (method , structural , js_class = "KeyboardEvent" , js_name = getModifierState)]
    #[doc = "The `getModifierState()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn get_modifier_state(this: &KeyboardEvent, key: &str) -> bool;
    # [wasm_bindgen (catch , method , structural , js_class = "KeyboardEvent" , js_name = initKeyboardEvent)]
    #[doc = "The `initKeyboardEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn init_keyboard_event(this: &KeyboardEvent, type_arg: &str) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "KeyboardEvent" , js_name = initKeyboardEvent)]
    #[doc = "The `initKeyboardEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn init_keyboard_event_with_bubbles_arg(
        this: &KeyboardEvent,
        type_arg: &str,
        bubbles_arg: bool,
    ) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "KeyboardEvent" , js_name = initKeyboardEvent)]
    #[doc = "The `initKeyboardEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg(
        this: &KeyboardEvent,
        type_arg: &str,
        bubbles_arg: bool,
        cancelable_arg: bool,
    ) -> Result<(), JsValue>;
    #[cfg(feature = "Window")]
    # [wasm_bindgen (catch , method , structural , js_class = "KeyboardEvent" , js_name = initKeyboardEvent)]
    #[doc = "The `initKeyboardEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`, `Window`*"]
    pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg(
        this: &KeyboardEvent,
        type_arg: &str,
        bubbles_arg: bool,
        cancelable_arg: bool,
        view_arg: Option<&Window>,
    ) -> Result<(), JsValue>;
    #[cfg(feature = "Window")]
    # [wasm_bindgen (catch , method , structural , js_class = "KeyboardEvent" , js_name = initKeyboardEvent)]
    #[doc = "The `initKeyboardEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`, `Window`*"]
    pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg(
        this: &KeyboardEvent,
        type_arg: &str,
        bubbles_arg: bool,
        cancelable_arg: bool,
        view_arg: Option<&Window>,
        key_arg: &str,
    ) -> Result<(), JsValue>;
    #[cfg(feature = "Window")]
    # [wasm_bindgen (catch , method , structural , js_class = "KeyboardEvent" , js_name = initKeyboardEvent)]
    #[doc = "The `initKeyboardEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`, `Window`*"]
    pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg(
        this: &KeyboardEvent,
        type_arg: &str,
        bubbles_arg: bool,
        cancelable_arg: bool,
        view_arg: Option<&Window>,
        key_arg: &str,
        location_arg: u32,
    ) -> Result<(), JsValue>;
    #[cfg(feature = "Window")]
    # [wasm_bindgen (catch , method , structural , js_class = "KeyboardEvent" , js_name = initKeyboardEvent)]
    #[doc = "The `initKeyboardEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`, `Window`*"]
    pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key(
        this: &KeyboardEvent,
        type_arg: &str,
        bubbles_arg: bool,
        cancelable_arg: bool,
        view_arg: Option<&Window>,
        key_arg: &str,
        location_arg: u32,
        ctrl_key: bool,
    ) -> Result<(), JsValue>;
    #[cfg(feature = "Window")]
    # [wasm_bindgen (catch , method , structural , js_class = "KeyboardEvent" , js_name = initKeyboardEvent)]
    #[doc = "The `initKeyboardEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`, `Window`*"]
    pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key_and_alt_key(
        this: &KeyboardEvent,
        type_arg: &str,
        bubbles_arg: bool,
        cancelable_arg: bool,
        view_arg: Option<&Window>,
        key_arg: &str,
        location_arg: u32,
        ctrl_key: bool,
        alt_key: bool,
    ) -> Result<(), JsValue>;
    #[cfg(feature = "Window")]
    # [wasm_bindgen (catch , method , structural , js_class = "KeyboardEvent" , js_name = initKeyboardEvent)]
    #[doc = "The `initKeyboardEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`, `Window`*"]
    pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key_and_alt_key_and_shift_key(
        this: &KeyboardEvent,
        type_arg: &str,
        bubbles_arg: bool,
        cancelable_arg: bool,
        view_arg: Option<&Window>,
        key_arg: &str,
        location_arg: u32,
        ctrl_key: bool,
        alt_key: bool,
        shift_key: bool,
    ) -> Result<(), JsValue>;
    #[cfg(feature = "Window")]
    # [wasm_bindgen (catch , method , structural , js_class = "KeyboardEvent" , js_name = initKeyboardEvent)]
    #[doc = "The `initKeyboardEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/initKeyboardEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`, `Window`*"]
    pub fn init_keyboard_event_with_bubbles_arg_and_cancelable_arg_and_view_arg_and_key_arg_and_location_arg_and_ctrl_key_and_alt_key_and_shift_key_and_meta_key(
        this: &KeyboardEvent,
        type_arg: &str,
        bubbles_arg: bool,
        cancelable_arg: bool,
        view_arg: Option<&Window>,
        key_arg: &str,
        location_arg: u32,
        ctrl_key: bool,
        alt_key: bool,
        shift_key: bool,
        meta_key: bool,
    ) -> Result<(), JsValue>;
}
impl KeyboardEvent {
    #[doc = "The `KeyboardEvent.DOM_KEY_LOCATION_STANDARD` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub const DOM_KEY_LOCATION_STANDARD: u32 = 0u64 as u32;
    #[doc = "The `KeyboardEvent.DOM_KEY_LOCATION_LEFT` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub const DOM_KEY_LOCATION_LEFT: u32 = 1u64 as u32;
    #[doc = "The `KeyboardEvent.DOM_KEY_LOCATION_RIGHT` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub const DOM_KEY_LOCATION_RIGHT: u32 = 2u64 as u32;
    #[doc = "The `KeyboardEvent.DOM_KEY_LOCATION_NUMPAD` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `KeyboardEvent`*"]
    pub const DOM_KEY_LOCATION_NUMPAD: u32 = 3u64 as u32;
}