OK, I got the source from the svn, compiled it, copied the example config and tried really hard to understand the explaination of the mapping format. It just confusing. [img]<fileStore.core_Emoticons>/emoticons/wink.png[/img]/emoticons/wink@2x.png 2x" width="20" height="20" />
Â
Code: Select all
# Key configuration (all numbers are in hexadecimal!)
#
# Keys values are in the format YXXX where Y is the device number. 0 means
# keyborad and XXX is the SDL define for the desired key (read SDL_keysym.h).
#
# If Y is greater than 0, it means joystick number Y-1 and it uses the
# following format for XXX:
#
# - if XXX < 20, XXX is the axis number multiplied by 2. An even number means
# movement to the negative side (on the X axis, it means left). An odd
# number means movement to the positive side (on the X axis, it mean
# right). For the Y axis, negative means up and positive means down.
# X axis is usally axis number 0 and Y is axis number 1.
# - if 20 >= XXX > 30, then XXX is the HAT number multiplied by 4 plus the
# direction: 0 for up, 1 for down, 2 for right and 3 for left. Example:
# 0021 is HAT 0 down, 0026 is HAT 1 right.
# - if 80 >= XXX > 100, XXX is the joystick button number (XXX-080).
Â
But I figured it means:
Â
Key format is YZXX
Â
Y = the number of the gamepad. 0 means keyboard.
Z = seems to be always 0. (Aleast it looks like in the example)
XX = mapped key
Â
Axis goes from 00 >= XX < 20
e.g. for 1st x,y axis: Left=00, Right=01, Up=02, Down=03
e.g. for 2nd x,y axis: Left=04, Right=05, Up=06, Down=07
Â
HATs goes from 20 >= XX < 30
e.g. for 1st HAT: Up=20, Down=21, Right=22, Left=23
e.g. for 2nd HAT: Up=24, Down=25, Right=26, Left=27
Â
Buttons goes from 80 >= XX < 100
e.g.: Button1=80, Button2=81, etc. pp.