QTfrontend/sdlkeys.cpp
author Wuzzy <Wuzzy2@mail.ru>
Wed, 22 Aug 2018 00:40:11 +0200
branch0.9.24
changeset 13688 076b7d23fab8
parent 13542 b89ea5618067
child 14553 e1ae6d8e84b0
permissions -rw-r--r--
Backed out changeset 6c0cf6b9eff8. Scripters should be prepared for nil and pretending the gear exists would cause more pain
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13542
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     1
/*
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     2
 * Hedgewars, a free turn based strategy game
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     3
 * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     4
 *
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     8
 *
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    12
 * GNU General Public License for more details.
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    13
 *
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    17
 */
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    18
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    19
#include "sdlkeys.h"
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    20
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    21
#include <QtGlobal>
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    22
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    23
char sdlkeys[1024][2][128] =
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    24
{
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    25
    {"mousel", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Left button")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    26
    {"mousem", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Middle button")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    27
    {"mouser", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Right button")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    28
    {"wheelup", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel up")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    29
    {"wheeldown", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel down")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    30
    {"backspace", QT_TRANSLATE_NOOP("binds (keys)", "Backspace")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    31
    {"tab", QT_TRANSLATE_NOOP("binds (keys)", "Tab")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    32
    {"clear", QT_TRANSLATE_NOOP("binds (keys)", "Clear")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    33
    {"return", QT_TRANSLATE_NOOP("binds (keys)", "Return")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    34
    {"pause", QT_TRANSLATE_NOOP("binds (keys)", "Pause")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    35
    {"escape", QT_TRANSLATE_NOOP("binds (keys)", "Escape")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    36
    {"space", QT_TRANSLATE_NOOP("binds (keys)", "Space")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    37
    {"!", "!"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    38
    {"\"", "\""},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    39
    {"#", "#"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    40
    {"$", "$"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    41
    {"&", "&"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    42
    {"'", "'"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    43
    {"(", "("},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    44
    {")", ")"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    45
    {"*", "*"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    46
    {"+", "+"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    47
    {",", ","},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    48
    {"-", "-"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    49
    {".", "."},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    50
    {"/", "/"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    51
    {"0", "0"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    52
    {"1", "1"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    53
    {"2", "2"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    54
    {"3", "3"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    55
    {"4", "4"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    56
    {"5", "5"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    57
    {"6", "6"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    58
    {"7", "7"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    59
    {"8", "8"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    60
    {"9", "9"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    61
    {":", ":"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    62
    {";", ";"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    63
    {"<", "<"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    64
    {"=", "="},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    65
    {">", ">"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    66
    {"?", "?"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    67
    {"@", "@"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    68
    {"[", "["},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    69
    {"\\", "\\"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    70
    {"]", "]"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    71
    {"^", "^"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    72
    {"_", "_"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    73
    {"`", "`"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    74
    {"a", "A"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    75
    {"b", "B"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    76
    {"c", "C"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    77
    {"d", "D"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    78
    {"e", "E"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    79
    {"f", "F"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    80
    {"g", "G"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    81
    {"h", "H"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    82
    {"i", "I"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    83
    {"j", "J"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    84
    {"k", "K"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    85
    {"l", "L"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    86
    {"m", "M"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    87
    {"n", "N"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    88
    {"o", "O"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    89
    {"p", "P"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    90
    {"q", "Q"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    91
    {"r", "R"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    92
    {"s", "S"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    93
    {"t", "T"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    94
    {"u", "U"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    95
    {"v", "V"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    96
    {"w", "W"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    97
    {"x", "X"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    98
    {"y", "Y"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    99
    {"z", "Z"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   100
    {"delete", QT_TRANSLATE_NOOP("binds (keys)", "Delete")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   101
    {"keypad_0", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 0")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   102
    {"keypad_1", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 1")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   103
    {"keypad_2", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 2")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   104
    {"keypad_3", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 3")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   105
    {"keypad_4", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 4")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   106
    {"keypad_5", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 5")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   107
    {"keypad_6", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 6")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   108
    {"keypad_7", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 7")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   109
    {"keypad_8", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 8")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   110
    {"keypad_9", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 9")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   111
    {"keypad_.", QT_TRANSLATE_NOOP("binds (keys)", "Numpad .")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   112
    {"keypad_/", QT_TRANSLATE_NOOP("binds (keys)", "Numpad /")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   113
    {"keypad_*", QT_TRANSLATE_NOOP("binds (keys)", "Numpad *")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   114
    {"keypad_-", QT_TRANSLATE_NOOP("binds (keys)", "Numpad -")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   115
    {"keypad_+", QT_TRANSLATE_NOOP("binds (keys)", "Numpad +")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   116
    {"enter", QT_TRANSLATE_NOOP("binds (keys)", "Enter")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   117
    {"equals", QT_TRANSLATE_NOOP("binds (keys)", "Equals")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   118
    {"up", QT_TRANSLATE_NOOP("binds (keys)", "Up")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   119
    {"down", QT_TRANSLATE_NOOP("binds (keys)", "Down")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   120
    {"right", QT_TRANSLATE_NOOP("binds (keys)", "Right")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   121
    {"left", QT_TRANSLATE_NOOP("binds (keys)", "Left")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   122
    {"insert", QT_TRANSLATE_NOOP("binds (keys)", "Insert")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   123
    {"home", QT_TRANSLATE_NOOP("binds (keys)", "Home")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   124
    {"end", QT_TRANSLATE_NOOP("binds (keys)", "End")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   125
    {"page_up", QT_TRANSLATE_NOOP("binds (keys)", "Page up")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   126
    {"page_down", QT_TRANSLATE_NOOP("binds (keys)", "Page down")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   127
    {"f1", "F1"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   128
    {"f2", "F2"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   129
    {"f3", "F3"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   130
    {"f4", "F4"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   131
    {"f5", "F5"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   132
    {"f6", "F6"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   133
    {"f7", "F7"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   134
    {"f8", "F8"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   135
    {"f9", "F9"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   136
    {"f10", "F10"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   137
    {"f11", "F11"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   138
    {"f12", "F12"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   139
    {"f13", "F13"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   140
    {"f14", "F14"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   141
    {"f15", "F15"},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   142
    {"numlock", QT_TRANSLATE_NOOP("binds (keys)", "Num lock")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   143
    {"caps_lock", QT_TRANSLATE_NOOP("binds (keys)", "Caps lock")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   144
    {"scroll_lock", QT_TRANSLATE_NOOP("binds (keys)", "Scroll lock")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   145
    {"right_shift", QT_TRANSLATE_NOOP("binds (keys)", "Right shift")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   146
    {"left_shift", QT_TRANSLATE_NOOP("binds (keys)", "Left shift")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   147
    {"right_ctrl", QT_TRANSLATE_NOOP("binds (keys)", "Right ctrl")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   148
    {"left_ctrl", QT_TRANSLATE_NOOP("binds (keys)", "Left ctrl")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   149
    {"right_alt", QT_TRANSLATE_NOOP("binds (keys)", "Right alt")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   150
    {"left_alt", QT_TRANSLATE_NOOP("binds (keys)", "Left alt")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   151
    {"right_meta", QT_TRANSLATE_NOOP("binds (keys)", "Right meta")},
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   152
    {"left_meta", QT_TRANSLATE_NOOP("binds (keys)", "Left meta")}
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   153
};
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   154
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   155
// button name definitions for Microsoft's XBox360 controller
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   156
// don't modify button order!
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   157
char xb360buttons[10][128] =
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   158
{
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   159
    QT_TRANSLATE_NOOP("binds (keys)", "A button"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   160
    QT_TRANSLATE_NOOP("binds (keys)", "B button"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   161
    QT_TRANSLATE_NOOP("binds (keys)", "X button"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   162
    QT_TRANSLATE_NOOP("binds (keys)", "Y button"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   163
    QT_TRANSLATE_NOOP("binds (keys)", "LB button"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   164
    QT_TRANSLATE_NOOP("binds (keys)", "RB button"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   165
    QT_TRANSLATE_NOOP("binds (keys)", "Back button"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   166
    QT_TRANSLATE_NOOP("binds (keys)", "Start button"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   167
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   168
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick")
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   169
};
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   170
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   171
// axis name definitions for Microsoft's XBox360 controller
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   172
// don't modify axis order!
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   173
char xbox360axes[][128] =
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   174
{
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   175
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Right)"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   176
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Left)"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   177
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Down)"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   178
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Up)"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   179
    QT_TRANSLATE_NOOP("binds (keys)", "Left trigger"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   180
    QT_TRANSLATE_NOOP("binds (keys)", "Right trigger"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   181
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Down)"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   182
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Up)"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   183
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Right)"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   184
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Left)"),
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   185
};
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   186
char xb360dpad[128] = QT_TRANSLATE_NOOP("binds (keys)", "D-pad");
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   187
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   188
// Generic controller binding names
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   189
//: Game controller axis direction. %1 = axis number, %2 = direction
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   190
char controlleraxis[128] = QT_TRANSLATE_NOOP("binds (keys)", "Axis %1 %2");
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   191
//: Game controller button. %1 = button number
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   192
char controllerbutton[128] = QT_TRANSLATE_NOOP("binds (keys)", "Button %1");
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   193
//: Game controller D-pad button. %1 = D-pad number, %2 = direction
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   194
char controllerhat[128] = QT_TRANSLATE_NOOP("binds (keys)", "D-pad %1 %2");
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   195
char controllerup[128] = QT_TRANSLATE_NOOP("binds (keys)", "Up");
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   196
char controllerdown[128] = QT_TRANSLATE_NOOP("binds (keys)", "Down");
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   197
char controllerleft[128] = QT_TRANSLATE_NOOP("binds (keys)", "Left");
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   198
char controllerright[128] = QT_TRANSLATE_NOOP("binds (keys)", "Right");
b89ea5618067 Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   199