fn keycode_number(code: KeyCode) -> u32 {
    match code {
        KeyCode::Return => 1,
        KeyCode::Left => 2,
        KeyCode::Right => 3,
        KeyCode::Escape => 4,
        KeyCode::Grave => 5,
        KeyCode::Z => 6,
        KeyCode::X => 7,
        KeyCode::Comma => 8,
        KeyCode::Period => 9,
        _ => 0,
    }
}
// Temporary workaround for ggez's reexported KeyCode not implementing serde traits
Temporary workaround for ggez's reexported KeyCode not implementing serde traits
Temporary workaround for ggez ' s reexported KeyCode not implementing serde traits
fn keycode_number(code: KeyCode) -> u32 {
    match code {
        KeyCode::Return => 1,
        KeyCode::Left => 2,
        KeyCode::Right => 3,
        KeyCode::Escape => 4,
        KeyCode::Grave => 5,
        KeyCode::Z => 6,
        KeyCode::X => 7,
        KeyCode::Comma => 8,
        KeyCode::Period => 9,
        _ => 0,
    }
}
fn keycode_number ( code : KeyCode ) -> u32 { match code { KeyCode :: Return => 1 , KeyCode :: Left => 2 , KeyCode :: Right => 3 , KeyCode :: Escape => 4 , KeyCode :: Grave => 5 , KeyCode :: Z => 6 , KeyCode :: X => 7 , KeyCode :: Comma => 8 , KeyCode :: Period => 9 , _ => 0 , } }
Temporary workaround for ggez's reexported KeyCode not implementing serde traits
Temporary workaround for ggez ' s reexported KeyCode not implementing serde traits
code
KeyCode
code
KeyCode