QTfrontend/sdlkeys.cpp
author Wuzzy <Wuzzy2@mail.ru>
Fri, 11 Oct 2019 20:18:07 +0200
branch1.0.0
changeset 15476 9a76589e294e
parent 14880 12ffbbf81ee1
permissions -rw-r--r--
Remove unicode chars in *.pas files
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
{
14872
8bba7492558d Frontend: Refactor detection of keyboard keys in sdlkeys[]
Wuzzy <Wuzzy2@mail.ru>
parents: 14856
diff changeset
    25
    // Mouse
13520
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    26
    {"mousel", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Left button")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    27
    {"mousem", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Middle button")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    28
    {"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
    29
    {"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
    30
    {"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
    31
    {"wheelup", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel up")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    32
    {"wheeldown", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel down")},
14872
8bba7492558d Frontend: Refactor detection of keyboard keys in sdlkeys[]
Wuzzy <Wuzzy2@mail.ru>
parents: 14856
diff changeset
    33
8bba7492558d Frontend: Refactor detection of keyboard keys in sdlkeys[]
Wuzzy <Wuzzy2@mail.ru>
parents: 14856
diff changeset
    34
    // Keyboard
13520
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    35
    {"backspace", QT_TRANSLATE_NOOP("binds (keys)", "Backspace")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    36
    {"tab", QT_TRANSLATE_NOOP("binds (keys)", "Tab")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    37
    {"clear", QT_TRANSLATE_NOOP("binds (keys)", "Clear")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    38
    {"return", QT_TRANSLATE_NOOP("binds (keys)", "Return")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    39
    {"pause", QT_TRANSLATE_NOOP("binds (keys)", "Pause")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    40
    {"escape", QT_TRANSLATE_NOOP("binds (keys)", "Escape")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    41
    {"space", QT_TRANSLATE_NOOP("binds (keys)", "Space")},
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
    {".", "."},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    46
    {"/", "/"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    47
    {"0", "0"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    48
    {"1", "1"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    49
    {"2", "2"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    50
    {"3", "3"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    51
    {"4", "4"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    52
    {"5", "5"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    53
    {"6", "6"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    54
    {"7", "7"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    55
    {"8", "8"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    56
    {"9", "9"},
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
    {"]", "]"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    61
    {"`", "`"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    62
    {"a", "A"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    63
    {"b", "B"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    64
    {"c", "C"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    65
    {"d", "D"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    66
    {"e", "E"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    67
    {"f", "F"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    68
    {"g", "G"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    69
    {"h", "H"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    70
    {"i", "I"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    71
    {"j", "J"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    72
    {"k", "K"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    73
    {"l", "L"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    74
    {"m", "M"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    75
    {"n", "N"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    76
    {"o", "O"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    77
    {"p", "P"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    78
    {"q", "Q"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    79
    {"r", "R"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    80
    {"s", "S"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    81
    {"t", "T"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    82
    {"u", "U"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    83
    {"v", "V"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    84
    {"w", "W"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    85
    {"x", "X"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    86
    {"y", "Y"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    87
    {"z", "Z"},
14854
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
    88
    {"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
    89
    {"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
    90
    {"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
    91
    {"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
    92
    {"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
    93
    {"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
    94
    {"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
    95
    {"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
    96
    {"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
    97
    {"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
    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_+", 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
   103
    {"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
   104
    {"up", QT_TRANSLATE_NOOP("binds (keys)", "Up")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   105
    {"down", QT_TRANSLATE_NOOP("binds (keys)", "Down")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   106
    {"right", QT_TRANSLATE_NOOP("binds (keys)", "Right")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   107
    {"left", QT_TRANSLATE_NOOP("binds (keys)", "Left")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   108
    {"insert", QT_TRANSLATE_NOOP("binds (keys)", "Insert")},
14873
349a87011080 Sdlkeys.cpp: Move delete key
Wuzzy <Wuzzy2@mail.ru>
parents: 14872
diff changeset
   109
    {"delete", QT_TRANSLATE_NOOP("binds (keys)", "Delete")},
13520
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   110
    {"home", QT_TRANSLATE_NOOP("binds (keys)", "Home")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   111
    {"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
   112
    {"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
   113
    {"pagedown", QT_TRANSLATE_NOOP("binds (keys)", "PageDown")},
13520
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   114
    {"f1", "F1"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   115
    {"f2", "F2"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   116
    {"f3", "F3"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   117
    {"f4", "F4"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   118
    {"f5", "F5"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   119
    {"f6", "F6"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   120
    {"f7", "F7"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   121
    {"f8", "F8"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   122
    {"f9", "F9"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   123
    {"f10", "F10"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   124
    {"f11", "F11"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   125
    {"f12", "F12"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   126
    {"f13", "F13"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   127
    {"f14", "F14"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   128
    {"f15", "F15"},
14854
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   129
    {"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
   130
    {"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
   131
    {"scrolllock", QT_TRANSLATE_NOOP("binds (keys)", "ScrollLock")},
14880
12ffbbf81ee1 Frontend controls: Add menu key
Wuzzy <Wuzzy2@mail.ru>
parents: 14879
diff changeset
   132
    {"menu", QT_TRANSLATE_NOOP("binds (keys)", "Menu")},
14854
24df603fbcd2 Match key names in sdlkeys with SDL-pretty printed names (for localization)
Wuzzy <Wuzzy2@mail.ru>
parents: 14850
diff changeset
   133
    {"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
   134
    {"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
   135
    {"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
   136
    {"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
   137
    {"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
   138
    {"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
   139
    //: 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
   140
    {"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
   141
    //: 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
   142
    {"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
   143
};
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   144
14872
8bba7492558d Frontend: Refactor detection of keyboard keys in sdlkeys[]
Wuzzy <Wuzzy2@mail.ru>
parents: 14856
diff changeset
   145
// helper list for sdlkeys. true for keyboard keys, false for other
8bba7492558d Frontend: Refactor detection of keyboard keys in sdlkeys[]
Wuzzy <Wuzzy2@mail.ru>
parents: 14856
diff changeset
   146
bool sdlkeys_iskeyboard[1024];
8bba7492558d Frontend: Refactor detection of keyboard keys in sdlkeys[]
Wuzzy <Wuzzy2@mail.ru>
parents: 14856
diff changeset
   147
13520
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   148
// button name definitions for Microsoft's XBox360 controller
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   149
// don't modify button order!
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   150
char xb360buttons[10][128] =
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   151
{
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   152
    QT_TRANSLATE_NOOP("binds (keys)", "A button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   153
    QT_TRANSLATE_NOOP("binds (keys)", "B button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   154
    QT_TRANSLATE_NOOP("binds (keys)", "X button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   155
    QT_TRANSLATE_NOOP("binds (keys)", "Y button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   156
    QT_TRANSLATE_NOOP("binds (keys)", "LB button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   157
    QT_TRANSLATE_NOOP("binds (keys)", "RB button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   158
    QT_TRANSLATE_NOOP("binds (keys)", "Back button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   159
    QT_TRANSLATE_NOOP("binds (keys)", "Start button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   160
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   161
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick")
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   162
};
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   163
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   164
// axis name definitions for Microsoft's XBox360 controller
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   165
// don't modify axis order!
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   166
char xbox360axes[][128] =
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   167
{
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   168
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Right)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   169
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Left)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   170
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Down)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   171
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Up)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   172
    QT_TRANSLATE_NOOP("binds (keys)", "Left trigger"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   173
    QT_TRANSLATE_NOOP("binds (keys)", "Right trigger"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   174
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Down)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   175
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Up)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   176
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Right)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   177
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Left)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   178
};
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   179
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
   180
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   181
// Generic controller binding names
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   182
//: Game controller axis direction. %1 = axis number, %2 = direction
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   183
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
   184
//: Game controller button. %1 = button number
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   185
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
   186
//: 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
   187
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
   188
char controllerup[128] = QT_TRANSLATE_NOOP("binds (keys)", "Up");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   189
char controllerdown[128] = QT_TRANSLATE_NOOP("binds (keys)", "Down");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   190
char controllerleft[128] = QT_TRANSLATE_NOOP("binds (keys)", "Left");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   191
char controllerright[128] = QT_TRANSLATE_NOOP("binds (keys)", "Right");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   192
14592
164ec37e9e4b Rename the special "none" key in frontend
Wuzzy <Wuzzy2@mail.ru>
parents: 14537
diff changeset
   193
//: 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
   194
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
   195