I really doubt you could map it to the keyboard easily.
If it's working as a joystick which it should be,
this program I wrote will tell you everything GM can get from it, just mess around with it to figure out what everything is.
I did Joystick controls for my game, and needed to check if it was just pressed.
I wrote a few scripts for handling them
First though I have a global variable that I just call 'k' as in key, it contains numbers like this:
global.k[0,0] = Keycode / Joystick button (made negative so it can be told apart from keycodes) #0
global.k[0,1] = Control #0's pressed/held/released info
global.k[1,0] = Keycode / Joystick button #1
global.k[2,1] = Control #1's pressed/held/released info
But the Keycode /Joystick button variables are only used in my control_check_direct script which I won't be giving you, so you may not need them depending on how you write your control_check_direct script.
This script I run at the beginning of each step in my HUD object which handles nearly everything that should be global, and persistent. Doesn't really matter what you call it, and it doesn't take any arguments.
var a;
a=0;
repeat (8)
{
if control_check_direct(a)
{
if global.k[a,1]>=-2
global.k[a,1]=min(global.k[a,1]+1,2)+.1*(global.k[a,1]=-2)
else
global.k[a,1]+=.01
}
else
{
if global.k[a,1]<0
global.k[a,1]=0
else
global.k[a,1]=-1
}
a+=1
}
It calls to control_check_direct, which is a script I wrote that actually checks the buttons to see if they're held down. For the purposes of my program each one was given a constant value 0-7 which you give to each of these scripts as an argument. It's their location in the global.k array. All of the code under the first if statement is there to help simulate the effects of clearing the key input in GM where it pauses for a second, then starts recognizing it as being pressed rapidly.
Heres the script I call control_check(control), it's works the same as keyboard_check(key) except that key is a value 0-7 in my game.
return (global.k[argument0,1]>0)
This is control_check_pressed(control), same as keyboard_check_pressed(key) except key is a value 0-7 in my game.
return (global.k[argument0,1]=1)
control_check_released(control), same deal as the other two.
return (global.k[argument0,1]=-1)
control_clear(control), same as keyboard_clear(key) key is a value 0-7 in my game.
if global.k[argument0,1]>0
global.k[argument0,1]=-2.15+.13*(frac(global.k[argument0,1])!=0)
else if global.k[argument0,1]=-1
global.k[argument0,1]=0
A little more complex than the others to properly simulate keyboard_clear(key). Where it says '2.15+.13*(frac' You can tweak those decimal values to change how long it waits before recognizing the key being pressed again, and how rapidly it recognizes them after that. the decimal is pretty much the number of steps, so I have it set to wait 15 steps before recognizing it again. the .13 is actually subtracted from .15 to find the other value so it would be .02. The second value should always be smaller than the first, if you want to use 1 digit put a zero before it (after the decimal)
You'll have to write your own control_check_direct(control) script, it should return a 1 if the key is held, and a 0 if it isn't. Afterwards I'd go into the global game settings and create constants for the keys so you don't have to memorize what each ones number is. You shouldn't have any trouble increasing the number of controls if you need to, just change the number in the repeat statement in the first script to your number of controls and add them in the control_check_direct script.