0

board as second seperate keyboard
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

board as second seperate keyboard

by sborgie on Mon Apr 19, 2021 4:15 pm

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.

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

Re: board as second seperate keyboard

by mikeysklar on Tue Apr 20, 2021 3:54 pm

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

mikeysklar
 
Posts: 5030
Joined: Mon Aug 01, 2016 8:10 pm

Re: board as second seperate keyboard

by sborgie on Fri Apr 23, 2021 11:36 am

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

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

Re: board as second seperate keyboard

by mikeysklar on Fri Apr 23, 2021 3:19 pm

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.

mikeysklar
 
Posts: 5030
Joined: Mon Aug 01, 2016 8:10 pm

Re: board as second seperate keyboard

by sborgie on Sun Apr 25, 2021 4:26 pm

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.

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

Re: board as second seperate keyboard

by mikeysklar on Mon Apr 26, 2021 10:56 am

@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

mikeysklar
 
Posts: 5030
Joined: Mon Aug 01, 2016 8:10 pm

Re: board as second seperate keyboard

by mikeysklar on Mon Apr 26, 2021 10:56 am

@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

mikeysklar
 
Posts: 5030
Joined: Mon Aug 01, 2016 8:10 pm

Re: board as second seperate keyboard

by tonynunan on Tue May 11, 2021 1:59 pm

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.

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

Please be positive and constructive with your questions and comments.


cron