Switch Mappings https://github.com/capsterx-switch/switch-utils
 
# at beginning is a comment
all lines are
Key=VALUE
 
Key is a switch key.  You can use any key as a modifier key multiple keys are separated by -
VALUE is a keyboard key, currently you can use optional modifiers ALT, SHIFT, CTRL (separated by -) and a keyboard key
 
switch keys are 
A B X Y LSTICK RSTICK L R ZL ZR PLUS MINUS 
DUP DLEFT DRIGHT DDOWN 
LSTICK_LEFT LSTICK_RIGHT LSTICK_UP LSTICK_DOWN
RSTICK_LEFT RSTICK_UP RSTICK_RIGHT RSTICK_DOWN
SL_LEFT SR_LEFT SL_RIGHT SR_RIGHT (I have not tested these as I dont use the controller in this mode)
 
virtual settings are
TOUCH_MOUSE=TRUE -- map touch screen into mouse events (dont use for RTCW, it uses events that dont work right and I have coded a touch events that work)
TOUCH_MOUSE_ABS=TRUE -- use the sdl touch screen to mouse events, works for RTCW but you have to drag finger down on touch pad to use mouse
DPAD_ARROWS=true -- alias for DUP=UP, DDOWN=DOWN, DLEFT=LEFT, DRIGHT=RIGHT
LSTICK_ARROWS=TRUE -- alias for LSTICK_UP=UP, LSTICK_DOWN=DOWN, LSTICK_LEFT=LEFT, LSTICK_RIGHT=RIGHT
RSTICK_MOUSE=TRUE -- map right stick into mouse events
DOUBLE_TOUCK_KEYBOARD=TRUE -- two finger click brings up virtual keyboard, any input is sent both as a SDL_TEXTINPUT and each char
 
 
VALUE: keyboard
any single char
BACKSPACE TAB ENTER PAUSE ESC SPACE DEL 
KP0 KP1 KP2 KP3 KP4 KP5 KP6 KP7 KP8 KP9 KP0 KP.  
KP/ KP* KP- KP+ 
KP_ENTER UP DOWN RIGHT LEFT INSERT HOME END PAGEUP 
PAGEDOWN 
F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15
 
tilda might not map right, I used SDL_SCANCODE_GRAVE which may not be right.
 
Examples: using R and L as "meta keys"
R-A=W
R-B=S
R-X=D
R-Y=F
L-A=I
L-B=J
L-X=K
L-Y=L
 
Using a key (or multiple keys) to be a modified sdl key
A=ALT-X
B=CTRL-Y
X=SHIFT-Z
Y=ALT-CTRL-SHIFT=I
 
Mapping a virtual keyboard key (note, keyboard needs to be solo, it's a virtual modifier)
R=KEYBOARD
 
Currently you cannot send multiple non-modifier keys, but there is no reason why it could not be done.
