fluid-lab / gamepad-navigator

GSoC 2020 project
Other
6 stars 10 forks source link

Add ability to launch the send key action with custom parameters #159

Open duhrer opened 5 months ago

duhrer commented 5 months ago

The current action launcher is an arrow navigable list of actions, which does not provide the ability to configure the action options.

This is specifically why we don't allow the sendKey action to be used with the launcher. In working with sites like Vimeo that expect you to use the enter key to activate some controls, it would be useful to be able to send any supported key using the action launcher.

In the settings page, each binding shows the action and its configurable options, but the configurable options are hidden by default. We could follow a similar approach for the action launcher, although it would make navigation a bit more complicated.

We already have a giant matrix of grades that bring in the full range of configurable options. Unfortunately, we can't really reuse those as they also use the repeat rate parameter, which is not appropriate for the action launcher.

Even if we manage to come up with a list of grades for each action, we'd still have to figure out how the user navigates between actions and how they also can reach the gear icon or other toggle that controls the parameters. One approach might be to have up/down arrows work for moving between entries, and to reserve left/right arrows for moving between the gear icon and the listing itself. Another might be to have the down arrow go down, right, down, right, as would happen if we were using tab navigation. I don't love either of these, as they take a fairly simple pattern and make it harder to support.

A cleaner option might be to create a wrapper action for each supported key, and not allow users to pick "send key" directly.

duhrer commented 5 months ago

We could also add a "send a key" action that opens a modal with a list of keys, although in this case that would mean presenting one modal after another.