mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-08 20:11:39 +12:00
First step towards configurable keyboard mappings (#464)
* Configurable keyboard mappings * Cleanup * Cleanup * Biggest mistake of my career * format * Fix naming convention --------- Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
This commit is contained in:
parent
5488e9ca7c
commit
3270cfe602
9 changed files with 162 additions and 126 deletions
25
src/panda_qt/mappings.cpp
Normal file
25
src/panda_qt/mappings.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "input_mappings.hpp"
|
||||
|
||||
#include <QKeyEvent>
|
||||
|
||||
InputMappings InputMappings::defaultKeyboardMappings() {
|
||||
InputMappings mappings;
|
||||
mappings.setMapping(Qt::Key_L, HID::Keys::A);
|
||||
mappings.setMapping(Qt::Key_K, HID::Keys::B);
|
||||
mappings.setMapping(Qt::Key_O, HID::Keys::X);
|
||||
mappings.setMapping(Qt::Key_I, HID::Keys::Y);
|
||||
mappings.setMapping(Qt::Key_Q, HID::Keys::L);
|
||||
mappings.setMapping(Qt::Key_P, HID::Keys::R);
|
||||
mappings.setMapping(Qt::Key_Up, HID::Keys::Up);
|
||||
mappings.setMapping(Qt::Key_Down, HID::Keys::Down);
|
||||
mappings.setMapping(Qt::Key_Right, HID::Keys::Right);
|
||||
mappings.setMapping(Qt::Key_Left, HID::Keys::Left);
|
||||
mappings.setMapping(Qt::Key_Return, HID::Keys::Start);
|
||||
mappings.setMapping(Qt::Key_Backspace, HID::Keys::Select);
|
||||
mappings.setMapping(Qt::Key_W, HID::Keys::CirclePadUp);
|
||||
mappings.setMapping(Qt::Key_S, HID::Keys::CirclePadDown);
|
||||
mappings.setMapping(Qt::Key_D, HID::Keys::CirclePadRight);
|
||||
mappings.setMapping(Qt::Key_A, HID::Keys::CirclePadLeft);
|
||||
|
||||
return mappings;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue