Applied coding style fixes

This commit is contained in:
kalaposfos13 2024-10-12 17:28:52 +02:00
parent 3dda62fcba
commit 98200221f5
3 changed files with 136 additions and 135 deletions

View File

@ -3,19 +3,18 @@
// new includes // new includes
#include <map> #include <map>
//#include <unordered_map> // #include <unordered_map>
#include <vector>
#include <string>
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <string>
#include <vector> #include <vector>
#include <SDL3/SDL_events.h> #include <SDL3/SDL_events.h>
#include <SDL3/SDL_init.h> #include <SDL3/SDL_init.h>
#include <SDL3/SDL_properties.h> #include <SDL3/SDL_properties.h>
#include <SDL3/SDL_video.h>
#include <SDL3/SDL_timer.h> #include <SDL3/SDL_timer.h>
#include <SDL3/SDL_video.h>
#include "common/assert.h" #include "common/assert.h"
#include "common/config.h" #include "common/config.h"
#include "common/version.h" #include "common/version.h"
@ -37,18 +36,22 @@ bool KeyBinding::operator<(const KeyBinding& other) const {
} }
// modifiers are bitwise or-d together, so we need to check if ours is in that // modifiers are bitwise or-d together, so we need to check if ours is in that
template<typename T> template <typename T>
typename std::map<KeyBinding, T>::const_iterator FindKeyAllowingPartialModifiers(const std::map<KeyBinding, T>& map, KeyBinding binding) { typename std::map<KeyBinding, T>::const_iterator FindKeyAllowingPartialModifiers(
for (typename std::map<KeyBinding, T>::const_iterator it = map.cbegin(); it != map.cend(); it++) { const std::map<KeyBinding, T>& map, KeyBinding binding) {
for (typename std::map<KeyBinding, T>::const_iterator it = map.cbegin(); it != map.cend();
it++) {
if ((it->first.key == binding.key) && (it->first.modifier & binding.modifier) != 0) { if ((it->first.key == binding.key) && (it->first.modifier & binding.modifier) != 0) {
return it; return it;
} }
} }
return map.end(); // Return end if no match is found return map.end(); // Return end if no match is found
} }
template<typename T> template <typename T>
typename std::map<KeyBinding, T>::const_iterator FindKeyAllowingOnlyNoModifiers(const std::map<KeyBinding, T>& map, KeyBinding binding) { typename std::map<KeyBinding, T>::const_iterator FindKeyAllowingOnlyNoModifiers(
for (typename std::map<KeyBinding, T>::const_iterator it = map.cbegin(); it != map.cend(); it++) { const std::map<KeyBinding, T>& map, KeyBinding binding) {
for (typename std::map<KeyBinding, T>::const_iterator it = map.cbegin(); it != map.cend();
it++) {
if (it->first.key == binding.key && it->first.modifier == SDL_KMOD_NONE) { if (it->first.key == binding.key && it->first.modifier == SDL_KMOD_NONE) {
return it; return it;
} }
@ -62,7 +65,6 @@ struct AxisMapping {
int value; // Value to set for key press (+127 or -127 for movement) int value; // Value to set for key press (+127 or -127 for movement)
}; };
// i strongly suggest you collapse these maps // i strongly suggest you collapse these maps
std::map<std::string, u32> string_to_cbutton_map = { std::map<std::string, u32> string_to_cbutton_map = {
{"triangle", OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_TRIANGLE}, {"triangle", OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_TRIANGLE},
@ -80,8 +82,7 @@ std::map<std::string, u32> string_to_cbutton_map = {
{"up", OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_UP}, {"up", OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_UP},
{"down", OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_DOWN}, {"down", OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_DOWN},
{"left", OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_LEFT}, {"left", OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_LEFT},
{"right", OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_RIGHT} {"right", OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_RIGHT}};
};
std::map<std::string, AxisMapping> string_to_axis_map = { std::map<std::string, AxisMapping> string_to_axis_map = {
{"axis_left_x_plus", {Input::Axis::LeftX, 127}}, {"axis_left_x_plus", {Input::Axis::LeftX, 127}},
{"axis_left_x_minus", {Input::Axis::LeftX, -127}}, {"axis_left_x_minus", {Input::Axis::LeftX, -127}},
@ -167,25 +168,14 @@ std::map<std::string, u32> string_to_keyboard_key_map = {
{"middlebutton", SDL_BUTTON_MIDDLE}, {"middlebutton", SDL_BUTTON_MIDDLE},
}; };
std::map<std::string, u32> string_to_keyboard_mod_key_map = { std::map<std::string, u32> string_to_keyboard_mod_key_map = {
{"lshift", SDL_KMOD_LSHIFT}, {"lshift", SDL_KMOD_LSHIFT}, {"rshift", SDL_KMOD_RSHIFT}, {"lctrl", SDL_KMOD_LCTRL},
{"rshift", SDL_KMOD_RSHIFT}, {"rctrl", SDL_KMOD_RCTRL}, {"lalt", SDL_KMOD_LALT}, {"ralt", SDL_KMOD_RALT},
{"lctrl", SDL_KMOD_LCTRL}, {"shift", SDL_KMOD_SHIFT}, {"ctrl", SDL_KMOD_CTRL}, {"alt", SDL_KMOD_ALT},
{"rctrl", SDL_KMOD_RCTRL}, {"l_meta", SDL_KMOD_LGUI}, {"r_meta", SDL_KMOD_RGUI}, {"meta", SDL_KMOD_GUI},
{"lalt", SDL_KMOD_LALT}, {"lwin", SDL_KMOD_LGUI}, {"rwin", SDL_KMOD_RGUI}, {"win", SDL_KMOD_GUI},
{"ralt", SDL_KMOD_RALT},
{"shift", SDL_KMOD_SHIFT},
{"ctrl", SDL_KMOD_CTRL},
{"alt", SDL_KMOD_ALT},
{"l_meta", SDL_KMOD_LGUI},
{"r_meta", SDL_KMOD_RGUI},
{"meta", SDL_KMOD_GUI},
{"lwin", SDL_KMOD_LGUI},
{"rwin", SDL_KMOD_RGUI},
{"win", SDL_KMOD_GUI},
{"none", SDL_KMOD_NONE}, // if you want to be fancy {"none", SDL_KMOD_NONE}, // if you want to be fancy
}; };
// Button map: maps key+modifier to controller button // Button map: maps key+modifier to controller button
std::map<KeyBinding, u32> button_map = { std::map<KeyBinding, u32> button_map = {
/* /*
@ -286,7 +276,8 @@ void WindowSDL::parseInputConfig(const std::string& filename) {
auto key_it = string_to_keyboard_key_map.find(key); auto key_it = string_to_keyboard_key_map.find(key);
auto mod_it = string_to_keyboard_mod_key_map.find(mod); auto mod_it = string_to_keyboard_mod_key_map.find(mod);
if (key_it != string_to_keyboard_key_map.end() && mod_it != string_to_keyboard_mod_key_map.end()) { if (key_it != string_to_keyboard_key_map.end() &&
mod_it != string_to_keyboard_mod_key_map.end()) {
binding.key = key_it->second; binding.key = key_it->second;
binding.modifier = mod_it->second; binding.modifier = mod_it->second;
} else { } else {
@ -309,10 +300,11 @@ void WindowSDL::parseInputConfig(const std::string& filename) {
auto button_it = string_to_cbutton_map.find(controller_input); auto button_it = string_to_cbutton_map.find(controller_input);
if (axis_it != string_to_axis_map.end()) { if (axis_it != string_to_axis_map.end()) {
axis_map[binding] = axis_it->second; axis_map[binding] = axis_it->second;
} else if(button_it != string_to_cbutton_map.end()) { } else if (button_it != string_to_cbutton_map.end()) {
button_map[binding] = button_it->second; button_map[binding] = button_it->second;
} else { } else {
std::cerr << "Syntax error while parsing controller inputs at line " << lineCount << "\n"; std::cerr << "Syntax error while parsing controller inputs at line " << lineCount
<< "\n";
continue; // skip continue; // skip
} }
} }
@ -321,9 +313,9 @@ void WindowSDL::parseInputConfig(const std::string& filename) {
Uint32 WindowSDL::keyRepeatCallback(void* param, Uint32 id, Uint32 interval) { Uint32 WindowSDL::keyRepeatCallback(void* param, Uint32 id, Uint32 interval) {
auto* data = (std::pair<WindowSDL*, SDL_Event*>*)param; auto* data = (std::pair<WindowSDL*, SDL_Event*>*)param;
KeyBinding binding = { data->second->key.key, SDL_GetModState() }; KeyBinding binding = {data->second->key.key, SDL_GetModState()};
data->first->updateModKeyedInputsManually(binding); data->first->updateModKeyedInputsManually(binding);
//data->first->onKeyPress(data->second); // data->first->onKeyPress(data->second);
delete data->second; delete data->second;
delete data; delete data;
return 0; // Return 0 to stop the timer after firing once return 0; // Return 0 to stop the timer after firing once
@ -337,7 +329,7 @@ Uint32 WindowSDL::mousePolling(void* param, Uint32 id, Uint32 interval) {
void WindowSDL::updateMouse() { void WindowSDL::updateMouse() {
float d_x = 0, d_y = 0; float d_x = 0, d_y = 0;
SDL_GetRelativeMouseState(&d_x, &d_y); SDL_GetRelativeMouseState(&d_x, &d_y);
//std::cout << "mouse polling yay!\n" << d_x << " " << d_y <<"\n"; // std::cout << "mouse polling yay!\n" << d_x << " " << d_y <<"\n";
float angle = atan2(d_y, d_x); float angle = atan2(d_y, d_x);
float a_x = cos(angle) * 128.0, a_y = sin(angle) * 128.0; float a_x = cos(angle) * 128.0, a_y = sin(angle) * 128.0;
@ -351,9 +343,8 @@ void WindowSDL::updateMouse() {
} }
} }
WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_,
std::string_view window_title)
WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_, std::string_view window_title)
: width{width_}, height{height_}, controller{controller_} { : width{width_}, height{height_}, controller{controller_} {
if (!SDL_Init(SDL_INIT_VIDEO)) { if (!SDL_Init(SDL_INIT_VIDEO)) {
UNREACHABLE_MSG("Failed to initialize SDL video subsystem: {}", SDL_GetError()); UNREACHABLE_MSG("Failed to initialize SDL video subsystem: {}", SDL_GetError());
@ -411,9 +402,9 @@ Uint32 mouse_polling_id = 0;
void WindowSDL::waitEvent() { void WindowSDL::waitEvent() {
// Called on main thread // Called on main thread
SDL_Event event; SDL_Event event;
if(mouse_polling_id == 0) { if (mouse_polling_id == 0) {
// mouse polling // mouse polling
//std::cout << "Why are we adding new timers?\n\n"; // std::cout << "Why are we adding new timers?\n\n";
mouse_polling_id = SDL_AddTimer(33, mousePolling, (void*)this); mouse_polling_id = SDL_AddTimer(33, mousePolling, (void*)this);
} }
if (!SDL_WaitEvent(&event)) { if (!SDL_WaitEvent(&event)) {
@ -443,7 +434,7 @@ void WindowSDL::waitEvent() {
case SDL_EVENT_KEY_UP: case SDL_EVENT_KEY_UP:
case SDL_EVENT_MOUSE_BUTTON_UP: case SDL_EVENT_MOUSE_BUTTON_UP:
case SDL_EVENT_MOUSE_BUTTON_DOWN: case SDL_EVENT_MOUSE_BUTTON_DOWN:
SDL_AddTimer(33, keyRepeatCallback, (void*)payload_to_timer); // this is intentional passthrough SDL_AddTimer(33, keyRepeatCallback, (void*)payload_to_timer);
onKeyPress(&event); onKeyPress(&event);
break; break;
case SDL_EVENT_GAMEPAD_BUTTON_DOWN: case SDL_EVENT_GAMEPAD_BUTTON_DOWN:
@ -471,20 +462,21 @@ void WindowSDL::onResize() {
void WindowSDL::updateButton(KeyBinding& binding, u32 button, bool is_pressed) { void WindowSDL::updateButton(KeyBinding& binding, u32 button, bool is_pressed) {
float x; float x;
Input::Axis axis; Input::Axis axis;
switch(button) { switch (button) {
case OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L2: case OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L2:
case OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R2: case OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R2:
axis = (button == OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R2) ? axis = (button == OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R2) ? Input::Axis::TriggerRight
Input::Axis::TriggerRight : Input::Axis::TriggerLeft; : Input::Axis::TriggerLeft;
//int axis_value = is_pressed ? 255 : 0; // int axis_value = is_pressed ? 255 : 0;
//int ax = Input::GetAxis(0, 0x80, is_pressed ? 255 : 0); // int ax = Input::GetAxis(0, 0x80, is_pressed ? 255 : 0);
controller->Axis(0, axis, Input::GetAxis(0, 0x80, is_pressed ? 255 : 0)); controller->Axis(0, axis, Input::GetAxis(0, 0x80, is_pressed ? 255 : 0));
break; break;
case OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_TOUCH_PAD: case OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_TOUCH_PAD:
x = Config::getBackButtonBehavior() == "left" ? 0.25f x = Config::getBackButtonBehavior() == "left" ? 0.25f
: Config::getBackButtonBehavior() == "right" ? 0.75f : 0.5f; : Config::getBackButtonBehavior() == "right" ? 0.75f
: 0.5f;
controller->SetTouchpadState(0, true, x, 0.5f); controller->SetTouchpadState(0, true, x, 0.5f);
//button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_TOUCH_PAD; // button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_TOUCH_PAD;
controller->CheckButton(0, button, is_pressed); controller->CheckButton(0, button, is_pressed);
break; break;
default: // is a normal key default: // is a normal key
@ -498,10 +490,12 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
KeyBinding binding = {0, SDL_GetModState()}; KeyBinding binding = {0, SDL_GetModState()};
if (event->type == SDL_EVENT_KEY_DOWN || event->type == SDL_EVENT_KEY_UP) { if (event->type == SDL_EVENT_KEY_DOWN || event->type == SDL_EVENT_KEY_UP) {
binding.key = event->key.key; // For keyboard events binding.key = event->key.key; // For keyboard events
} else if (event->type == SDL_EVENT_MOUSE_BUTTON_DOWN || event->type == SDL_EVENT_MOUSE_BUTTON_UP) { } else if (event->type == SDL_EVENT_MOUSE_BUTTON_DOWN ||
event->type == SDL_EVENT_MOUSE_BUTTON_UP) {
binding.key = event->button.button; // For mouse button events binding.key = event->button.button; // For mouse button events
} else { } else {
std::cout << "Bro something is very wrong with the waitevent switch case as this is the only 4 possible cases\n"; std::cout << "Bro something is very wrong with the waitevent switch case as this is the "
"only 4 possible cases\n";
return; return;
} }
@ -513,7 +507,8 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {
// Toggle capture of the mouse // Toggle capture of the mouse
if (binding.key == SDLK_F9) { if (binding.key == SDLK_F9) {
SDL_SetWindowRelativeMouseMode(this->GetSdlWindow(), !SDL_GetWindowRelativeMouseMode(this->GetSdlWindow())); SDL_SetWindowRelativeMouseMode(this->GetSdlWindow(),
!SDL_GetWindowRelativeMouseMode(this->GetSdlWindow()));
} }
// Reparse kbm inputs // Reparse kbm inputs
if (binding.key == SDLK_F8) { if (binding.key == SDLK_F8) {
@ -531,7 +526,6 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
} }
// Check if the current key+modifier is a button mapping // Check if the current key+modifier is a button mapping
bool button_found = false; bool button_found = false;
auto button_it = FindKeyAllowingPartialModifiers(button_map, binding); auto button_it = FindKeyAllowingPartialModifiers(button_map, binding);
@ -541,7 +535,9 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
if (button_it != button_map.end()) { if (button_it != button_map.end()) {
button_found = true; button_found = true;
button = button_it->second; button = button_it->second;
WindowSDL::updateButton(binding, button, event->type == SDL_EVENT_KEY_DOWN || event->type == SDL_EVENT_MOUSE_BUTTON_DOWN); WindowSDL::updateButton(binding, button,
event->type == SDL_EVENT_KEY_DOWN ||
event->type == SDL_EVENT_MOUSE_BUTTON_DOWN);
} }
// Check if the current key+modifier is an axis mapping // Check if the current key+modifier is an axis mapping
auto axis_it = FindKeyAllowingPartialModifiers(axis_map, binding); auto axis_it = FindKeyAllowingPartialModifiers(axis_map, binding);
@ -550,7 +546,10 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
if (axis_it != axis_map.end()) { if (axis_it != axis_map.end()) {
axis = axis_it->second.axis; axis = axis_it->second.axis;
axis_value = (event->type == SDL_EVENT_KEY_DOWN || event->type == SDL_EVENT_MOUSE_BUTTON_DOWN) ? axis_it->second.value : 0; axis_value =
(event->type == SDL_EVENT_KEY_DOWN || event->type == SDL_EVENT_MOUSE_BUTTON_DOWN)
? axis_it->second.value
: 0;
int ax = Input::GetAxis(-0x80, 0x80, axis_value); int ax = Input::GetAxis(-0x80, 0x80, axis_value);
controller->Axis(0, axis, ax); controller->Axis(0, axis, ax);
} }
@ -565,35 +564,37 @@ void WindowSDL::updateModKeyedInputsManually(Frontend::KeyBinding& binding) {
if (input.first.modifier != SDL_KMOD_NONE) { if (input.first.modifier != SDL_KMOD_NONE) {
if ((input.first.modifier & binding.modifier) == 0) { if ((input.first.modifier & binding.modifier) == 0) {
WindowSDL::updateButton(binding, input.second, false); WindowSDL::updateButton(binding, input.second, false);
} else if(input.first.key == binding.key) { } else if (input.first.key == binding.key) {
mod_keyed_input_found = true; mod_keyed_input_found = true;
} }
} }
} }
for (auto input : axis_map) { for (auto input : axis_map) {
if (input.first.modifier != SDL_KMOD_NONE) { if (input.first.modifier != SDL_KMOD_NONE) {
if((input.first.modifier & binding.modifier) == 0) { if ((input.first.modifier & binding.modifier) == 0) {
controller->Axis(0, input.second.axis, Input::GetAxis(-0x80, 0x80, 0)); controller->Axis(0, input.second.axis, Input::GetAxis(-0x80, 0x80, 0));
} else if(input.first.key == binding.key) { } else if (input.first.key == binding.key) {
mod_keyed_input_found = true; mod_keyed_input_found = true;
} }
} }
} }
// if both non mod keyed and mod keyed inputs are used and you press the key and then the mod key in a single frame, // if both non mod keyed and mod keyed inputs are used and you press the key and then the mod
// both will activate but the simple one will not deactivate, unless i use this stupid looking workaround // key in a single frame, both will activate but the simple one will not deactivate, unless i
if(!mod_keyed_input_found) return; // in this case the fix for the fix for the wrong update order is not needed // use this stupid looking workaround
for(auto input : button_map) { if (!mod_keyed_input_found)
if(input.first.modifier == SDL_KMOD_NONE) { return; // in this case the fix for the fix for the wrong update order is not needed
for (auto input : button_map) {
if (input.first.modifier == SDL_KMOD_NONE) {
WindowSDL::updateButton(binding, input.second, false); WindowSDL::updateButton(binding, input.second, false);
} }
} }
for(auto input : axis_map) { for (auto input : axis_map) {
if(input.first.modifier == SDL_KMOD_NONE) { if (input.first.modifier == SDL_KMOD_NONE) {
controller->Axis(0, input.second.axis, Input::GetAxis(-0x80, 0x80, 0)); controller->Axis(0, input.second.axis, Input::GetAxis(-0x80, 0x80, 0));
} }
} }
// also this sometimes leads to janky inputs but whoever decides to intentionally create a state where this is needed // also this sometimes leads to janky inputs but whoever decides to intentionally create a state
// should not deserve a smooth experience anyway // where this is needed should not deserve a smooth experience anyway
} }
void WindowSDL::onGamepadEvent(const SDL_Event* event) { void WindowSDL::onGamepadEvent(const SDL_Event* event) {

View File

@ -18,7 +18,6 @@ class GameController;
namespace Frontend { namespace Frontend {
class KeyBinding { class KeyBinding {
public: public:
Uint32 key; Uint32 key;
@ -52,8 +51,6 @@ struct WindowSystemInfo {
WindowSystemType type = WindowSystemType::Headless; WindowSystemType type = WindowSystemType::Headless;
}; };
class WindowSDL { class WindowSDL {
public: public:
explicit WindowSDL(s32 width, s32 height, Input::GameController* controller, explicit WindowSDL(s32 width, s32 height, Input::GameController* controller,
@ -84,7 +81,6 @@ public:
void updateMouse(); void updateMouse();
private: private:
void onResize(); void onResize();
void onKeyPress(const SDL_Event* event); void onKeyPress(const SDL_Event* event);
void onGamepadEvent(const SDL_Event* event); void onGamepadEvent(const SDL_Event* event);

View File

@ -1,61 +1,65 @@
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project #SPDX - FileCopyrightText : Copyright 2024 shadPS4 Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later #SPDX - License - Identifier : GPL - 2.0 - or -later
# controller button mappings #controller button mappings
# taken keys: #taken keys:
# f11: fullscreen #f11 : fullscreen
# f10: fps counter #f10 : fps counter
# f9: toggle mouse capture #f9 : toggle mouse capture
# f8: reparse keyboard input (this) #f8 : reparse keyboard input(this)
# this is a mapping for bloodborne inspired by other souls titles on pc #this is a mapping for bloodborne inspired by other souls titles on pc
# use another item (healing), change status in inventory #use another item(healing), change status in inventory
triangle=f triangle = f
# dodge, back in inv #dodge, back in inv
circle=space circle = space
# interact, select item in inv #interact, select item in inv
cross=e cross = e
# use quick item, remove item in inv #use quick item, remove item in inv
square=r square = r
# emergency extra bullets #emergency extra bullets
up=w,lalt up = w,
# change quick item lalt
down=s,lalt #change quick item
# change weapon in left hand down = s,
left=a,lalt lalt
# change weapon in right hand #change weapon in left hand
right=d,lalt left = a,
lalt
#change weapon in right hand
right = d,
lalt
# menu #menu
options=escape options = escape
# gestures #gestures
touchpad=g touchpad = g
# transform #transform
l1=rightbutton,lshift l1 = rightbutton,
# shoot lshift
r1=leftbutton #shoot
# light attack r1 = leftbutton
l2=rightbutton #light attack
# heavy attack l2 = rightbutton
r2=leftbutton,lshift #heavy attack
r2 = leftbutton,
lshift
# does nothing #does nothing
l3=x l3 = x
# center cam, lock on #center cam, lock on
r3=q r3 = q
# axis mappings #axis mappings
# move #move
axis_left_x_minus=a axis_left_x_minus = a axis_left_x_plus = d axis_left_y_minus =
axis_left_x_plus=d w axis_left_y_plus = s
axis_left_y_minus=w #og cam input
axis_left_y_plus=s #axis_right_x_minus = j
# og cam input #axis_right_x_plus = l
# axis_right_x_minus=j #axis_right_y_minus = i
# axis_right_x_plus=l #axis_right_y_plus = k
# axis_right_y_minus=i
# axis_right_y_plus=k