Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Nov 12, 2015
1 parent 8844190 commit 4f65538
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/test/run-pass/issue-29740.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ fn key_from_string(key_string: &str, location: u32) -> Option<Key> {
"}" => Some(Key::RightBracket),
"]" => Some(Key::RightBracket),
"Escape" => Some(Key::Escape),
"Enter" if location == KeyboardEventConstants::DOM_KEY_LOCATION_STANDARD => Some(Key::Enter),
"Enter" if location == KeyboardEventConstants::DOM_KEY_LOCATION_STANDARD
=> Some(Key::Enter),
"Tab" => Some(Key::Tab),
"Backspace" => Some(Key::Backspace),
"Insert" => Some(Key::Insert),
Expand Down Expand Up @@ -300,16 +301,23 @@ fn key_from_string(key_string: &str, location: u32) -> Option<Key> {
"*" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD => Some(Key::KpMultiply),
"-" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD => Some(Key::KpSubtract),
"+" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD => Some(Key::KpAdd),
"Enter" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD => Some(Key::KpEnter),
"Enter" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD
=> Some(Key::KpEnter),
"=" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD => Some(Key::KpEqual),
"Shift" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT => Some(Key::LeftShift),
"Control" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT => Some(Key::LeftControl),
"Shift" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT
=> Some(Key::LeftShift),
"Control" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT
=> Some(Key::LeftControl),
"Alt" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT => Some(Key::LeftAlt),
"Super" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT => Some(Key::LeftSuper),
"Shift" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT => Some(Key::RightShift),
"Control" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT => Some(Key::RightControl),
"Super" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT
=> Some(Key::LeftSuper),
"Shift" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT
=> Some(Key::RightShift),
"Control" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT
=> Some(Key::RightControl),
"Alt" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT => Some(Key::RightAlt),
"Super" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT => Some(Key::RightSuper),
"Super" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT
=> Some(Key::RightSuper),
"ContextMenu" => Some(Key::Menu),
_ => None
}
Expand Down

0 comments on commit 4f65538

Please sign in to comment.