Is there a limit to number of buttons of a HID Joystick?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
fazzah
Posts: 4
Joined: Sat Jan 19, 2013 1:30 am

Is there a limit to number of buttons of a HID Joystick?

Post by fazzah » Sat Jan 19, 2013 1:34 am

Hi all,

I want to build a MFCD buttons frame (DCS A10C players know what's that). It has around 35 keys. Also, I need two of these items, additionally it cannot be a HID keyobard, since OS "merges" keyboards. I need a separate, identifiable device.

Therefore as in the subject, is there a limit to how many buttons a joystick can have? Also, since I won't be needing analog axes, would it be better to use HID gamepad? If so, same question applies.

If it makes any difference, I will build a 6x6 key matrix.

Thanks in advance!

ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

Re: Is there a limit to number of buttons of a HID Joystick?

Post by ulao » Sat Jan 19, 2013 1:59 am

Yes, you get 4 rows ( 32 ) plus you can use the POV I think it goes up quite high but I know it supports up to 8 positions. I dont see any reason you can not use axis as well. If device button 1 is pressed send data for analog value 1. You can have 256 for each analog that way. This would be hard on the computer software you are using it with unless you have control of the source IMO.

So I gather you need 64 buttons? The POV may go up to 256. Or do you need 128 buttons?

FYI: If this is a windows device you may want to use the multiple device report. You can have 4 joystick under one report. Linux does not play well here so its a win only setup.

fazzah
Posts: 4
Joined: Sat Jan 19, 2013 1:30 am

Re: Is there a limit to number of buttons of a HID Joystick?

Post by fazzah » Sat Jan 19, 2013 12:21 pm

Thanks for the reply.

I can't use analog values, because the simulation uses axes to control things like rudders, ailerons etc. I can't make it "translate" analog input values into different commands. I can only map buttons.

So, to check if I understand correctly, I can map 32 buttons directly, and also send report of the 8-way hat positions which will in practice act as buttons, right?

Also, is HID keypad different than HID joystick? Both have analog axes, hats and buttons...

Oh and don't need to use multiple device report, I can build two units.

Do I understand correctly that HID joysticks/keypads are detected as separate devices?

ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

Re: Is there a limit to number of buttons of a HID Joystick?

Post by ulao » Wed Jan 23, 2013 6:24 pm

I never used HID keyboard nor do I see why it would have hat and analogs? They most certainly are two different reports. Also I know the hat has more then 8.

fazzah
Posts: 4
Joined: Sat Jan 19, 2013 1:30 am

Re: Is there a limit to number of buttons of a HID Joystick?

Post by fazzah » Wed Jan 23, 2013 8:24 pm

My bad, i meant joypad, not keypad...

ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

Re: Is there a limit to number of buttons of a HID Joystick?

Post by ulao » Fri Jan 25, 2013 12:21 am

Oh I think you mean gamepad vs joystick, and yes they are very different. gamepads do much much more.

Post Reply