Skip to content

Commit

Permalink
Fix key_code conversion for character keys
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Dec 15, 2023
1 parent e819c23 commit 36073de
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions winit/src/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,32 +465,32 @@ pub fn key_code(key: &winit::keyboard::Key) -> keyboard::KeyCode {
"8" => KeyCode::Key8,
"9" => KeyCode::Key9,
"0" => KeyCode::Key0,
"A" => KeyCode::A,
"B" => KeyCode::B,
"C" => KeyCode::C,
"D" => KeyCode::D,
"E" => KeyCode::E,
"F" => KeyCode::F,
"G" => KeyCode::G,
"H" => KeyCode::H,
"I" => KeyCode::I,
"J" => KeyCode::J,
"K" => KeyCode::K,
"L" => KeyCode::L,
"M" => KeyCode::M,
"N" => KeyCode::N,
"O" => KeyCode::O,
"P" => KeyCode::P,
"Q" => KeyCode::Q,
"R" => KeyCode::R,
"S" => KeyCode::S,
"T" => KeyCode::T,
"U" => KeyCode::U,
"V" => KeyCode::V,
"W" => KeyCode::W,
"X" => KeyCode::X,
"Y" => KeyCode::Y,
"Z" => KeyCode::Z,
"a" => KeyCode::A,
"b" => KeyCode::B,
"c" => KeyCode::C,
"d" => KeyCode::D,
"e" => KeyCode::E,
"f" => KeyCode::F,
"g" => KeyCode::G,
"h" => KeyCode::H,
"i" => KeyCode::I,
"j" => KeyCode::J,
"k" => KeyCode::K,
"l" => KeyCode::L,
"m" => KeyCode::M,
"n" => KeyCode::N,
"o" => KeyCode::O,
"p" => KeyCode::P,
"q" => KeyCode::Q,
"r" => KeyCode::R,
"s" => KeyCode::S,
"t" => KeyCode::T,
"u" => KeyCode::U,
"v" => KeyCode::V,
"w" => KeyCode::W,
"x" => KeyCode::X,
"y" => KeyCode::Y,
"z" => KeyCode::Z,
_ => KeyCode::Unlabeled,
},
winit::keyboard::Key::Named(named_key) => match named_key {
Expand Down

0 comments on commit 36073de

Please sign in to comment.