[AD] Various tangents to distinguishing keyboards |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: allegro-developers@xxxxxxxxxxxxxxxxxx
- Subject: [AD] Various tangents to distinguishing keyboards
- From: "S. J. Dobrowolski" <stan423@xxxxxxxxx>
- Date: Thu, 28 Sep 2017 00:55:29 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=voWQWnkdNr9HPs5cE99cD0v4T0Iff8slAR6bQddEOHI=; b=ELtMdW30J35/Li6v7sN4hCZ5SldAEkny9XQ8FqbGPRy5187+xz6pXfl8bv19YBdHsA zaBty7tu5vrJciwbeXc5mGaOFkWI4FGneuaAnk5NTO0BqC54YcseEl79YGQo5akoOID0 8UEYPhNi3thIwBsozYGOE3Ha6dyC+rRPl+EhOZI5/Y7Ur7lcdmYw413H7AIMb5FBroFf blKFk4/x6cmDv+ZGbA3s4i36J/ySx3Ng9MUkmmeCTFWRtTRumZqqMxm8WmUEz1TkVoka 5YIy5rC177WALso2tx47Gn5cssmpnF4BVKTW0nYrPVDdHhVgwOs7jaylxqyvlsj1+3yi DolA==
Grettings, everyone.
Apologies if this is the wrong channel but it relates to source code of
Allegro so I couldn't come up with anything more appropriate. (Also,
please excuse any English errors.) I was considering modifying A5 for
multiple mice and keyboards event input support - while distinguishing
these devices, for clarity. Rationale: some of my friends and me don't
like gamepads that much, but like the idea of local play with separate
controllers. As a sidenote, I guess I'm more familiar with using A4, but
my prototypes could use a rewrite, even if it means coding from scratch
where I have used A4 bitmaps for game logic.
Based solely on web searches, on Windows, it appears some sort of
hardware ID is part of "raw input" API event. On Linux, it appears that
evdev API allows you to distinguish connected devices, but I'm not sure
how that is supposed to cooperate with various layers of user protection
and desktop stack. On MacOS... I frankly couldn't find good information.
I don't have a Mac anyway, so trusting my Mac code even in the slightest
would be a huge mistake.
Based solely on my glancing at Github Allegro 5 code, the Windows
version seems to be using the "regular" window events for keyboard
and/or mouse handling instead of "raw input". However there is a "raw
input" handler in what looks like the window event queue handler;
comment says it is unused though. It doesn't appear to handle anything
but mouse events, and does not appear to try to distinguish the mice.
The Linux version appears to be using evdev for mice and joysticks...
well, the mouse init code made me rewrite this paragraph multiple times,
is that supposed to be a "mixed" mouse or just a single one, and how do
we know it's that early in the file system when joysticks need to check
such a wider range? I guess I should install Linux and see for myself.
Maybe no Linux Allegro users happened to be Linux Allegro laptop users
who plugged in a regular mouse, maybe I'm missing something monumental
about evdev.
So I guess I'm writing to you with following questions:
* Would you consider "multikeyboard" and "multimouse" add-ons to be
added into the mainstream version of A5? Would real access to the
feature (as opposed to an API wrapper) being limited to Win/Lin be a
problem? Would you be concerned about this ending up being unmaintained?
* Does that sound like an overkill project for a team project beginner?
* Is no veteran maintainer doing something like this quietly at the moment?
* Can I assume that opening more evdev descriptors on Linux and doing
stuff with them, as well as requesting both types of input events on
Windows and then handling the new one has no good reason to break
existing input framework?
* Can I just write what I want in Windows raw input handler and delete
the code marked as dead, or is that there for a reason? Did someone try
in the past to implement a raw input driver and ended up with loads of
problems?
* What does Linux mouse driver init actually do?
* Is there anything that sounds like an obvious problem already?
Best regards,
Stan