Comments (4)
Unfortunately you can't do that with this library. The USB descriptors are handled by the relevant 'boards' files and cannot be changed or overwritten on the fly.
For that matter you can't do that with the official Keyboard library either. The begin
and end
functions are empty. To truly 'stop' emulation you would have to disconnect from USB (physically or in software) and then re-enumerate without the keyboard descriptors present.
If you want keyboard and joystick behavior to switch off your best bet is to use the Joystick library and some sort of XInput emulation on the PC side (e.g. x360ce) if it's needed. Although the Arduino will always show up as both a keyboard and joystick simultaneously.
If you need the device to actually switch from one to the other you would have to leave the Arduino environment. You could use LUFA with an AVR Arduino (e.g. the Leonardo or Pro Micro) but you would be on your own with coding the USB descriptors and behavior. And if you're a beginner programmer that's going to be a tall task.
from arduinoxinput.
Unplugging the microcontroller tends to work pretty well 😛
What are you trying to accomplish?
from arduinoxinput.
In trying to run multiple emulator like xinput and keyboard but I want to be able to switch between them in the keyboard emulation you can start it with keyboard.begin() and stopped it with keyboard.end() but in xinput I only se a way to start
from arduinoxinput.
Thank for all your help I really appreciate
from arduinoxinput.
Related Issues (20)
- send data to arduino while emulating HOT 1
- XInput.h not found HOT 3
- bluetooth feature HOT 1
- Raspberry Pi Pico support HOT 3
- BUTTON_LOGO Does Not Result in Any Button Press HOT 2
- esp32 support HOT 1
- Non-debug mode in PlatformIO IDE HOT 2
- A question about Xinput device identification HOT 2
- Not able to get teensy board to have xinput mode Help HOT 1
- error: recipe.preproc.macros pattern is missing HOT 4
- XInput.getRumbleLeft() and XInput.getRumbleRight() byte structure HOT 2
- Is it possible to send additional 'keypresses' or buttons outside of what's provided? HOT 7
- Not issue: I just want to tip my hat. HOT 1
- Is there a way to have two ArduinoXinput devices and have them show up as two Joysticks? HOT 2
- Arduino uno R4 minima support HOT 1
- More than 1 controller like the wireless receiver HOT 1
- is it possible to use a bluetooth module(like hc06)、Pro Micro together with XInput to make gamepad wireless? HOT 1
- Using along with other libraries HOT 1
- Support with other libraries and button matrix HOT 1
- Guidance on adding support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinoxinput.