Digistump Forums
The Digispark => Digispark Libraries => Topic started by: adammhaile on April 08, 2013, 01:00:44 pm
-
I'm trying to use the DigiKeyboard library to mimic a HID keyboard and I found how to send keys and how to release ALL of them, by calling usbSetInterrupt() with 0 for the key value, but is there a way to release one key and not another. I'm using this for a game controller so, for example, I'm holding down the button that corresponds to Left-Arrow and press and release the A button. I want it to register as:
- Left Arrow Press
- A Press
- A Release
- Left Arrow Release
But all I can do now is basically momentary presses on each. Each time I press a button down it registers as press AND release on the computer. Is there a way to call usbSetInterrupt() or something else telling it that only one of the previously pressed keys has now been released?
-
I'm downloading the new library version to see what to do about it, but in the mean time, if this is for a game controller, why not use the joystick library?
-
Hello, this subject is also of interest to me. I have a project with I intend to create a game control with buttons only, but I can not. But I can not make a scketch that the computer recognizes as a game controller a Digispark. My progress was only using an Arduino Leonardo, I made the PC recognize as a keyboard, determining some buttons for the buttons. But I need help. I'm not getting libraries to make a Digispark work like a keyboard.
-
This may help you : https://digistump.com/board/index.php/topic,2839.0.html