Need a little help binding joystick buttons :)

Page 1/3
| 2 | 3

By sss77

Resident (38)

sss77's picture

02-02-2017, 18:53

so i have an old PS3 controller it worked nice in openMSX emulator i figured out How to bind D-PAD
but seems i didn't understand How the buttons biding work correctly ?
i want to bind A+B together ? and F1 , or Pause key to a button
because when i play ZANAC_EX

button 2, 4, 6 and 8 (these are Z button in keyboard )
Button 1, 3,5,7 are SHIFT , there is No Space binding to button (Gamepad) ?
also Not working in Game (The Castle)
so i want bind SPACE i guess as A+B ?

Here is How buttons map in Control Panel (Devices and Printers)

Cross = button 1
Circle = Button 2
Square = Button 3
Triangle = Button 4
L1 = Button 5
R1 = Button 6
Select = Button 7
Start = Button 8

Login or register to post comments

By Manuel

Ascended (13087)

Manuel's picture

05-02-2017, 17:35

Check these examples by luppie:

By sss77

Resident (38)

sss77's picture

06-02-2017, 08:04

Amazing ! Thanks alot Manual
How about some keys like CTRL+Graph ? (remember game The Castle)
hmm or may be i can use Joy2Key for that !

By Manuel

Ascended (13087)

Manuel's picture

06-02-2017, 09:59

http://map.grauw.nl/articles/keymatrix.php for more information on what to type in the keymatrixdown/up commands. You can use any key if you use the right parameters.

Similar examples are also in the openMSX manual: http://openmsx.org/manual/commands#bind

By luppie

Paladin (770)

luppie's picture

06-02-2017, 11:11

I've added an extra row to the keymatrix, so it's a bit easier to find the corresponding key code:

So if you are looking for Graph you'll find it at : 6 0x04
And if you are looking for CTRL you'll find it at : 6 0x02

By sss77

Resident (38)

sss77's picture

06-02-2017, 11:21

i saw that Chart before but i coudln't understand it , now i do ! Big smile
BTW if i type unbind key "joy1 button(N)" this will end the job for such button right ?

Thanks alot Guys
MSX FOREVER

By sss77

Resident (38)

sss77's picture

07-02-2017, 22:33

sorry i got error !
i typed this in consol

bind key="joy1 button4 up" "keymatrixup 6 0x20"

then this error came in
(invalid keycode: key="joy1

also unbind key="joy1 button4" not working did i miss something ?
what' wrong ?

By sss77

Resident (38)

sss77's picture

07-02-2017, 23:03

ok so this is How the PS3 controller set in OpenMSX (as XBOX Controller)

Trigga A = button 0 , Cross (Playstation)
Trigga A = Button 2 , Square (Playstation)
Trigga A = Button 4 , L1 (Playstation)
Trigga A = Button 6 , Select (Playstation)
Trigga A = Button 8 , L3 (Playstation)

Trigga B = button 1, Circle (Playstation )
Trigga B = button 3 , Triangle (Playstation)
Trigga B = button 5, R1 (Playstation)
Trigga B = Button 7 , Start ( Playstation)
Trigga B = Button 9 , R3 (Playstation )

How do i unbind these or changed them ? also How to add Button 10 and 11 ? (L2 , R2 ) ?

By Manuel

Ascended (13087)

Manuel's picture

07-02-2017, 23:33

Ah, I think there's an error in luppie's document: there shouldn't be "key=". Please see the examples in the manual: http://openmsx.org/manual/commands#bind Otherwise the command is fine. Please try without "key=".

By luppie

Paladin (770)

luppie's picture

08-02-2017, 00:28

I've just tested it with a XBOX360 controller on Windows and Manuel is right. The command should be without "key="

So the command should be :
bind "joy1 button4 up" "keymatrixup 6 0x20"

This is the updated sheet:

By sss77

Resident (38)

sss77's picture

08-02-2017, 14:32

Thanks for update Smile

altho it seems (L-Shoulder and R-Shoulder) (L2, R2) it can't be bind as buttons ? i can't get it to work properly

dict set joystick1_config LEFT {-axis0 -axis2 button10}
dict set joystick1_config RIGHT {+axis0 +axis2 button11}

not work with me

Page 1/3
| 2 | 3
My MSX profile