Add keys for joystick axis buttons.

The idea is to allow a joystick axis to be mapped to button presses. These
allow the buttons to be bound without consuming other possibly valid keys.
This commit is contained in:
Bill Currie 2013-01-19 22:35:14 +09:00
parent 03246e220f
commit 35edfae2a0
2 changed files with 69 additions and 0 deletions

View file

@ -410,6 +410,42 @@ typedef enum {
QFJ_BUTTON31,
QFJ_BUTTON32,
//
// joystick axes (for button emulation without consuming buttons)
//
QFJ_AXIS1,
QFJ_AXIS2,
QFJ_AXIS3,
QFJ_AXIS4,
QFJ_AXIS5,
QFJ_AXIS6,
QFJ_AXIS7,
QFJ_AXIS8,
QFJ_AXIS9,
QFJ_AXIS10,
QFJ_AXIS11,
QFJ_AXIS12,
QFJ_AXIS13,
QFJ_AXIS14,
QFJ_AXIS15,
QFJ_AXIS16,
QFJ_AXIS17,
QFJ_AXIS18,
QFJ_AXIS19,
QFJ_AXIS20,
QFJ_AXIS21,
QFJ_AXIS22,
QFJ_AXIS23,
QFJ_AXIS24,
QFJ_AXIS25,
QFJ_AXIS26,
QFJ_AXIS27,
QFJ_AXIS28,
QFJ_AXIS29,
QFJ_AXIS30,
QFJ_AXIS31,
QFJ_AXIS32,
QFK_LAST
} knum_t;

View file

@ -443,6 +443,39 @@ keyname_t keynames[] = {
{ "J_BUTTON31", QFJ_BUTTON31 },
{ "J_BUTTON32", QFJ_BUTTON32 },
{ "J_AXIS1", QFJ_AXIS1 },
{ "J_AXIS2", QFJ_AXIS2 },
{ "J_AXIS3", QFJ_AXIS3 },
{ "J_AXIS4", QFJ_AXIS4 },
{ "J_AXIS5", QFJ_AXIS5 },
{ "J_AXIS6", QFJ_AXIS6 },
{ "J_AXIS7", QFJ_AXIS7 },
{ "J_AXIS8", QFJ_AXIS8 },
{ "J_AXIS9", QFJ_AXIS9 },
{ "J_AXIS10", QFJ_AXIS10 },
{ "J_AXIS11", QFJ_AXIS11 },
{ "J_AXIS12", QFJ_AXIS12 },
{ "J_AXIS13", QFJ_AXIS13 },
{ "J_AXIS14", QFJ_AXIS14 },
{ "J_AXIS15", QFJ_AXIS15 },
{ "J_AXIS16", QFJ_AXIS16 },
{ "J_AXIS17", QFJ_AXIS17 },
{ "J_AXIS18", QFJ_AXIS18 },
{ "J_AXIS19", QFJ_AXIS19 },
{ "J_AXIS20", QFJ_AXIS20 },
{ "J_AXIS21", QFJ_AXIS21 },
{ "J_AXIS22", QFJ_AXIS22 },
{ "J_AXIS23", QFJ_AXIS23 },
{ "J_AXIS24", QFJ_AXIS24 },
{ "J_AXIS25", QFJ_AXIS25 },
{ "J_AXIS26", QFJ_AXIS26 },
{ "J_AXIS27", QFJ_AXIS27 },
{ "J_AXIS28", QFJ_AXIS28 },
{ "J_AXIS29", QFJ_AXIS29 },
{ "J_AXIS30", QFJ_AXIS30 },
{ "J_AXIS31", QFJ_AXIS31 },
{ "J_AXIS32", QFJ_AXIS32 },
{NULL, 0}
};