QTfrontend/sdlkeys.cpp
author Wuzzy <Wuzzy2@mail.ru>
Thu, 25 Apr 2019 23:01:05 +0200
changeset 14839 e239378a9400
parent 14833 42346a67fba4
child 14845 6c51f74d80a8
permissions -rw-r--r--
Prevent entering “/”, “\” and “:” in team and scheme names. The name of teams and schems is saved in the file name itself, so these characters would cause trouble as they are used in path names in Linux and Windows.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13515
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")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    28
    {"wheelup", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel up")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    29
    {"wheeldown", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel down")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    30
    {"backspace", QT_TRANSLATE_NOOP("binds (keys)", "Backspace")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    31
    {"tab", QT_TRANSLATE_NOOP("binds (keys)", "Tab")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    32
    {"clear", QT_TRANSLATE_NOOP("binds (keys)", "Clear")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    33
    {"return", QT_TRANSLATE_NOOP("binds (keys)", "Return")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    34
    {"pause", QT_TRANSLATE_NOOP("binds (keys)", "Pause")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    35
    {"escape", QT_TRANSLATE_NOOP("binds (keys)", "Escape")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    36
    {"space", QT_TRANSLATE_NOOP("binds (keys)", "Space")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    37
    {"!", "!"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    38
    {"\"", "\""},
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
    {"*", "*"},
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
    {",", ","},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    48
    {"-", "-"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    49
    {".", "."},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    50
    {"/", "/"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    51
    {"0", "0"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    52
    {"1", "1"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    53
    {"2", "2"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    54
    {"3", "3"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    55
    {"4", "4"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    56
    {"5", "5"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    57
    {"6", "6"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    58
    {"7", "7"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    59
    {"8", "8"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    60
    {"9", "9"},
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
    {";", ";"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    63
    {"<", "<"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    64
    {"=", "="},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    65
    {">", ">"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    66
    {"?", "?"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    67
    {"@", "@"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    68
    {"[", "["},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    69
    {"\\", "\\"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    70
    {"]", "]"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    71
    {"^", "^"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    72
    {"_", "_"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    73
    {"`", "`"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    74
    {"a", "A"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    75
    {"b", "B"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    76
    {"c", "C"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    77
    {"d", "D"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    78
    {"e", "E"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    79
    {"f", "F"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    80
    {"g", "G"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    81
    {"h", "H"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    82
    {"i", "I"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    83
    {"j", "J"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    84
    {"k", "K"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    85
    {"l", "L"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    86
    {"m", "M"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    87
    {"n", "N"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    88
    {"o", "O"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    89
    {"p", "P"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    90
    {"q", "Q"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    91
    {"r", "R"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    92
    {"s", "S"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    93
    {"t", "T"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    94
    {"u", "U"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    95
    {"v", "V"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    96
    {"w", "W"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    97
    {"x", "X"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    98
    {"y", "Y"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
    99
    {"z", "Z"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   100
    {"delete", QT_TRANSLATE_NOOP("binds (keys)", "Delete")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   101
    {"keypad_0", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 0")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   102
    {"keypad_1", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 1")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   103
    {"keypad_2", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 2")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   104
    {"keypad_3", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 3")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   105
    {"keypad_4", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 4")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   106
    {"keypad_5", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 5")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   107
    {"keypad_6", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 6")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   108
    {"keypad_7", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 7")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   109
    {"keypad_8", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 8")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   110
    {"keypad_9", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 9")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   111
    {"keypad_.", QT_TRANSLATE_NOOP("binds (keys)", "Numpad .")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   112
    {"keypad_/", QT_TRANSLATE_NOOP("binds (keys)", "Numpad /")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   113
    {"keypad_*", QT_TRANSLATE_NOOP("binds (keys)", "Numpad *")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   114
    {"keypad_-", QT_TRANSLATE_NOOP("binds (keys)", "Numpad -")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   115
    {"keypad_+", QT_TRANSLATE_NOOP("binds (keys)", "Numpad +")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   116
    {"enter", QT_TRANSLATE_NOOP("binds (keys)", "Enter")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   117
    {"up", QT_TRANSLATE_NOOP("binds (keys)", "Up")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   118
    {"down", QT_TRANSLATE_NOOP("binds (keys)", "Down")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   119
    {"right", QT_TRANSLATE_NOOP("binds (keys)", "Right")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   120
    {"left", QT_TRANSLATE_NOOP("binds (keys)", "Left")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   121
    {"insert", QT_TRANSLATE_NOOP("binds (keys)", "Insert")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   122
    {"home", QT_TRANSLATE_NOOP("binds (keys)", "Home")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   123
    {"end", QT_TRANSLATE_NOOP("binds (keys)", "End")},
14833
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   124
    {"pageup", QT_TRANSLATE_NOOP("binds (keys)", "Page up")},
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   125
    {"pagedown", QT_TRANSLATE_NOOP("binds (keys)", "Page down")},
13515
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   126
    {"f1", "F1"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   127
    {"f2", "F2"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   128
    {"f3", "F3"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   129
    {"f4", "F4"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   130
    {"f5", "F5"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   131
    {"f6", "F6"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   132
    {"f7", "F7"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   133
    {"f8", "F8"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   134
    {"f9", "F9"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   135
    {"f10", "F10"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   136
    {"f11", "F11"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   137
    {"f12", "F12"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   138
    {"f13", "F13"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   139
    {"f14", "F14"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   140
    {"f15", "F15"},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   141
    {"numlock", QT_TRANSLATE_NOOP("binds (keys)", "Num lock")},
14833
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   142
    {"capslock", QT_TRANSLATE_NOOP("binds (keys)", "Caps lock")},
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   143
    {"scrolllock", QT_TRANSLATE_NOOP("binds (keys)", "Scroll lock")},
13515
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   144
    {"right_shift", QT_TRANSLATE_NOOP("binds (keys)", "Right shift")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   145
    {"left_shift", QT_TRANSLATE_NOOP("binds (keys)", "Left shift")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   146
    {"right_ctrl", QT_TRANSLATE_NOOP("binds (keys)", "Right ctrl")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   147
    {"left_ctrl", QT_TRANSLATE_NOOP("binds (keys)", "Left ctrl")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   148
    {"right_alt", QT_TRANSLATE_NOOP("binds (keys)", "Right alt")},
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   149
    {"left_alt", QT_TRANSLATE_NOOP("binds (keys)", "Left alt")},
14833
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   150
#if defined Q_OS_WIN
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   151
    {"right_gui", QT_TRANSLATE_NOOP("binds (keys)", "Right Windows")},
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   152
    {"left_gui", QT_TRANSLATE_NOOP("binds (keys)", "Left Windows")}
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   153
#elif defined Q_OS_MACOS
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   154
    {"right_gui", QT_TRANSLATE_NOOP("binds (keys)", "Right command")},
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   155
    {"left_gui", QT_TRANSLATE_NOOP("binds (keys)", "Left command")}
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   156
#else
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   157
    {"right_gui", QT_TRANSLATE_NOOP("binds (keys)", "Right meta")},
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   158
    {"left_gui", QT_TRANSLATE_NOOP("binds (keys)", "Left meta")}
42346a67fba4 Fix some Qt<->SDL key mappings
Wuzzy <Wuzzy2@mail.ru>
parents: 14587
diff changeset
   159
#endif
13515
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   160
};
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
// button name definitions for Microsoft's XBox360 controller
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   163
// don't modify button order!
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   164
char xb360buttons[10][128] =
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   165
{
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   166
    QT_TRANSLATE_NOOP("binds (keys)", "A button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   167
    QT_TRANSLATE_NOOP("binds (keys)", "B button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   168
    QT_TRANSLATE_NOOP("binds (keys)", "X button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   169
    QT_TRANSLATE_NOOP("binds (keys)", "Y button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   170
    QT_TRANSLATE_NOOP("binds (keys)", "LB button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   171
    QT_TRANSLATE_NOOP("binds (keys)", "RB button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   172
    QT_TRANSLATE_NOOP("binds (keys)", "Back button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   173
    QT_TRANSLATE_NOOP("binds (keys)", "Start button"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   174
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   175
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick")
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   176
};
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   177
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   178
// axis name definitions for Microsoft's XBox360 controller
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   179
// don't modify axis order!
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   180
char xbox360axes[][128] =
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   181
{
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   182
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Right)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   183
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Left)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   184
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Down)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   185
    QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Up)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   186
    QT_TRANSLATE_NOOP("binds (keys)", "Left trigger"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   187
    QT_TRANSLATE_NOOP("binds (keys)", "Right trigger"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   188
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Down)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   189
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Up)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   190
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Right)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   191
    QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Left)"),
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   192
};
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   193
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
   194
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   195
// Generic controller binding names
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   196
//: Game controller axis direction. %1 = axis number, %2 = direction
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   197
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
   198
//: Game controller button. %1 = button number
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   199
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
   200
//: 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
   201
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
   202
char controllerup[128] = QT_TRANSLATE_NOOP("binds (keys)", "Up");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   203
char controllerdown[128] = QT_TRANSLATE_NOOP("binds (keys)", "Down");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   204
char controllerleft[128] = QT_TRANSLATE_NOOP("binds (keys)", "Left");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   205
char controllerright[128] = QT_TRANSLATE_NOOP("binds (keys)", "Right");
c5365f05d4de Refactor storage of joystick SDL key names
Wuzzy <Wuzzy2@mail.ru>
parents:
diff changeset
   206
14587
164ec37e9e4b Rename the special "none" key in frontend
Wuzzy <Wuzzy2@mail.ru>
parents: 14532
diff changeset
   207
//: 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: 14532
diff changeset
   208
char unboundcontrol[128] = QT_TRANSLATE_NOOP("binds (keys)", "(Don't use)");
14532
e1ae6d8e84b0 Allow to leave a control unused (no key binding)
Wuzzy <Wuzzy2@mail.ru>
parents: 13515
diff changeset
   209