GameController
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
GameController
For an application we/I need to use a Gamecontroller instead of Keyboard.
Can anyone give me an example-code or a tip to get the data from the Controller.
The Controller will be connected via bluetooth
Regards
Can anyone give me an example-code or a tip to get the data from the Controller.
The Controller will be connected via bluetooth
Regards
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
- Location: McKenna, WA
Re: GameController
If you have an Indy license look at the mergBLE external.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
-
- Livecode Opensource Backer
- Posts: 9375
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: GameController
That depends very much on your operating system and your non-keyboard controller.
For instance, I have a Belkin Nostromo which sends keyboard letters (from the left side of the keyboard) on Linux,
and as a result I can simply use "keyDown" and "keyUp" statements for a game controlled by a Nostromo.
Open a text editor, connect your game pad, and see what comes up in your text editor when you press each
button on your game pad . . . .
For instance, I have a Belkin Nostromo which sends keyboard letters (from the left side of the keyboard) on Linux,
and as a result I can simply use "keyDown" and "keyUp" statements for a game controlled by a Nostromo.
Open a text editor, connect your game pad, and see what comes up in your text editor when you press each
button on your game pad . . . .
Last edited by richmond62 on Tue Mar 15, 2022 9:08 am, edited 1 time in total.
-
- Livecode Opensource Backer
- Posts: 9375
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: GameController
Thanks. I solved the problem (on Windows) with "JoyToKey" (http://joytokey.net/en/")
regards
regards
-
- Livecode Opensource Backer
- Posts: 9375
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: GameController
It's that time again: when Richmond bangs on about his Nostromo gamepad.
Well, I was getting cheesed-off as the drivers for the Belkin Nostomo gamepads written
for Linux just don't cut the mustard.
So I knocked up a silly little stack to use as a way of teaching kids about the rawKeyDown thing
and Switch-Case routines.
Once one knows what rawKey signals are sent by a gamepad one can leverage the thing for one's stacks/standalones.
The good thing about Linux is that is detects an external USB gamepad without a driver or configure app, so one can
use it directly. Whether the same can be said for Macintosh or Windows I don't know. Certainly the Nostromo gamepads
are about 8 years out of date so the drivers Belkin do supply for Mac/Win are not up to speed re current versions
of those operating systems: http://www.belkin.com/us/support-articl ... leNum=4923
Well, I was getting cheesed-off as the drivers for the Belkin Nostomo gamepads written
for Linux just don't cut the mustard.
So I knocked up a silly little stack to use as a way of teaching kids about the rawKeyDown thing
and Switch-Case routines.
Once one knows what rawKey signals are sent by a gamepad one can leverage the thing for one's stacks/standalones.
The good thing about Linux is that is detects an external USB gamepad without a driver or configure app, so one can
use it directly. Whether the same can be said for Macintosh or Windows I don't know. Certainly the Nostromo gamepads
are about 8 years out of date so the drivers Belkin do supply for Mac/Win are not up to speed re current versions
of those operating systems: http://www.belkin.com/us/support-articl ... leNum=4923
- Attachments
-
- gamepad Example.livecode.zip
- (60.33 KiB) Downloaded 289 times
-
- Livecode Opensource Backer
- Posts: 9375
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: GameController
antimicro seems to recognise all USB input devices on Linux and
allow you to configure the, the only snag is that you have to have antimicro
running for those configurations to be piped through to Livecode.
http://www.webupd8.org/2014/09/gamepad- ... g-app.html
allow you to configure the, the only snag is that you have to have antimicro
running for those configurations to be piped through to Livecode.
http://www.webupd8.org/2014/09/gamepad- ... g-app.html
-
- Livecode Opensource Backer
- Posts: 9375
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: GameController
My beloved Nostromo pads were not playing nicely with MacOS 10.14.6
- -
Just got a T9 Pro to do what I want on a MacMini by remapping the CTRL key on it to "do" the CMD key for Mac:
- -
and mucking around with the 'b" key on the T9 so it becomes a "c" key (for copying) using Karabiner-Elements:
https://pqrs.org/osx/karabiner/
- -
Just got a T9 Pro to do what I want on a MacMini by remapping the CTRL key on it to "do" the CMD key for Mac:
- -
and mucking around with the 'b" key on the T9 so it becomes a "c" key (for copying) using Karabiner-Elements:
https://pqrs.org/osx/karabiner/
-
- Livecode Opensource Backer
- Posts: 9375
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: GameController
Wow . . . here I go again, again, again . . .
As my Belkin Nostromo n52 sends these key signals into both Mac and Linux boxes, and they can be readily picked
up by LiveCode . . .
- -
Is there a way one could write a macro-thing [of course a plug-in for LC is comparatively easy, although
ANY 'q' key, regardless of where it came from would be over-written] that could send signals outwith LC
to other applications (just as the Belkin system extensions did for MacOS 9 to MacOS 10).
The four-way rocker switch can send arrowKey signals.
I currently use my Nostromo gamepads (n50 and n52) with Linux boxes using antimicro.
As my Belkin Nostromo n52 sends these key signals into both Mac and Linux boxes, and they can be readily picked
up by LiveCode . . .
- -
Is there a way one could write a macro-thing [of course a plug-in for LC is comparatively easy, although
ANY 'q' key, regardless of where it came from would be over-written] that could send signals outwith LC
to other applications (just as the Belkin system extensions did for MacOS 9 to MacOS 10).
The four-way rocker switch can send arrowKey signals.
I currently use my Nostromo gamepads (n50 and n52) with Linux boxes using antimicro.