companion icon indicating copy to clipboard operation
companion copied to clipboard

Customisable keyboard map for emulators

Open davidjoshuaford opened this issue 3 years ago • 4 comments

Is this a feature relevant to companion itself, and not a module?

  • [X] I believe this to be a feature for companion, not a module

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the feature

On the Settings Page, under the "Enable emulator control for Logitech R400/Mastercue/DSan":

Currently at the moment, my the remote clicker (ie R400, R500) only targets buttons #2, #3, #4 on the Emulator page, and limits the flexibility of where the remote clicker buttons can be placed.

Modification: Make the clicker inputs user-selected to determine what buttons a remote clicker it targets within Companion.

Ie, instead of 2, 3, 4, the clicker could be mapped to 6, 7, 8... or Q, W E... or even out of sequence, such as 6, 8, 7, or A, D, S for that matter.

Usecases

I'd like to move the Clicker control to the other end of the layout, so that it targets buttons 6, 7, 8...and even to customize it out-of-order (ie 6, 8, 7... so that "back" clicker button targets #6, the "black" clicker button targets 7, and "forward" clicker targets #8).

Also, some clickers have user-definable keystrokes – ie the LogiPresentaiton Application can assign a keystroke to a long press of the main button. If Companion could map any keystroke, a long press on the clicker defined as "Z", would translate to button #25 on the Emulator.

Bonus points if the Emulator page does not need to be the foreground application...that would be huge. (much like how the Stream Deck Pedal runs in the background).

To illustrate - I want to be able to re-locate the clicker control buttons to the end of this layout:

Screen Shot 2022-08-16 at 12 40 19 PM

davidjoshuaford avatar Aug 16 '22 21:08 davidjoshuaford

repositioning it should be some pretty easy math to apply. making it all user selectable will be a bit tricky to figure out how the ui for how that should be configured.

Bonus points if the Emulator page does not need to be the foreground application.

I havent verified, but I suspect this wont be properly possible. In electron you can listen to key presses, but only presses and not separate down or up behaviour. So the global behaviour will be limiting. Conceptually I am also not a fan, as it will add a fair amount of complication to things to get those keypresses being listened to by the electron portion of companion and forwarded to the correct place to be handled. This will get much harder and messier to achieve in 3.0. Additionally, it will work only for desktop users of companion on the machine where companion is running. If you are viewing the emulator from another machine or running companion-pi it wouldnt work the same (or at all)

Julusian avatar Aug 17 '22 14:08 Julusian

Are there existing Companion modules that would listen for a clicker's "keystroke" on a computer and translate that to a button press within Companion?

davidjoshuaford avatar Oct 03 '22 14:10 davidjoshuaford

+1 for clicker press remapping options.

Maybe it becomes a module rather than a settings option. then in the module it listens to hardware input and mapping setting for input X = Button Press Page# and Button#?

Thanks.

shermanp avatar Oct 17 '22 18:10 shermanp

I have a similar need, different use case. I would like a Bluetooth foot pedal to press Companion buttons on a phone running the emulator. The useful/cost effective devices I can find are "page turners". They have options to send up/down, left/right, PgUp/PgDn, Sp/Enter, as the key pressed, none of which are in the mapping. So, the flexibility to choose any key for the mapping would be great.

pH7-JP1 avatar Mar 12 '24 18:03 pH7-JP1