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

Let volume controls answer/act as tap #3021

Closed
hssm opened this issue Jul 28, 2015 · 18 comments
Closed

Let volume controls answer/act as tap #3021

hssm opened this issue Jul 28, 2015 · 18 comments

Comments

@hssm
Copy link
Member

@hssm hssm commented Jul 28, 2015

Originally reported on Google Code with ID 2124

It would be nice to have the option to answer a card.  via the volume control buttons.
For instance, down volume could be the default negative answer & up the default correct
answer. This would be especially useful for one-handed reviews.

Is this feature available on similar apps (Anki Desktop, AnkiMobile,
AnyMemo, etc) ? If yes, it could help to include a screenshot or link to a
page explaining the feature.

I'm unaware of it being implemented anywhere. 

Reported by sunshinekisses on 2014-05-26 13:31:30

@hssm
Copy link
Member Author

@hssm hssm commented Jul 28, 2015

An awesome example for usage would be studying a foreign language while jogging. Since
one can't really use the screen much, but can easily work the volume buttons on the
side of the phne with one hand, a deck containing recorded audio of both the native
and matching foreign phrases could be studied while running.

Reported by sunshinekisses on 2014-05-28 02:01:19

Loading

@hssm
Copy link
Member Author

@hssm hssm commented Jul 28, 2015

Should be possible to add it to the gestures:
http://stackoverflow.com/questions/2874743/android-volume-buttons-used-in-my-application

It would prevent the user from changing the volume though

Reported by perceptualchaos2 on 2014-06-02 05:11:51

Loading

@hssm
Copy link
Member Author

@hssm hssm commented Jul 28, 2015

Is there no Android official guideline advising developers to not re-use volume buttons
for something else?
I have a vague memory of seeing something like this, but I don't remember exactly whether
it was official or not.

Reported by nicolas.raoul on 2014-06-02 06:08:08

Loading

@hssm
Copy link
Member Author

@hssm hssm commented Jul 28, 2015

I got the idea from the Kindle app which allows page turning via the volume controls.
It works well plus I have a tactile issue which makes physical buttons easier to work
with.

Reported by sunshinekisses on 2014-06-02 09:39:35

Loading

@hssm
Copy link
Member Author

@hssm hssm commented Jul 28, 2015

I'd also like to add that it would be great if it worked with headphones, including
bluetooth ones.

Reported by glwisnia on 2014-11-15 12:22:29

Loading

@hssm
Copy link
Member Author

@hssm hssm commented Jul 28, 2015

Issue 2457 has been merged into this issue.

Reported by perceptualchaos2 on 2014-12-31 01:14:57

Loading

@lizzgilmore
Copy link

@lizzgilmore lizzgilmore commented Sep 12, 2015

I'd also be interested in this! Being able to use volume controls to rate cards "Again" or "Good" would be so convenient.

Loading

@lizzgilmore
Copy link

@lizzgilmore lizzgilmore commented Nov 28, 2015

Happy to report that I stumbled upon a $1.99 paid app that lets you map the volume control buttons to keys of your choosing! Best part, root access is not required.

It's called External Keyboard Helper Pro. There's a Demo version available as well for testing purposes - not sure what the Demo version's limitations are. Here are some basic instructions - Let me know if you run into trouble configuring this and I can try to help.

Install it and follow the instructions to enable it as a keyboard input device. Then, from within the app, go to Advanced Settings, Keyboard Mapping, Customize Keyboard Mappings. Hit the "Add new key mapping" button. With the cursor in the Scancode field, press the volume down button. It should populate that field with a string of numbers. Uncheck the Keycode box, if it's checked, and put the number 1 in all of the fields that follow. Hit Save.

Now let's test it out! Still in that app, press the three dots menu icon and tap Test Area. This is where it might get wonky. You have to have the External Keyboard Helper Pro keyboard set as your default input device. On 6.0 Marshmallow, there's a little keyboard switching icon as part of the control buttons at the bottom of the screen. Tap it and select the External Keyboard Helper Pro input device. If that icon is NOT there, you'll have to enable it from within the Settings menu. With it enabled, go to the Test Area and press volume down. It should print 1, which in Anki means Again.

Following these steps, I remapped volume up to Space, which shows answer and marks a question Good. My phone doesn't have any other hardware buttons, but on my corded earbuds, there's a third button, which I remapped to 3 for Easy (when the card is New or in Learning).

