ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.68k stars 2.24k forks source link

Gamepad controls\key maps - option for simultanious presses, long presses, double taps. #12425

Open jjijen opened 2 years ago

jjijen commented 2 years ago

I'm having a problem setting up a minimalistic mapping for anki using only the headphone buttons - vol up , down, and headphone key. using double taps, long holds, or simultanious inputs , I can execute all the actions I need with only 3 buttons.
for me it is crucial if i want to do listening card on walks, and also intuitively have all the keyboard shortcuts for flags, sync etc - using a comfortable maping.

The feature that would make mapping more individual - option for simulatanous inputs (A+B pressed together) , double taps (Pressing A, A. selecting the interval they need to be pressed apart for a new action to be assigned), long holds ( Press A for 2 seconds and it'll be assigned as a different input the can have its own action). a combo or long presses, and simultanious presses (press A+B for 2 secs for a unique action).

I have tried a different keymapping app that has those options "keymapper" on the playstore. I need to switch keyboards from the settings menu to use it so it's not convenient, and scrolling the view of a card using the joystick messes up with the input , since anki will target the answerbuttons after I scroll down, and then pressing my inputs does something else..

BrayanDSO commented 2 years ago

I like the Long press and Double tap ideas, and I believe that it is possible to do it.

david-allison commented 2 years ago

Sounds good to me, thanks for the writeup!

github-actions[bot] commented 1 year ago

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] commented 1 year ago

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] commented 1 year ago

Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

BrayanDSO commented 2 months ago

Long presses won't be possible due to how WebViews processes long touches.

Double taps are simple to do

david-allison commented 2 months ago

Long presses won't be possible due to how WebViews processes long touches.

Is this true even if we consider passively listening to the events in Kotlin? I believe we get onKeyDown/onKeyUp the same as with any View

BrayanDSO commented 2 months ago

Is this true even if we consider passively listening to the events in Kotlin? I believe we get onKeyDown/onKeyUp the same as with any View

The user may be doing that for selecting text, or interacting with a HTML element, and it isn't possible to know that in Kotlin