use crate::{Key, KeyMedia as Media, KeyMod as Mod, KeyPad as Pad, init_array, whilst};
pub(crate) const LUT_SCANCODE_TO_KEY: [Key; 256] = {
const fn init(n: usize) -> Key {
Key::Scancode(n as u16)
}
let mut t = init_array![const_fn [Key; 256], "safe_sys", "unsafe_array", init, Key::Unknown];
t[1] = Key::Escape;
t[2] = Key::Digit1;
t[3] = Key::Digit2;
t[4] = Key::Digit3;
t[5] = Key::Digit4;
t[6] = Key::Digit5;
t[7] = Key::Digit6;
t[8] = Key::Digit7;
t[9] = Key::Digit8;
t[10] = Key::Digit9;
t[11] = Key::Digit0;
t[12] = Key::Minus;
t[13] = Key::Equal;
t[14] = Key::Backspace;
t[15] = Key::Tab;
t[16] = Key::Q;
t[17] = Key::W;
t[18] = Key::E;
t[19] = Key::R;
t[20] = Key::T;
t[21] = Key::Y;
t[22] = Key::U;
t[23] = Key::I;
t[24] = Key::O;
t[25] = Key::P;
t[26] = Key::BracketLeft;
t[27] = Key::BracketRight;
t[28] = Key::Enter;
t[29] = Key::Mod(Mod::LeftControl);
t[30] = Key::A;
t[31] = Key::S;
t[32] = Key::D;
t[33] = Key::F;
t[34] = Key::G;
t[35] = Key::H;
t[36] = Key::J;
t[37] = Key::K;
t[38] = Key::L;
t[39] = Key::Semicolon;
t[40] = Key::Quote;
t[41] = Key::Backquote; t[42] = Key::Mod(Mod::LeftShift);
t[43] = Key::Backslash;
t[44] = Key::Z;
t[45] = Key::X;
t[46] = Key::C;
t[47] = Key::V;
t[48] = Key::B;
t[49] = Key::N;
t[50] = Key::M;
t[51] = Key::Comma;
t[52] = Key::Dot;
t[53] = Key::Slash;
t[54] = Key::Mod(Mod::RightShift);
t[55] = Key::Pad(Pad::Multiply);
t[56] = Key::Mod(Mod::LeftAlt);
t[57] = Key::Space;
t[58] = Key::CapsLock;
t[59] = Key::Fn(1);
t[60] = Key::Fn(2);
t[61] = Key::Fn(3);
t[62] = Key::Fn(4);
t[63] = Key::Fn(5);
t[64] = Key::Fn(6);
t[65] = Key::Fn(7);
t[66] = Key::Fn(8);
t[67] = Key::Fn(9);
t[68] = Key::Fn(10);
t[69] = Key::NumLock;
t[70] = Key::ScrollLock;
t[71] = Key::Pad(Pad::Num7);
t[72] = Key::Pad(Pad::Num8);
t[73] = Key::Pad(Pad::Num9);
t[74] = Key::Pad(Pad::Subtract);
t[75] = Key::Pad(Pad::Num4);
t[76] = Key::Pad(Pad::Num5);
t[77] = Key::Pad(Pad::Num6);
t[78] = Key::Pad(Pad::Add);
t[79] = Key::Pad(Pad::Num1);
t[80] = Key::Pad(Pad::Num2);
t[81] = Key::Pad(Pad::Num3);
t[82] = Key::Pad(Pad::Num0);
t[83] = Key::Pad(Pad::Decimal);
t[86] = Key::IntlBackslash; t[87] = Key::Fn(11);
t[88] = Key::Fn(12);
t[96] = Key::Pad(Pad::Enter);
t[97] = Key::Mod(Mod::RightControl);
t[98] = Key::Pad(Pad::Divide);
t[100] = Key::Mod(Mod::RightAlt);
t[102] = Key::Home;
t[103] = Key::Up;
t[104] = Key::PageUp;
t[105] = Key::Left;
t[106] = Key::Right;
t[107] = Key::End;
t[108] = Key::Down;
t[109] = Key::PageDown;
t[110] = Key::Insert;
t[111] = Key::Delete;
t[113] = Key::Media(Media::MuteVolume);
t[114] = Key::Media(Media::LowerVolume);
t[115] = Key::Media(Media::RaiseVolume);
t[116] = Key::Media(Media::Power);
t[117] = Key::Pad(Pad::Equal);
t[119] = Key::Pause;
t[121] = Key::Pad(Pad::Comma);
t[125] = Key::Mod(Mod::LeftSuper);
t[126] = Key::Mod(Mod::RightSuper);
t[139] = Key::Menu;
t[142] = Key::Media(Media::Sleep);
t[143] = Key::Media(Media::Wake);
t[161] = Key::Media(Media::Eject);
t[163] = Key::Media(Media::Next);
t[164] = Key::Media(Media::PlayPause);
t[165] = Key::Media(Media::Previous);
t[166] = Key::Media(Media::Stop);
t[167] = Key::Media(Media::Record);
t[168] = Key::Media(Media::Rewind);
t[183] = Key::Fn(13);
t[184] = Key::Fn(14);
t[185] = Key::Fn(15);
t[186] = Key::Fn(16);
t[187] = Key::Fn(17);
t[188] = Key::Fn(18);
t[189] = Key::Fn(19);
t[190] = Key::Fn(20);
t[191] = Key::Fn(21);
t[192] = Key::Fn(22);
t[193] = Key::Fn(23);
t[194] = Key::Fn(24);
t[200] = Key::Media(Media::Play);
t[201] = Key::Media(Media::Pause);
t[207] = Key::Media(Media::Play);
t[208] = Key::Media(Media::FastForward);
t[209] = Key::Media(Media::BassBoost);
t[210] = Key::PrintScreen;
t[224] = Key::Media(Media::BrightnessDown);
t[225] = Key::Media(Media::BrightnessUp);
t[240] = Key::Unknown;
t[248] = Key::Media(Media::MicrophoneMute);
t
};