KeyMapper icon indicating copy to clipboard operation
KeyMapper copied to clipboard

Feature request: Adding support for accessibility navigation gestures

Open Piciok opened this issue 5 years ago • 8 comments

The app looks really promising and has a great potential for what I would like to achieve and this could potentially open a world of possibilities if one thing was implemented.

I suggested this in the XDA thread but would like to propose it here also for the record. Blind people handle touch-based Android devices using a dedicated set of gestures offered by the built-in Talkback screenreader. Those gestures include:

  • touching: once touched, an item is just focused and not activated and its name and role are spoken by the currently set TTS (not applicable);
  • navigating through the items present on the screen in a linear fashion (flicking left moves the focus to the previous item, to the right next);
  • double-tapping activates the item as if it was touched;
  • double-tapping and holding equals a long tap used to call the context menu of a given item or marking it for selection;
  • up and down gestures perform different actions depending on the configuration, by default they cycle between different kinds of granularity so to spell the highlighted item by characters, words, paragraphs etc. (this might be Talkback-specific and thus hard to implement);
  • There are certain other gestures that allow for opening context menu of the screenreader to handle some of its features such as switching the TTS language or turning on the screen curtain but again, those are Talkback-specific so might be hard unless it is possible to programmatically draw a specific gesture.

Would it be possible to integrate these accessibility gestures as found in the Talkback source code as possible actions to be assigned to keys in Keymapper? This way it would be easier for blind people to handle all sorts of devices that rely on traditional keypad navigation (Android TV boxes, Hi-Fi systems, the few landline phones or flip phones with traditional keyboards).

One way of doing this I thought would be to assign Keymapper key events to perform keyboard shortcuts that are assigned in Talkback's settings by emulating a PC keyboard but this leaves out the possibility to use an alternative input method (see my second ticket) so I thought native support for these gestures could make it easier to achieve what is needed.

Thanks.

Piciok avatar Dec 17 '19 14:12 Piciok

Yeah, that should be possible.

sds100 avatar Dec 18 '19 13:12 sds100

https://github.com/google/talkback Talkback source code.

sds100 avatar Jul 09 '20 15:07 sds100

I don't think it is possible to send key events so Talkback can detect them. I'll see if there is an API or some way to interact with Talkback.

sds100 avatar Jul 09 '20 21:07 sds100

@Piciok I will add an action for each of the gestures Talkback can detect and I will test they all work. I think I can get this done pretty quickly. I will also create a way to dispatch a custom gesture but that will take more work so I will do it further down the line.

sds100 avatar Jul 09 '20 22:07 sds100

Were you able to find an API or a workaround for TalkBack keyboard shortcuts? Before finding this issue I (unsuccessfully) tried pairing Key Mapper's key event action with both types of TalkBack keyboard shortcuts ("default keymap" which requires a modifier key such as ALT or Search and "classic keymap" which doesn't require a modifier key, but has less than half of the actions vailable with the default keymap

sudomain avatar Jan 11 '21 07:01 sudomain

I haven't found a way yet. Is there someone you know, who is blind, that would benefit from having these accessibility features in Key Mapper? If so I can increase the priority of this feature.

sds100 avatar Jan 11 '21 10:01 sds100

Is there someone you know, who is blind, that would benefit from having these accessibility features in Key Mapper?

I don't know such a person. I've been playing with TalkBack recently and was hoping to pair it with KeyMapper, with omly a vague goal in mind. I just wasn't sure if I was doing something wrong with the Key event action. Thanks for the reply

sudomain avatar Jan 11 '21 14:01 sudomain

Reproducing talkback gestures would enable to create personalized chains of actions. For example create a set of actions:

  • Expand notifications
  • Swipe predefined number of times to find a wifi icon
  • Double tap to toggle

pvagner avatar Jan 30 '22 18:01 pvagner