libOpenWinControls
Multiplatform open-source library to interact with the dual-mode controller in GPD devices
Loading...
Searching...
No Matches
XinputUsageIDMap.h
Go to the documentation of this file.
1/*
2 * This file is part of libOpenWinControls.
3 * Copyright (C) 2026 kylon
4 *
5 * libOpenWinControls is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * libOpenWinControls is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18#pragma once
19
20#include <map>
21#include <string>
22
26namespace OWC {
31 static const std::map<int, std::string> XinputUsageIDMap = {
32 {0, "UNSET"},
33 {0x8000, "DPAD_UP"},
34 {0x8001, "DPAD_DOWN"},
35 {0x8002, "DPAD_LEFT"},
36 {0x8003, "DPAD_RIGHT"},
37 {0x8004, "START"},
38 {0x8005, "SELECT"},
39 {0x8006, "MENU"},
40 {0x8007, "BTN_A"},
41 {0x8008, "BTN_B"},
42 {0x8009, "BTN_X"},
43 {0x800a, "BTN_Y"},
44 {0x800b, "L1"},
45 {0x800c, "R1"},
46 {0x800d, "L2"},
47 {0x800e, "R2"},
48 {0x800f, "L3"},
49 {0x8010, "R3"},
50 {0x8011, "LSTICK_UP"},
51 {0x8012, "LSTICK_DOWN"},
52 {0x8013, "LSTICK_LEFT"},
53 {0x8014, "LSTICK_RIGHT"},
54 {0x8015, "RSTICK_UP"},
55 {0x8016, "RSTICK_DOWN"},
56 {0x8017, "RSTICK_LEFT"},
57 {0x8018, "RSTICK_RIGHT"}
58 };
59}
static const std::map< int, std::string > XinputUsageIDMap
map of supported controller keys and their GPD custom keycode
Definition XinputUsageIDMap.h:31