https://support.google.com/accessibility/android/answer/6122836?hl=enAbout switch access for Android
This information applies only to devices running Android 5.0 and higher.
Switch access lets you interact with your Android device using one or more switches. Switch access can be helpful for users with mobility limitations that prevent them from interacting directly with the Android device.
With switch access, you can scan to the item on the screen that you want to click. The Android device scans all the clickable items on the screen, highlighting each item in turn, until you select the desired item. You can also customize switch access by assigning each switch to a particular function. For example, a switch can be assigned to activate the "Home" button.
To use switch access, you'll first need one or more switches. There are several options:
Use an external switch: A switch is a device that sends a keystroke signal to your Android device. Several companies sell these devices, such as Ablenet, Enabling Devices, RJ Cooper, and Tecla. These devices connect to your Android device via USB or Bluetooth. (Google does not endorse these companies or their products.)
Use an external keyboard: You can configure a standard USB or Bluetooth keyboard to work as a switch device by assigning one or more of its keys to actions.
Use buttons on your Android device: Built-in buttons on your Android device, such as the volume up and volume down buttons, can also be assigned to actions. This option is intended for developers. If you're using this option, you can skip the first two setup steps in the next article.