Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add generic keyboard mapping. #858

Open
rbthomp opened this issue Dec 10, 2021 · 6 comments
Open

Feature Request: Add generic keyboard mapping. #858

rbthomp opened this issue Dec 10, 2021 · 6 comments

Comments

@rbthomp
Copy link

rbthomp commented Dec 10, 2021

Would there be any interest in adding support for generic key binding to functions? Instead of mapping a gamepad key to a function you would map a Engine Driver function to a KeyEvent.

The UI could work like this, select an Engine Driver function from the a list then, you press the key you want bound to function. You would still have default key mappings profiles for devices you want to support, this would just extend the app to allow for any of the multimedia controllers that function as a Human Interface Device to be used with Engine Driver.

Let me know your thoughts, I don't have much Android development experience, but I could probably put together a pull request if needed.

@flash62au
Copy link
Contributor

We already do something related for the gamepads.
The 'icade' format in particular is just upper and lower case characters.

So a generic one for a keyboard would not be overly difficult.

However I have not seen any commercial devices which would be useful enough to make it worth the effort. (other than the gamepads) I have a personal plan to try build a dedicated gamepad using an esp32 and a rotary encoder, but it is held up in the Christmas postal deliveries. That will require a new gamepad configuration, which I can make reasonably generic.

Happy to rethink if I can be shown something commercial that would be usable.

@rbthomp
Copy link
Author

rbthomp commented Dec 12, 2021

I was going to use this. I was also playing with creating my own controller using Adafruit ItsyBitsy M0. I've already done some testing and using the Arduino Keyboard library which worked just fine when mapped existing keyevents as one of the listed gamepads.

I'm also got some inspiration from the following for ideas.
Trinkey
qtpy-knob

The Arduino really aren't a problem as you can control the key's it presses. It's the manufactured controllers which create troubles.

@flash62au
Copy link
Contributor

ok. the 'Mini USB Media Speaker Volume Controller' is kind-of interesting.
Supporting it in a similar way to gamepad controllers 'should' be easy enough (just a matter of figuring how to deal with the source being USB), but something special may be needed for the volume controller. Currently the volume speed control is treated separately to gamepad speed control, and in this case they will need to be linked. (depends how it actually does the volume changes.)

Coming up with a screen to allow customisable configuration of the buttons will not be too difficult, but it may be overkill unless there are likely to be other devices.
It is not on my radar, so I am not overly interested in doing it. But I am happy to assist if you want to take it on.

Having a 'standard' device type/support for Arduino based devices would make sense, and I was expecting to have to create something like that (if in can get the esp32 to do what I want). Even if I don't get mine going I am happy to assist to get yours going.

The USB volume controller one would be much easier to do if you reuse the existing gamepad functionality. (not 'universally' customisable)

@flash62au
Copy link
Contributor

@rbthomp
I did a fairly simple test of plugging in a USB keyboard into my phone.
ED doesn't actually distinguish between Bluetooth devices and USB devices, so if you can tell me the up and down key codes generated by the buttons on the device I can set something up for you. (You can use the gamepad test screen to get the codes.)

Peter

@wgehner
Copy link

wgehner commented Mar 10, 2023

What would be really cool for my android phone is to regulate speed of the (default) throttle with the volume buttons. Here's a how-to I found:

https://stackoverflow.com/questions/2874743/android-volume-buttons-used-in-my-application

@flash62au
Copy link
Contributor

You can already control the throttles with the volume buttons. Also with headphone volume buttons, and also USB volume dials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants