I think I've found the solution! I can get input from any button with joy_buttons and joy2_buttons, here's the page from GS manual wich explains how to use it: http://www.conitec.net/beta/joy_buttons.htm
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB