use minifb::Key as MiniKey;
use moa_host::Key;

pub fn map_key(key: MiniKey) -> Key {
    match key {
        MiniKey::Key0 => Key::Num0,
        MiniKey::Key1 => Key::Num1,
        MiniKey::Key2 => Key::Num2,
        MiniKey::Key3 => Key::Num3,
        MiniKey::Key4 => Key::Num4,
        MiniKey::Key5 => Key::Num5,
        MiniKey::Key6 => Key::Num6,
        MiniKey::Key7 => Key::Num7,
        MiniKey::Key8 => Key::Num8,
        MiniKey::Key9 => Key::Num9,
        MiniKey::A => Key::A,
        MiniKey::B => Key::B,
        MiniKey::C => Key::C,
        MiniKey::D => Key::D,
        MiniKey::E => Key::E,
        MiniKey::F => Key::F,
        MiniKey::G => Key::G,
        MiniKey::H => Key::H,
        MiniKey::I => Key::I,
        MiniKey::J => Key::J,
        MiniKey::K => Key::K,
        MiniKey::L => Key::L,
        MiniKey::M => Key::M,
        MiniKey::N => Key::N,
        MiniKey::O => Key::O,
        MiniKey::P => Key::P,
        MiniKey::Q => Key::Q,
        MiniKey::R => Key::R,
        MiniKey::S => Key::S,
        MiniKey::T => Key::T,
        MiniKey::U => Key::U,
        MiniKey::V => Key::V,
        MiniKey::W => Key::W,
        MiniKey::X => Key::X,
        MiniKey::Y => Key::Y,
        MiniKey::Z => Key::Z,
        MiniKey::F1 => Key::F1,
        MiniKey::F2 => Key::F2,
        MiniKey::F3 => Key::F3,
        MiniKey::F4 => Key::F4,
        MiniKey::F5 => Key::F5,
        MiniKey::F6 => Key::F6,
        MiniKey::F7 => Key::F7,
        MiniKey::F8 => Key::F8,
        MiniKey::F9 => Key::F9,
        MiniKey::F10 => Key::F10,
        MiniKey::F11 => Key::F11,
        MiniKey::F12 => Key::F12,
        MiniKey::Down => Key::Down,
        MiniKey::Left => Key::Left,
        MiniKey::Right => Key::Right,
        MiniKey::Up => Key::Up,
        MiniKey::Apostrophe => Key::Apostrophe,
        MiniKey::Backquote => Key::Backquote,
        MiniKey::Backslash => Key::Backslash,
        MiniKey::Comma => Key::Comma,
        MiniKey::Equal => Key::Equals,
        MiniKey::LeftBracket => Key::LeftBracket,
        MiniKey::Minus => Key::Minus,
        MiniKey::Period => Key::Period,
        MiniKey::RightBracket => Key::RightBracket,
        MiniKey::Semicolon => Key::Semicolon,
        MiniKey::Slash => Key::Slash,
        MiniKey::Backspace => Key::Backspace,
        MiniKey::Delete => Key::Delete,
        MiniKey::End => Key::End,
        MiniKey::Enter => Key::Enter,
        MiniKey::Escape => Key::Escape,
        MiniKey::Home => Key::Home,
        MiniKey::Insert => Key::Insert,
        MiniKey::PageDown => Key::PageDown,
        MiniKey::PageUp => Key::PageUp,
        MiniKey::Pause => Key::Pause,
        MiniKey::Space => Key::Space,
        MiniKey::Tab => Key::Tab,
        MiniKey::NumLock => Key::NumLock,
        MiniKey::CapsLock => Key::CapsLock,
        MiniKey::ScrollLock => Key::ScrollLock,
        MiniKey::LeftShift => Key::LeftShift,
        MiniKey::RightShift => Key::RightShift,
        MiniKey::LeftCtrl => Key::LeftCtrl,
        MiniKey::RightCtrl => Key::RightCtrl,
        MiniKey::NumPad0 => Key::NumPad0,
        MiniKey::NumPad1 => Key::NumPad1,
        MiniKey::NumPad2 => Key::NumPad2,
        MiniKey::NumPad3 => Key::NumPad3,
        MiniKey::NumPad4 => Key::NumPad4,
        MiniKey::NumPad5 => Key::NumPad5,
        MiniKey::NumPad6 => Key::NumPad6,
        MiniKey::NumPad7 => Key::NumPad7,
        MiniKey::NumPad8 => Key::NumPad8,
        MiniKey::NumPad9 => Key::NumPad9,
        MiniKey::NumPadDot => Key::NumPadDot,
        MiniKey::NumPadSlash => Key::NumPadSlash,
        MiniKey::NumPadAsterisk => Key::NumPadAsterisk,
        MiniKey::NumPadMinus => Key::NumPadMinus,
        MiniKey::NumPadPlus => Key::NumPadPlus,
        MiniKey::NumPadEnter => Key::NumPadEnter,
        MiniKey::LeftAlt => Key::LeftAlt,
        MiniKey::RightAlt => Key::RightAlt,
        MiniKey::LeftSuper => Key::LeftSuper,
        MiniKey::RightSuper => Key::RightSuper,
        _ => Key::Unknown,
    }
}
