buttons on windows
Message-ID: <527BB218.10004 at icculus.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
I’m not opposed to re-adding it, but dropping DirectInput did solve a
bunch of inconsistencies in mouse and keyboard handling and it seems
like Microsoft has been deprecating the API for a while.
Would it make sense to add just for mice?
DirectInput is deprecated, and can’t be used in Windows Store apps at all.
RAWMOUSE only lists 5 buttons, but I’m curious what happens if you press
a sixth button; does it drop it? Does RID_DEVICE_INFO_MOUSE clamp to 5?
RAWMOUSE (winuser.h) - Win32 apps | Microsoft Learn
Also: do all those “gamer mice” with a thousand buttons just map the
rest of them to keyboard keys? Surely this didn’t require DirectInput,
right?
–ryan.
What about WM_APPCOMMAND, could that be getting used to pass these
button signals around? If I recall correctly, a lot of these
“infinite-button” mice have internally stored settings that the user
can choose between on the fly. Since this presumably is to allow a
mouse button to be assigned to something that would normally have a
keyboard button assigned to it by programs that were written without
the assumption of such mice, maybe SDL has support for a portion (or
all) of these and we just don’t realize it?
If they don’t map as keyboard keys in some way, then presumably they
get exposed via HID info (
). I don’t know how exactly that would work (haven’t looked at much of
anything HID related), but I assume that it would be a nuisance.
If these things require supporting HID, then I’d suggest just exposing
the raw data via some appropriate SDL event, since there’s no telling
what you might have to deal with otherwise. The things might even
shoot out a copy of their stored settings every time someone connects
to them, for all I know, since I’m pretty sure that USB’s HID specs
include usb drive support. If someone wants support for that, they can
write an extension library, all that SDL should do in such a generic
case is provide hooks for someone else.> Date: Thu, 07 Nov 2013 10:30:32 -0500
From: “Ryan C. Gordon”
To: SDL Development List
Subject: Re: [SDL] Please reintroduce DirectInput to get extra mouse