keyDown, keyUp, headBang
- OpenXTalkPaul
- Posts: 1574
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: keyDown, keyUp, headBang
Also 'Plug-and-Play' really just means that it's a class compliant device, doesn't it? Such as device can be used with generic class driver built into the OS. Many Game Controllers, adapters and a lot of MIDI to USB adapter/cables are like that as well.
- OpenXTalkPaul
- Posts: 1574
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: keyDown, keyUp, headBang
I think I'm going to test it out on Linux (since I only extensively tested on Mac & Windows) and add it to OXT DPE. It's a small library and I think it could be a feature that appeals to other tinkerers.
- richmond62
- Posts: 2767
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: keyDown, keyUp, headBang
Let me try to explain EXACTLY what my 'problem' is (no, not that problem, nor that problem, nor that one either
), with regard to peripheral devices.
I shall use as an example my Genesis Thor 100 rgb (which is, as someone remarked, a bit outdated: so, hell, am I, and I picked it up very cheaply indeed because I did NOT want the latest 'thang' to play games with, but a 'thing on the left' to stop wrist cramp) as it is the peripheral that happens to be connected to the computer I am sitting in front of at the moment.
So:
1. If I hit the 'Q' button on the gamepad I get a 'q' sent to my OXT stack.
2. If I hit the 'Q' button on my keyboard I get a 'q' sent to my OXT stack.
No prizes for that one!
HOWEVER, what I wonder about is whether there could be a way inwith the OXT IDE to work out whether that 'q' signal was originating in the gamepad or the keyboard.
IF there were a way to detect where the 'q' originated one could set up a series of "macro" commands/functions in a stack so that Chummy playing the game one has authored in one's stack could, for the sake of argument, control the movement of the "zombies" with the gamepad, while using the matching keys on the keyboard for something quite different.
Many gamepads come with software to set up macros (my Belkin Nostromo n30 and n50 cam with this software for Macintosh 32-bit), but they tend to be confined to one or two operating systems (my Genesis Thor 100 has a set up thing for Windows 8 only): and an end-user will not necessarily set their device's macros up the way the programmer of the OXT game wants.
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
I shall use as an example my Genesis Thor 100 rgb (which is, as someone remarked, a bit outdated: so, hell, am I, and I picked it up very cheaply indeed because I did NOT want the latest 'thang' to play games with, but a 'thing on the left' to stop wrist cramp) as it is the peripheral that happens to be connected to the computer I am sitting in front of at the moment.
So:
1. If I hit the 'Q' button on the gamepad I get a 'q' sent to my OXT stack.
2. If I hit the 'Q' button on my keyboard I get a 'q' sent to my OXT stack.
No prizes for that one!
HOWEVER, what I wonder about is whether there could be a way inwith the OXT IDE to work out whether that 'q' signal was originating in the gamepad or the keyboard.
IF there were a way to detect where the 'q' originated one could set up a series of "macro" commands/functions in a stack so that Chummy playing the game one has authored in one's stack could, for the sake of argument, control the movement of the "zombies" with the gamepad, while using the matching keys on the keyboard for something quite different.
Many gamepads come with software to set up macros (my Belkin Nostromo n30 and n50 cam with this software for Macintosh 32-bit), but they tend to be confined to one or two operating systems (my Genesis Thor 100 has a set up thing for Windows 8 only): and an end-user will not necessarily set their device's macros up the way the programmer of the OXT game wants.
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 1574
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: keyDown, keyUp, headBang
IF that Genesis Thor 100 thing is an HID class device, then it should show up in the Demo stack when it gets the HID device list, you then use the device ID/name of device from that list to poll the desired device, and then you should be able to use the library to isolate it's signals and to be able to respond to its signals (to trigger macros or send MIDI data or whatever you want) separately from your main keyboard's signals.richmond62 wrote: ↑Wed Mar 20, 2024 4:02 pm HOWEVER, what I wonder about is whether there could be a way inwith the OXT IDE to work out whether that 'q' signal was originating in the gamepad or the keyboard.
Other than that I don't think there's another way to do it for non-class compliant devices, and you'll need the driver for that device (that could be why it was so cheap
![Wink ;-)](./images/smilies/icon_e_wink.gif)
I had to give up an excellent M-Audio sound / MIDI card for the same lack of continued support reason, I should have kept that for my classic rig. I did find an Free OpenSource replacement driver for my 20+ year old 2x2 MIDI to USB adapter though!
- richmond62
- Posts: 2767
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: keyDown, keyUp, headBang
The Thor thing was so cheap because here in Bulgaria the type of people who play computer games are desperate to be the leaders of fashion: and I found the Thor thing "somewhere smelly round the back" of the store (i.e. on a shelf labelled 'old stock').
https://youtu.be/nxTnJPIl20U
Whoops:
-
https://youtu.be/nxTnJPIl20U
Whoops:
-
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 1574
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: keyDown, keyUp, headBang
Well yeah, the Extension module needs to be installed or dynamically loaded before its functions can be called. If the library is installed and/or loaded you still have to call a function that initializes it and scan for available HID devices. Even if this was integrate into the IDE, I probably wouldn't want it to actually load and initialize the library unless it was actually being called by a script.richmond62 wrote: ↑Wed Mar 20, 2024 4:30 pm The Thor thing was so cheap because here in Bulgaria the type of people who play computer games are desperate to be the leaders of fashion: and I found the Thor thing "somewhere smelly round the back" of the store (i.e. on a shelf labelled 'old stock').
https://youtu.be/nxTnJPIl20U
Whoops:
-
Screenshot 2024-03-20 at 18.31.42.png
I should also point out that some devices may show up more than once but with different HID profiles. For example a Game Controller with dual analog sticks might have a 'mode' button in the middle, that changes the profile and the analog sticks send a diifferent signal than if that mode button is off. With something like your Genesis Thor 100 device (assuming it is an HID Device) the lettered keys might show up as a keyboard device while the thumb trackball shows up as a mouse or pointing device.
- OpenXTalkPaul
- Posts: 1574
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: keyDown, keyUp, headBang
I don't think there's anything wrong with using old or cheap generic devices if they do what you need them to do.
I have a few old/ odd devices I've picked up over the years, wireless keyboard+trackpads in particular, like these cheap wireless mini handheld keyboard/trackpad controllers, I've used them for keyboard input for Android/Smart TVs and with my Arcade cabinet (for when it drops down into an OS/file browser or opens a web Browser window) I also have two larger keyboard+trackpad devices from Logitech.
I have a few old/ odd devices I've picked up over the years, wireless keyboard+trackpads in particular, like these cheap wireless mini handheld keyboard/trackpad controllers, I've used them for keyboard input for Android/Smart TVs and with my Arcade cabinet (for when it drops down into an OS/file browser or opens a web Browser window) I also have two larger keyboard+trackpad devices from Logitech.
- richmond62
- Posts: 2767
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: keyDown, keyUp, headBang
No; of course there is nothing wrong with that: I am now at work with a Belkin Nostromo n52 connected to my 2018 Mac Min running MacOS Sonoma, and I am typing this on one of about 8 Mac Pro Keyboards from 2002 that I own, and, to my mind, are the best Apple keyboards after the end of ADB connexions.
I used to have 2, but my younger son "stole" one to use as a controller on his DJ rig at a series of concerts in a WWII bunker on Cramond Isle in Scotland.
As there is no driver for the Belkin n52 for any 64-bit-only MacOS, the keyDowns are this:
- -
Which is effectively useless, as those keys are "right there" on my keyboard.
Frankly the ONLY reason I have the n52 connected at the moment is far "farting around" to see what I can do with OXT.
I really have a quite violent urge to find the person(s) who thought up the idea of planned obsolescence and do something really horrible to them.
Of course: IFF one can differentiate keyDowns from the n52 and the keyboard a lot of "fun" can follow.
This thing, at least, yields the arrow keys:
- -
Although, as I have amply demonstrated here and 'over there' many times: xTalk and arrowKeys are not always the best combination in games.
The orange button is the equivalent of CTRL on MAc.
I used to have 2, but my younger son "stole" one to use as a controller on his DJ rig at a series of concerts in a WWII bunker on Cramond Isle in Scotland.
As there is no driver for the Belkin n52 for any 64-bit-only MacOS, the keyDowns are this:
- -
Which is effectively useless, as those keys are "right there" on my keyboard.
Frankly the ONLY reason I have the n52 connected at the moment is far "farting around" to see what I can do with OXT.
I really have a quite violent urge to find the person(s) who thought up the idea of planned obsolescence and do something really horrible to them.
Of course: IFF one can differentiate keyDowns from the n52 and the keyboard a lot of "fun" can follow.
This thing, at least, yields the arrow keys:
- -
Although, as I have amply demonstrated here and 'over there' many times: xTalk and arrowKeys are not always the best combination in games.
The orange button is the equivalent of CTRL on MAc.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2767
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: keyDown, keyUp, headBang
Looking at the n52 manual (only any good for a driver that worked for 32-bit Macs) I am green with envy:
- -
If one could set things up something like that, so whenever Chummy connected their "whatever" gamepad to their computer it could be used to send a different set of signals to an OXT standalone from the signals sent by the keyboard . . .
https://archive.org/details/manualzilla-id-7381877
-
- -
If one could set things up something like that, so whenever Chummy connected their "whatever" gamepad to their computer it could be used to send a different set of signals to an OXT standalone from the signals sent by the keyboard . . .
https://archive.org/details/manualzilla-id-7381877
-
https://richmondmathewson.owlstown.net/
Who is online
Users browsing this forum: No registered users and 21 guests