Loading

@jhegedus42
Copy link

@jhegedus42 jhegedus42 commented Feb 4, 2016

Cool, this earbud thing is really good idea. What earbuds did you use ? What kind of phone? I have Galaxy S4. @lizzgilmore

Loading

@lizzgilmore
Copy link

@lizzgilmore lizzgilmore commented Feb 4, 2016

My phone is the Nexus 6 and my earbuds are the cheapo Samsung OEM ones from Amazon (Samsung OEM Samsung 3.5mm Stereo Headset for Galaxy S5, S4, S3, Note - Non-Retail Packaging - White https://www.amazon.com/dp/B00K7JPHHA/ref=cm_sw_r_other_awd_yWZSwb43K17EP), but this method should work with any earbuds that have volume up/down buttons on the cord. If you have headphones or earbuds with three buttons (like rewind, fast forward, and play/pause), you can map one to Spacebar for Show Answer and Good, one to 1 for Again, and one to U for Undo. That's all I need in 90% of situations.

Loading

@andrewsanchez
Copy link

@andrewsanchez andrewsanchez commented Dec 29, 2016

This is great! I followed your instructions, @lizzgilmore, and everything worked on my Galaxy S8. However, mapping a key press to "U" did not work for me.

Mapping a key press to "z" worked to undo the previous review, and "r" works for replaying the audio. I was already amazed, but the ability to now undo a review and replay the audio is icing on the cake. This is magical! Also, the free dome version of External Keyboard Helper has worked just fine for me so far.

Loading

@lizzgilmore
Copy link

@lizzgilmore lizzgilmore commented Jan 1, 2017

@andrewsanchez So glad someone found my writeup helpful! Thanks for the correction for the undo shortcut, too. The free demo version might not have been working when I first tried this out...honestly can't remember, but regardless, happy it's working for you. Happy New Year.

Loading

@vackosar
Copy link

@vackosar vackosar commented Feb 24, 2017

@hssm I really like the headphones control, such that TTS feature would be finally leveredged!

Loading

@ehcatl
Copy link

@ehcatl ehcatl commented Mar 1, 2018

Thank you so much for the detailed instructions. I've added the "EKH Switch" as launching option for Ankidroid to tasker in order to automatically switch keyboards.
I love Anki and now using it easily on my phone.

Loading

@mattbenscho
Copy link

@mattbenscho mattbenscho commented May 27, 2018

Thanks a bunch @lizzgilmore for the writeup! I already bought the app before reading about your method and was very excited to try it out. Now reviewing on the go, especially on the train using headphones, is so much more convenient! I chose to map volume up to space, volume down to 1, and the center button on my headphone to 2 (equals "hard if hard is a choice, good otherwise"). Last time I was on the train I strapped the phone to the back of the seat in front of me and reviewing using the headphone buttons was so much nicer. Thanks again!

Loading

@anatoliiivashko
Copy link

@anatoliiivashko anatoliiivashko commented Nov 30, 2019

Happy to report that I stumbled upon a $1.99 paid app that lets you map the volume control buttons to keys of your choosing! Best part, root access is not required.

It's called External Keyboard Helper Pro. There's a Demo version available as well for testing purposes - not sure what the Demo version's limitations are. Here are some basic instructions - Let me know if you run into trouble configuring this and I can try to help.

Install it and follow the instructions to enable it as a keyboard input device. Then, from within the app, go to Advanced Settings, Keyboard Mapping, Customize Keyboard Mappings. Hit the "Add new key mapping" button. With the cursor in the Scancode field, press the volume down button. It should populate that field with a string of numbers. Uncheck the Keycode box, if it's checked, and put the number 1 in all of the fields that follow. Hit Save.

Now let's test it out! Still in that app, press the three dots menu icon and tap Test Area. This is where it might get wonky. You have to have the External Keyboard Helper Pro keyboard set as your default input device. On 6.0 Marshmallow, there's a little keyboard switching icon as part of the control buttons at the bottom of the screen. Tap it and select the External Keyboard Helper Pro input device. If that icon is NOT there, you'll have to enable it from within the Settings menu. With it enabled, go to the Test Area and press volume down. It should print 1, which in Anki means Again.

Following these steps, I remapped volume up to Space, which shows answer and marks a question Good. My phone doesn't have any other hardware buttons, but on my corded earbuds, there's a third button, which I remapped to 3 for Easy (when the card is New or in Learning).

Happy to report that I stumbled upon a $1.99 paid app that lets you map the volume control buttons to keys of your choosing! Best part, root access is not required.

It's called External Keyboard Helper Pro. There's a Demo version available as well for testing purposes - not sure what the Demo version's limitations are. Here are some basic instructions - Let me know if you run into trouble configuring this and I can try to help.

Install it and follow the instructions to enable it as a keyboard input device. Then, from within the app, go to Advanced Settings, Keyboard Mapping, Customize Keyboard Mappings. Hit the "Add new key mapping" button. With the cursor in the Scancode field, press the volume down button. It should populate that field with a string of numbers. Uncheck the Keycode box, if it's checked, and put the number 1 in all of the fields that follow. Hit Save.

Now let's test it out! Still in that app, press the three dots menu icon and tap Test Area. This is where it might get wonky. You have to have the External Keyboard Helper Pro keyboard set as your default input device. On 6.0 Marshmallow, there's a little keyboard switching icon as part of the control buttons at the bottom of the screen. Tap it and select the External Keyboard Helper Pro input device. If that icon is NOT there, you'll have to enable it from within the Settings menu. With it enabled, go to the Test Area and press volume down. It should print 1, which in Anki means Again.

Following these steps, I remapped volume up to Space, which shows answer and marks a question Good. My phone doesn't have any other hardware buttons, but on my corded earbuds, there's a third button, which I remapped to 3 for Easy (when the card is New or in Learning).

Happy to report that I stumbled upon a $1.99 paid app that lets you map the volume control buttons to keys of your choosing! Best part, root access is not required.

It's called External Keyboard Helper Pro. There's a Demo version available as well for testing purposes - not sure what the Demo version's limitations are. Here are some basic instructions - Let me know if you run into trouble configuring this and I can try to help.

Install it and follow the instructions to enable it as a keyboard input device. Then, from within the app, go to Advanced Settings, Keyboard Mapping, Customize Keyboard Mappings. Hit the "Add new key mapping" button. With the cursor in the Scancode field, press the volume down button. It should populate that field with a string of numbers. Uncheck the Keycode box, if it's checked, and put the number 1 in all of the fields that follow. Hit Save.

Now let's test it out! Still in that app, press the three dots menu icon and tap Test Area. This is where it might get wonky. You have to have the External Keyboard Helper Pro keyboard set as your default input device. On 6.0 Marshmallow, there's a little keyboard switching icon as part of the control buttons at the bottom of the screen. Tap it and select the External Keyboard Helper Pro input device. If that icon is NOT there, you'll have to enable it from within the Settings menu. With it enabled, go to the Test Area and press volume down. It should print 1, which in Anki means Again.

Following these steps, I remapped volume up to Space, which shows answer and marks a question Good. My phone doesn't have any other hardware buttons, but on my corded earbuds, there's a third button, which I remapped to 3 for Easy (when the card is New or in Learning).

Thank you!! Your idea is really helpful to me 😊

Loading

@aplaice
Copy link

@aplaice aplaice commented Dec 28, 2019

Thank you @lizzgilmore for the brilliant idea and the write-up!

For those who are uncomfortable using a non-FOSS app, I've recreated a similar workflow using the open source Key Mapper application, which is on F-Droid. (I remapped Volume Up to "Space" and Volume Down to "1".)

The main drawback is that due to the way the app is designed, you need to enable the app both as an accessibility service and as a keyboard, which is potentially far more intrusive from a privacy point of view, if you don't trust the app.

(Disclaimer: I have no affiliation with Key Mapper.)

Loading

@markhavemann
Copy link

@markhavemann markhavemann commented Jan 15, 2020

+1 for this feature. This would be so useful but I'm not particularly excited about having to use 3rd party apps and remap keys to do it.

Loading

@mikehardy mikehardy removed this from the 2.11 release milestone May 25, 2020
@mikehardy mikehardy added this to the 2.12 release milestone May 25, 2020
@mikehardy mikehardy removed this from the 2.12 release milestone Jun 19, 2020
@mikehardy mikehardy added this to the 2.13 release milestone Jun 19, 2020
@mikehardy mikehardy closed this in 321ccd2 Jun 25, 2020
@david-allison-1 david-allison-1 removed this from the 2.13 release milestone Jul 26, 2020
@david-allison-1 david-allison-1 added this to the 2.12 release milestone Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet