QTfrontend/sdlkeys.cpp
author Wuzzy <Wuzzy2@mail.ru>
Mon, 29 Apr 2019 23:12:40 +0200
changeset 14857 56293aa24e81
parent 14856 058e204908a6
child 14872 8bba7492558d
permissions -rw-r--r--
Fix crash when pressing key bind reset button in settings
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13520
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     1
/*
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     2
 * Hedgewars, a free turn based strategy game
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     3
 * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     4
 *
c5365f05d4de 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
c5365f05d4de 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
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
     8
 *
c5365f05d4de 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,
c5365f05d4de 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
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    12
 * GNU General Public License for more details.
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    13
 *
c5365f05d4de 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
c5365f05d4de 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
c5365f05d4de 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
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    17
 */
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    18
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    19
#include "sdlkeys.h"
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    20
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    21
#include <QtGlobal>
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    22
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    23
char sdlkeys[1024][2][128] =
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    24
{
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    25
    {"mousel", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Left button")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    26
    {"mousem", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Middle button")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    27
    {"mouser", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Right button")},
14850
6c51f74d80a8 Add support for 4th and 5th mouse button
Wuzzy <Wuzzy2@mail.ru>
parents: 14838
diff changeset
    28
    {"mousex1", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: X1 button ")},
6c51f74d80a8 Add support for 4th and 5th mouse button
Wuzzy <Wuzzy2@mail.ru>
parents: 14838
diff changeset
    29
    {"mousex2", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: X2 button")},
13520
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    30
    {"wheelup", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel up")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    31
    {"wheeldown", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel down")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    32
    {"backspace", QT_TRANSLATE_NOOP("binds (keys)", "Backspace")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    33
    {"tab", QT_TRANSLATE_NOOP("binds (keys)", "Tab")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    34
    {"clear", QT_TRANSLATE_NOOP("binds (keys)", "Clear")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    35
    {"return", QT_TRANSLATE_NOOP("binds (keys)", "Return")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    36
    {"pause", QT_TRANSLATE_NOOP("binds (keys)", "Pause")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    37
    {"escape", QT_TRANSLATE_NOOP("binds (keys)", "Escape")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    38
    {"space", QT_TRANSLATE_NOOP("binds (keys)", "Space")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    39
    {"#", "#"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    40
    {"'", "'"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    41
    {",", ","},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    42
    {"-", "-"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    43
    {".", "."},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    44
    {"/", "/"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    45
    {"0", "0"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    46
    {"1", "1"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    47
    {"2", "2"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    48
    {"3", "3"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    49
    {"4", "4"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    50
    {"5", "5"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    51
    {"6", "6"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    52
    {"7", "7"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    53
    {"8", "8"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    54
    {"9", "9"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    55
    {";", ";"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    56
    {"[", "["},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    57
    {"\\", "\\"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    58
    {"]", "]"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    59
    {"`", "`"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    60
    {"a", "A"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    61
    {"b", "B"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    62
    {"c", "C"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    63
    {"d", "D"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    64
    {"e", "E"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    65
    {"f", "F"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    66
    {"g", "G"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    67
    {"h", "H"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    68
    {"i", "I"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    69
    {"j", "J"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    70
    {"k", "K"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    71
    {"l", "L"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    72
    {"m", "M"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    73
    {"n", "N"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    74
    {"o", "O"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    75
    {"p", "P"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    76
    {"q", "Q"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    77
    {"r", "R"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    78
    {"s", "S"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    79
    {"t", "T"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    80
    {"u", "U"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    81
    {"v", "V"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    82
    {"w", "W"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    83
    {"x", "X"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    84
    {"y", "Y"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    85
    {"z", "Z"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    86
    {"delete", QT_TRANSLATE_NOOP("binds (keys)", "Delete")},
14854
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    87
    {"keypad_0", QT_TRANSLATE_NOOP("binds (keys)", "Keypad 0")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    88
    {"keypad_1", QT_TRANSLATE_NOOP("binds (keys)", "Keypad 1")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    89
    {"keypad_2", QT_TRANSLATE_NOOP("binds (keys)", "Keypad 2")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    90
    {"keypad_3", QT_TRANSLATE_NOOP("binds (keys)", "Keypad 3")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    91
    {"keypad_4", QT_TRANSLATE_NOOP("binds (keys)", "Keypad 4")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    92
    {"keypad_5", QT_TRANSLATE_NOOP("binds (keys)", "Keypad 5")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    93
    {"keypad_6", QT_TRANSLATE_NOOP("binds (keys)", "Keypad 6")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    94
    {"keypad_7", QT_TRANSLATE_NOOP("binds (keys)", "Keypad 7")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    95
    {"keypad_8", QT_TRANSLATE_NOOP("binds (keys)", "Keypad 8")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    96
    {"keypad_9", QT_TRANSLATE_NOOP("binds (keys)", "Keypad 9")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    97
    {"keypad_.", QT_TRANSLATE_NOOP("binds (keys)", "Keypad .")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    98
    {"keypad_/", QT_TRANSLATE_NOOP("binds (keys)", "Keypad /")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    99
    {"keypad_*", QT_TRANSLATE_NOOP("binds (keys)", "Keypad *")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   100
    {"keypad_-", QT_TRANSLATE_NOOP("binds (keys)", "Keypad -")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   101
    {"keypad_+", QT_TRANSLATE_NOOP("binds (keys)", "Keypad +")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   102
    {"keypad_enter", QT_TRANSLATE_NOOP("binds (keys)", "Keypad Enter")},
13520
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   103
    {"up", QT_TRANSLATE_NOOP("binds (keys)", "Up")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   104
    {"down", QT_TRANSLATE_NOOP("binds (keys)", "Down")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   105
    {"right", QT_TRANSLATE_NOOP("binds (keys)", "Right")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   106
    {"left", QT_TRANSLATE_NOOP("binds (keys)", "Left")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   107
    {"insert", QT_TRANSLATE_NOOP("binds (keys)", "Insert")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   108
    {"home", QT_TRANSLATE_NOOP("binds (keys)", "Home")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   109
    {"end", QT_TRANSLATE_NOOP("binds (keys)", "End")},
14854
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   110
    {"pageup", QT_TRANSLATE_NOOP("binds (keys)", "PageUp")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   111
    {"pagedown", QT_TRANSLATE_NOOP("binds (keys)", "PageDown")},
13520
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   112
    {"f1", "F1"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   113
    {"f2", "F2"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   114
    {"f3", "F3"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   115
    {"f4", "F4"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   116
    {"f5", "F5"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   117
    {"f6", "F6"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   118
    {"f7", "F7"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   119
    {"f8", "F8"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   120
    {"f9", "F9"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   121
    {"f10", "F10"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   122
    {"f11", "F11"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   123
    {"f12", "F12"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   124
    {"f13", "F13"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   125
    {"f14", "F14"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   126
    {"f15", "F15"},
14854
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   127
    {"numlock", QT_TRANSLATE_NOOP("binds (keys)", "Numlock")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   128
    {"capslock", QT_TRANSLATE_NOOP("binds (keys)", "CapsLock")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   129
    {"scrolllock", QT_TRANSLATE_NOOP("binds (keys)", "ScrollLock")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   130
    {"right_shift", QT_TRANSLATE_NOOP("binds (keys)", "Right Shift")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   131
    {"left_shift", QT_TRANSLATE_NOOP("binds (keys)", "Left Shift")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   132
    {"right_ctrl", QT_TRANSLATE_NOOP("binds (keys)", "Right Ctrl")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   133
    {"left_ctrl", QT_TRANSLATE_NOOP("binds (keys)", "Left Ctrl")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   134
    {"right_alt", QT_TRANSLATE_NOOP("binds (keys)", "Right Alt")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   135
    {"left_alt", QT_TRANSLATE_NOOP("binds (keys)", "Left Alt")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   136
    //: Windows key / Command key / Meta key /Super key (right)
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   137
    {"right_gui", QT_TRANSLATE_NOOP("binds (keys)", "Right GUI")},
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   138
    //: Windows key / Command key / Meta key /Super key (left)
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   139
    {"left_gui", QT_TRANSLATE_NOOP("binds (keys)", "Left GUI")}
13520
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   140
};
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   141
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   142
// button name definitions for Microsoft's XBox360 controller
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   143
// don't modify button order!
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   144
char xb360buttons[10][128] =
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   145
{
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   146
    QT_TRANSLATE_NOOP("binds (keys)", "A button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   147
    QT_TRANSLATE_NOOP("binds (keys)", "B button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   148
    QT_TRANSLATE_NOOP("binds (keys)", "X button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   149
    QT_TRANSLATE_NOOP("binds (keys)", "Y button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   150
    QT_TRANSLATE_NOOP("binds (keys)", "LB button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   151
    QT_TRANSLATE_NOOP("binds (keys)", "RB button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   152
    QT_TRANSLATE_NOOP("binds (keys)", "Back button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   153
    QT_TRANSLATE_NOOP("binds (keys)", "Start button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   154
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   155
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick")
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   156
};
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   157
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   158
// axis name definitions for Microsoft's XBox360 controller
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   159
// don't modify axis order!
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   160
char xbox360axes[][128] =
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   161
{
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   162
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Right)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   163
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Left)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   164
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Down)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   165
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Up)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   166
    QT_TRANSLATE_NOOP("binds (keys)", "Left trigger"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   167
    QT_TRANSLATE_NOOP("binds (keys)", "Right trigger"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   168
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Down)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   169
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Up)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   170
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Right)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   171
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Left)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   172
};
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   173
char xb360dpad[128] = QT_TRANSLATE_NOOP("binds (keys)", "D-pad");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   174
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   175
// Generic controller binding names
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   176
//: Game controller axis direction. %1 = axis number, %2 = direction
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   177
char controlleraxis[128] = QT_TRANSLATE_NOOP("binds (keys)", "Axis %1 %2");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   178
//: Game controller button. %1 = button number
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   179
char controllerbutton[128] = QT_TRANSLATE_NOOP("binds (keys)", "Button %1");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   180
//: Game controller D-pad button. %1 = D-pad number, %2 = direction
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   181
char controllerhat[128] = QT_TRANSLATE_NOOP("binds (keys)", "D-pad %1 %2");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   182
char controllerup[128] = QT_TRANSLATE_NOOP("binds (keys)", "Up");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   183
char controllerdown[128] = QT_TRANSLATE_NOOP("binds (keys)", "Down");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   184
char controllerleft[128] = QT_TRANSLATE_NOOP("binds (keys)", "Left");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   185
char controllerright[128] = QT_TRANSLATE_NOOP("binds (keys)", "Right");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   186
14592
164ec37e9e4b Rename the special "none" key in frontend
Wuzzy <Wuzzy2@mail.ru>
parents: 14537
diff changeset
   187
//: Special entry in key selection when an action has no control assigned
164ec37e9e4b Rename the special "none" key in frontend
Wuzzy <Wuzzy2@mail.ru>
parents: 14537
diff changeset
   188
char unboundcontrol[128] = QT_TRANSLATE_NOOP("binds (keys)", "(Don't use)");
14537
e1ae6d8e84b0 Allow to leave a control unused (no key binding)
Wuzzy <Wuzzy2@mail.ru>
parents: 13520
diff changeset
   189