QTfrontend/sdlkeys.h
changeset 13515 c5365f05d4de
parent 13175 9f6f2e51d2ef
child 14532 e1ae6d8e84b0
equal deleted inserted replaced
13514:31d0b0911cba 13515:c5365f05d4de
    14  * You should have received a copy of the GNU General Public License
    14  * You should have received a copy of the GNU General Public License
    15  * along with this program; if not, write to the Free Software
    15  * along with this program; if not, write to the Free Software
    16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    17  */
    17  */
    18 
    18 
    19 char sdlkeys[1024][2][128] =
    19 #ifndef SDLKEYS_H
    20 {
    20 #define SDLKEYS_H
    21     {"mousel", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Left button")},
       
    22     {"mousem", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Middle button")},
       
    23     {"mouser", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Right button")},
       
    24     {"wheelup", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel up")},
       
    25     {"wheeldown", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel down")},
       
    26     {"backspace", QT_TRANSLATE_NOOP("binds (keys)", "Backspace")},
       
    27     {"tab", QT_TRANSLATE_NOOP("binds (keys)", "Tab")},
       
    28     {"clear", QT_TRANSLATE_NOOP("binds (keys)", "Clear")},
       
    29     {"return", QT_TRANSLATE_NOOP("binds (keys)", "Return")},
       
    30     {"pause", QT_TRANSLATE_NOOP("binds (keys)", "Pause")},
       
    31     {"escape", QT_TRANSLATE_NOOP("binds (keys)", "Escape")},
       
    32     {"space", QT_TRANSLATE_NOOP("binds (keys)", "Space")},
       
    33     {"!", "!"},
       
    34     {"\"", "\""},
       
    35     {"#", "#"},
       
    36     {"$", "$"},
       
    37     {"&", "&"},
       
    38     {"'", "'"},
       
    39     {"(", "("},
       
    40     {")", ")"},
       
    41     {"*", "*"},
       
    42     {"+", "+"},
       
    43     {",", ","},
       
    44     {"-", "-"},
       
    45     {".", "."},
       
    46     {"/", "/"},
       
    47     {"0", "0"},
       
    48     {"1", "1"},
       
    49     {"2", "2"},
       
    50     {"3", "3"},
       
    51     {"4", "4"},
       
    52     {"5", "5"},
       
    53     {"6", "6"},
       
    54     {"7", "7"},
       
    55     {"8", "8"},
       
    56     {"9", "9"},
       
    57     {":", ":"},
       
    58     {";", ";"},
       
    59     {"<", "<"},
       
    60     {"=", "="},
       
    61     {">", ">"},
       
    62     {"?", "?"},
       
    63     {"@", "@"},
       
    64     {"[", "["},
       
    65     {"\\", "\\"},
       
    66     {"]", "]"},
       
    67     {"^", "^"},
       
    68     {"_", "_"},
       
    69     {"`", "`"},
       
    70     {"a", "A"},
       
    71     {"b", "B"},
       
    72     {"c", "C"},
       
    73     {"d", "D"},
       
    74     {"e", "E"},
       
    75     {"f", "F"},
       
    76     {"g", "G"},
       
    77     {"h", "H"},
       
    78     {"i", "I"},
       
    79     {"j", "J"},
       
    80     {"k", "K"},
       
    81     {"l", "L"},
       
    82     {"m", "M"},
       
    83     {"n", "N"},
       
    84     {"o", "O"},
       
    85     {"p", "P"},
       
    86     {"q", "Q"},
       
    87     {"r", "R"},
       
    88     {"s", "S"},
       
    89     {"t", "T"},
       
    90     {"u", "U"},
       
    91     {"v", "V"},
       
    92     {"w", "W"},
       
    93     {"x", "X"},
       
    94     {"y", "Y"},
       
    95     {"z", "Z"},
       
    96     {"delete", QT_TRANSLATE_NOOP("binds (keys)", "Delete")},
       
    97     {"keypad_0", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 0")},
       
    98     {"keypad_1", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 1")},
       
    99     {"keypad_2", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 2")},
       
   100     {"keypad_3", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 3")},
       
   101     {"keypad_4", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 4")},
       
   102     {"keypad_5", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 5")},
       
   103     {"keypad_6", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 6")},
       
   104     {"keypad_7", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 7")},
       
   105     {"keypad_8", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 8")},
       
   106     {"keypad_9", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 9")},
       
   107     {"keypad_.", QT_TRANSLATE_NOOP("binds (keys)", "Numpad .")},
       
   108     {"keypad_/", QT_TRANSLATE_NOOP("binds (keys)", "Numpad /")},
       
   109     {"keypad_*", QT_TRANSLATE_NOOP("binds (keys)", "Numpad *")},
       
   110     {"keypad_-", QT_TRANSLATE_NOOP("binds (keys)", "Numpad -")},
       
   111     {"keypad_+", QT_TRANSLATE_NOOP("binds (keys)", "Numpad +")},
       
   112     {"enter", QT_TRANSLATE_NOOP("binds (keys)", "Enter")},
       
   113     {"equals", QT_TRANSLATE_NOOP("binds (keys)", "Equals")},
       
   114     {"up", QT_TRANSLATE_NOOP("binds (keys)", "Up")},
       
   115     {"down", QT_TRANSLATE_NOOP("binds (keys)", "Down")},
       
   116     {"right", QT_TRANSLATE_NOOP("binds (keys)", "Right")},
       
   117     {"left", QT_TRANSLATE_NOOP("binds (keys)", "Left")},
       
   118     {"insert", QT_TRANSLATE_NOOP("binds (keys)", "Insert")},
       
   119     {"home", QT_TRANSLATE_NOOP("binds (keys)", "Home")},
       
   120     {"end", QT_TRANSLATE_NOOP("binds (keys)", "End")},
       
   121     {"page_up", QT_TRANSLATE_NOOP("binds (keys)", "Page up")},
       
   122     {"page_down", QT_TRANSLATE_NOOP("binds (keys)", "Page down")},
       
   123     {"f1", "F1"},
       
   124     {"f2", "F2"},
       
   125     {"f3", "F3"},
       
   126     {"f4", "F4"},
       
   127     {"f5", "F5"},
       
   128     {"f6", "F6"},
       
   129     {"f7", "F7"},
       
   130     {"f8", "F8"},
       
   131     {"f9", "F9"},
       
   132     {"f10", "F10"},
       
   133     {"f11", "F11"},
       
   134     {"f12", "F12"},
       
   135     {"f13", "F13"},
       
   136     {"f14", "F14"},
       
   137     {"f15", "F15"},
       
   138     {"numlock", QT_TRANSLATE_NOOP("binds (keys)", "Num lock")},
       
   139     {"caps_lock", QT_TRANSLATE_NOOP("binds (keys)", "Caps lock")},
       
   140     {"scroll_lock", QT_TRANSLATE_NOOP("binds (keys)", "Scroll lock")},
       
   141     {"right_shift", QT_TRANSLATE_NOOP("binds (keys)", "Right shift")},
       
   142     {"left_shift", QT_TRANSLATE_NOOP("binds (keys)", "Left shift")},
       
   143     {"right_ctrl", QT_TRANSLATE_NOOP("binds (keys)", "Right ctrl")},
       
   144     {"left_ctrl", QT_TRANSLATE_NOOP("binds (keys)", "Left ctrl")},
       
   145     {"right_alt", QT_TRANSLATE_NOOP("binds (keys)", "Right alt")},
       
   146     {"left_alt", QT_TRANSLATE_NOOP("binds (keys)", "Left alt")},
       
   147     {"right_meta", QT_TRANSLATE_NOOP("binds (keys)", "Right meta")},
       
   148     {"left_meta", QT_TRANSLATE_NOOP("binds (keys)", "Left meta")}
       
   149 };
       
   150 
    21 
   151 // button name definitions for Microsoft's XBox360 controller
    22 extern char sdlkeys[1024][2][128];
   152 // don't modify button order!
    23 extern char xb360buttons[10][128];
   153 char xb360buttons[][128] =
    24 extern char xbox360axes[10][128];
   154 {
    25 extern char xb360dpad[128];
   155     QT_TRANSLATE_NOOP("binds (keys)", "A button"),
    26 extern char controlleraxis[128];
   156     QT_TRANSLATE_NOOP("binds (keys)", "B button"),
    27 extern char controllerbutton[128];
   157     QT_TRANSLATE_NOOP("binds (keys)", "X button"),
    28 extern char controllerhat[128];
   158     QT_TRANSLATE_NOOP("binds (keys)", "Y button"),
    29 extern char controllerup[128];
   159     QT_TRANSLATE_NOOP("binds (keys)", "LB button"),
    30 extern char controllerdown[128];
   160     QT_TRANSLATE_NOOP("binds (keys)", "RB button"),
    31 extern char controllerleft[128];
   161     QT_TRANSLATE_NOOP("binds (keys)", "Back button"),
    32 extern char controllerright[128];
   162     QT_TRANSLATE_NOOP("binds (keys)", "Start button"),
       
   163     QT_TRANSLATE_NOOP("binds (keys)", "Left stick"),
       
   164     QT_TRANSLATE_NOOP("binds (keys)", "Right stick")
       
   165 };
       
   166 
    33 
   167 // axis name definitions for Microsoft's XBox360 controller
    34 #endif
   168 // don't modify axis order!
       
   169 char xbox360axes[][128] =
       
   170 {
       
   171     QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Right)"),
       
   172     QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Left)"),
       
   173     QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Down)"),
       
   174     QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Up)"),
       
   175     QT_TRANSLATE_NOOP("binds (keys)", "Left trigger"),
       
   176     QT_TRANSLATE_NOOP("binds (keys)", "Right trigger"),
       
   177     QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Down)"),
       
   178     QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Up)"),
       
   179     QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Right)"),
       
   180     QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Left)"),
       
   181 };
       
   182 char xb360dpad[128] = QT_TRANSLATE_NOOP("binds (keys)", "DPad");