@@ -242,7 +242,8 @@ fn key_from_string(key_string: &str, location: u32) -> Option<Key> {
242
242
"}" => Some ( Key :: RightBracket ) ,
243
243
"]" => Some ( Key :: RightBracket ) ,
244
244
"Escape" => Some ( Key :: Escape ) ,
245
- "Enter" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_STANDARD => Some ( Key :: Enter ) ,
245
+ "Enter" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_STANDARD
246
+ => Some ( Key :: Enter ) ,
246
247
"Tab" => Some ( Key :: Tab ) ,
247
248
"Backspace" => Some ( Key :: Backspace ) ,
248
249
"Insert" => Some ( Key :: Insert ) ,
@@ -300,16 +301,23 @@ fn key_from_string(key_string: &str, location: u32) -> Option<Key> {
300
301
"*" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_NUMPAD => Some ( Key :: KpMultiply ) ,
301
302
"-" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_NUMPAD => Some ( Key :: KpSubtract ) ,
302
303
"+" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_NUMPAD => Some ( Key :: KpAdd ) ,
303
- "Enter" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_NUMPAD => Some ( Key :: KpEnter ) ,
304
+ "Enter" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_NUMPAD
305
+ => Some ( Key :: KpEnter ) ,
304
306
"=" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_NUMPAD => Some ( Key :: KpEqual ) ,
305
- "Shift" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_LEFT => Some ( Key :: LeftShift ) ,
306
- "Control" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_LEFT => Some ( Key :: LeftControl ) ,
307
+ "Shift" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_LEFT
308
+ => Some ( Key :: LeftShift ) ,
309
+ "Control" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_LEFT
310
+ => Some ( Key :: LeftControl ) ,
307
311
"Alt" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_LEFT => Some ( Key :: LeftAlt ) ,
308
- "Super" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_LEFT => Some ( Key :: LeftSuper ) ,
309
- "Shift" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_RIGHT => Some ( Key :: RightShift ) ,
310
- "Control" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_RIGHT => Some ( Key :: RightControl ) ,
312
+ "Super" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_LEFT
313
+ => Some ( Key :: LeftSuper ) ,
314
+ "Shift" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_RIGHT
315
+ => Some ( Key :: RightShift ) ,
316
+ "Control" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_RIGHT
317
+ => Some ( Key :: RightControl ) ,
311
318
"Alt" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_RIGHT => Some ( Key :: RightAlt ) ,
312
- "Super" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_RIGHT => Some ( Key :: RightSuper ) ,
319
+ "Super" if location == KeyboardEventConstants :: DOM_KEY_LOCATION_RIGHT
320
+ => Some ( Key :: RightSuper ) ,
313
321
"ContextMenu" => Some ( Key :: Menu ) ,
314
322
_ => None
315
323
}
0 commit comments