board as second seperate keyboard

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sborgie
 
Posts: 5
Joined: Sun Apr 18, 2021 7:15 am

board as second seperate keyboard

Post by sborgie »

How can I let Windows recognise my (GrandCentral) board as a seperate keyboard/input device?
My board is now acting as some kind of 'mirror' board. In game all functions I assign to my Adafruit keyboard seem replicated to my regular keyboard.
Pressing '8' on my keyboard is interpreted the same as pressing the '8' button on my adafruit button box.

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: board as second seperate keyboard

Post by mikeysklar »

Are you using CircuitPython? Is this the example you had followed to setup your GrandCentral as a Keyboard?

https://learn.adafruit.com/adafruit-gra ... -and-mouse

User avatar
sborgie
 
Posts: 5
Joined: Sun Apr 18, 2021 7:15 am

Re: board as second seperate keyboard

Post by sborgie »

I use IDE.
Don't know how to use Phyton. (is Phyton better to use?)

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: board as second seperate keyboard

Post by mikeysklar »

It looks like the Grand Central M4 is easiest to use as a keyboard / mouse with the Arduino IDE. What you probably want to do is try and define your device as a joystick / keyboard or someother user custom device so you don't step all over your keyboard bindings.

I think this SAMD port of the joystick library might be a start.

https://github.com/gdsports/ArduinoJoys ... samd_patch

You can also try CircuitPython, but it does not sound as though you have done any development in Python before.

User avatar
sborgie
 
Posts: 5
Joined: Sun Apr 18, 2021 7:15 am

Re: board as second seperate keyboard

Post by sborgie »

I don't mind switching to CircuitPython, if that gives more possibilities to get this working.
Do you think I can pick up a example script containing all elements I want?
Adjusting the code to my PIN config is no problem of course.

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: board as second seperate keyboard

Post by mikeysklar »

@sborgie,

I do think CircuitPython will be much easier. Take a look at some of our GamePad examples here. They might have various elements of what you are looking for and definitely get you out of the "duplicate keyboard" issue.

https://github.com/adafruit/Adafruit_Ci ... r/examples

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: board as second seperate keyboard

Post by mikeysklar »

@sborgie,

I do think CircuitPython will be much easier. Take a look at some of our GamePad examples here. They might have various elements of what you are looking for and definitely get you out of the "duplicate keyboard" issue.

https://github.com/adafruit/Adafruit_Ci ... r/examples

User avatar
tonynunan
 
Posts: 7
Joined: Wed Apr 26, 2017 6:58 pm

Re: board as second seperate keyboard

Post by tonynunan »

When using keyboards Windows only recognizes keypresses and doesn't differentiate which keyboard they come from, so if you have more than one keyboard attached it can't tell which keyboard you pressed the key on, only that a key was pressed. So you would have to bind the GC action to a different key in game and get it to send that key instead. The standard Arduino keyboard files have F13 - F24 available, if the game will support them, and others can be added from the USB HID definitions.

As mikeysklar suggested you could also set up your GC as a Joystick/controller, which will most likely give you 32 buttons, depending on the game. I think that you can set up the GC as more than 1 controller, so you can get more buttons that way. You have the added advantage that you can also use the analogue inputs to set up joystick axes if that would be useful for your game.

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”