rendered paste bodyCEGUI::uint SDLKeyToCEGUIKey(SDLKey key)
{
using namespace CEGUI;
switch (key)
{
case SDLK_BACKSPACE: return Key::Backspace;
case SDLK_TAB: return Key::Tab;
case SDLK_RETURN: return Key::Return;
case SDLK_PAUSE: return Key::Pause;
case SDLK_ESCAPE: return Key::Escape;
case SDLK_SPACE: return Key::Space;
case SDLK_PLUS: return Key::Plus;
case SDLK_COMMA: return Key::Comma;
case SDLK_MINUS: return Key::Minus;
case SDLK_PERIOD: return Key::Period;
case SDLK_SLASH: return Key::Slash;
case SDLK_0: return Key::Zero;
case SDLK_1: return Key::One;
case SDLK_2: return Key::Two;
case SDLK_3: return Key::Three;
case SDLK_4: return Key::Four;
case SDLK_5: return Key::Five;
case SDLK_6: return Key::Six;
case SDLK_7: return Key::Seven;
case SDLK_8: return Key::Eight;
case SDLK_9: return Key::Nine;
case SDLK_COLON: return Key::Colon;
case SDLK_SEMICOLON: return Key::Semicolon;
case SDLK_EQUALS: return Key::Equals;
case SDLK_LEFTBRACKET: return Key::LeftBracket;
case SDLK_BACKSLASH: return Key::Backslash;
case SDLK_RIGHTBRACKET: return Key::RightBracket;
case SDLK_a: return Key::A;
case SDLK_b: return Key::B;
case SDLK_c: return Key::C;
case SDLK_d: return Key::D;
case SDLK_e: return Key::E;
case SDLK_f: return Key::F;
case SDLK_g: return Key::G;
case SDLK_h: return Key::H;
case SDLK_i: return Key::I;
case SDLK_j: return Key::J;
case SDLK_k: return Key::K;
case SDLK_l: return Key::L;
case SDLK_m: return Key::M;
case SDLK_n: return Key::N;
case SDLK_o: return Key::O;
case SDLK_p: return Key::P;
case SDLK_q: return Key::Q;
case SDLK_r: return Key::R;
case SDLK_s: return Key::S;
case SDLK_t: return Key::T;
case SDLK_u: return Key::U;
case SDLK_v: return Key::V;
case SDLK_w: return Key::W;
case SDLK_x: return Key::X;
case SDLK_y: return Key::Y;
case SDLK_z: return Key::Z;
case SDLK_DELETE: return Key::Delete;
case SDLK_KP0: return Key::NumPad0;
case SDLK_KP1: return Key::NumPad1;
case SDLK_KP2: return Key::NumPad2;
case SDLK_KP3: return Key::NumPad3;
case SDLK_KP4: return Key::NumPad4;
case SDLK_KP5: return Key::NumPad5;
case SDLK_KP6: return Key::NumPad6;
case SDLK_KP7: return Key::NumPad7;
case SDLK_KP8: return Key::NumPad8;
case SDLK_KP9: return Key::NumPad9;
case SDLK_KP_PERIOD: return Key::Decimal;
case SDLK_KP_DIVIDE: return Key::Divide;
case SDLK_KP_MULTIPLY: return Key::Multiply;
case SDLK_KP_MINUS: return Key::Subtract;
case SDLK_KP_PLUS: return Key::Add;
case SDLK_KP_ENTER: return Key::NumpadEnter;
case SDLK_KP_EQUALS: return Key::NumpadEquals;
case SDLK_UP: return Key::ArrowUp;
case SDLK_DOWN: return Key::ArrowDown;
case SDLK_RIGHT: return Key::ArrowRight;
case SDLK_LEFT: return Key::ArrowLeft;
case SDLK_INSERT: return Key::Insert;
case SDLK_HOME: return Key::Home;
case SDLK_END: return Key::End;
case SDLK_PAGEUP: return Key::PageUp;
case SDLK_PAGEDOWN: return Key::PageDown;
case SDLK_F1: return Key::F1;
case SDLK_F2: return Key::F2;
case SDLK_F3: return Key::F3;
case SDLK_F4: return Key::F4;
case SDLK_F5: return Key::F5;
case SDLK_F6: return Key::F6;
case SDLK_F7: return Key::F7;
case SDLK_F8: return Key::F8;
case SDLK_F9: return Key::F9;
case SDLK_F10: return Key::F10;
case SDLK_F11: return Key::F11;
case SDLK_F12: return Key::F12;
case SDLK_F13: return Key::F13;
case SDLK_F14: return Key::F14;
case SDLK_F15: return Key::F15;
case SDLK_NUMLOCK: return Key::NumLock;
case SDLK_CAPSLOCK: return Key::CapsLock;
case SDLK_SCROLLOCK: return Key::ScrollLock;
case SDLK_RSHIFT: return Key::RightShift;
case SDLK_LSHIFT: return Key::LeftShift;
case SDLK_RCTRL: return Key::RightControl;
case SDLK_LCTRL: return Key::LeftControl;
case SDLK_RALT: return Key::RightAlt;
case SDLK_LALT: return Key::LeftAlt;
case SDLK_LSUPER: return Key::LeftWindows;
case SDLK_RSUPER: return Key::RightWindows;
case SDLK_SYSREQ: return Key::SysRq;
case SDLK_MENU: return Key::AppMenu;
case SDLK_POWER: return Key::Power;
}
}
/* Unused key syms
SDLK_CLEAR
SDLK_EXCLAIM SDLK_QUOTEDBL SDLK_HASH SDLK_DOLLAR SDLK_AMPERSAND SDLK_QUOTE SDLK_LEFTPAREN SDLK_RIGHTPAREN SDLK_ASTERISK
SDLK_LESS SDLK_GREATER SDLK_QUESTION SDLK_AT SDLK_CARET
SDLK_UNDERSCORE SDLK_BACKQUOTE
SDLK_WORLD_0 SDLK_WORLD_1 SDLK_WORLD_2 SDLK_WORLD_3 SDLK_WORLD_4 SDLK_WORLD_5 SDLK_WORLD_6 SDLK_WORLD_7 SDLK_WORLD_8 SDLK_WORLD_9 SDLK_WORLD_10 SDLK_WORLD_11 SDLK_WORLD_12 SDLK_WORLD_13 SDLK_WORLD_14 SDLK_WORLD_15 SDLK_WORLD_16 SDLK_WORLD_17 SDLK_WORLD_18 SDLK_WORLD_19 SDLK_WORLD_20 SDLK_WORLD_21 SDLK_WORLD_22 SDLK_WORLD_23 SDLK_WORLD_24 SDLK_WORLD_25 SDLK_WORLD_26 SDLK_WORLD_27 SDLK_WORLD_28 SDLK_WORLD_29 SDLK_WORLD_30 SDLK_WORLD_31 SDLK_WORLD_32 SDLK_WORLD_33 SDLK_WORLD_34 SDLK_WORLD_35 SDLK_WORLD_36 SDLK_WORLD_37 SDLK_WORLD_38 SDLK_WORLD_39 SDLK_WORLD_40 SDLK_WORLD_41 SDLK_WORLD_42 SDLK_WORLD_43 SDLK_WORLD_44 SDLK_WORLD_45 SDLK_WORLD_46 SDLK_WORLD_47 SDLK_WORLD_48 SDLK_WORLD_49 SDLK_WORLD_50 SDLK_WORLD_51 SDLK_WORLD_52 SDLK_WORLD_53 SDLK_WORLD_54 SDLK_WORLD_55 SDLK_WORLD_56 SDLK_WORLD_57 SDLK_WORLD_58 SDLK_WORLD_59 SDLK_WORLD_60 SDLK_WORLD_61 SDLK_WORLD_62 SDLK_WORLD_63 SDLK_WORLD_64 SDLK_WORLD_65 SDLK_WORLD_66 SDLK_WORLD_67 SDLK_WORLD_68 SDLK_WORLD_69 SDLK_WORLD_70 SDLK_WORLD_71 SDLK_WORLD_72 SDLK_WORLD_73 SDLK_WORLD_74 SDLK_WORLD_75 SDLK_WORLD_76 SDLK_WORLD_77 SDLK_WORLD_78 SDLK_WORLD_79 SDLK_WORLD_80 SDLK_WORLD_81 SDLK_WORLD_82 SDLK_WORLD_83 SDLK_WORLD_84 SDLK_WORLD_85 SDLK_WORLD_86 SDLK_WORLD_87 SDLK_WORLD_88 SDLK_WORLD_89 SDLK_WORLD_90 SDLK_WORLD_91 SDLK_WORLD_92 SDLK_WORLD_93 SDLK_WORLD_94 SDLK_WORLD_95
SDLK_RMETA SDLK_LMETA SDLK_MODE SDLK_COMPOSE SDLK_HELP SDLK_PRINT SDLK_BREAK SDLK_EURO SDLK_UNDO
*/