How to add shortcuts to the power button on Android
KeySnap can give the power button shortcuts in two ways. Holding it can run a shortcut through the Assistant gesture. With Advanced Mode, KeySnap reads each press of the power button, so single, double and long presses can run shortcuts too. No root is needed.
Every press, with Advanced Mode
Android does not pass the power button to apps, so KeySnap reads it through Advanced Mode.
- Install KeySnap and finish the setup on HomeOpen KeySnap and follow the setup steps on Home. They start with turning on the Accessibility service, which is how Android lets an app notice a hardware key.

Setup step 1: the Accessibility service. - Turn on Advanced ModeIn KeySnap, tap the gear at the top right, open Setup tools and turn on Read all hardware keys. The Turn on Advanced Mode wizard pairs with your phone’s own Wireless Debugging. It needs Wi-Fi and Developer options, and does not need root.

Advanced Mode running after setup. - Record the power buttonTap + at the bottom of the screen. Next to Press, tap a key, then Record a key, and press the power button. Its name replaces a key.

Listening for a key. Saved keys appear below. - Pick a press patternTap Single press to switch to Double press or Long press.

Tap the press pattern to change it. - Choose what it does and saveUnder Do, tap Add action, search or pick a category, and tap + next to an action such as Toggle flashlight. Tap Save shortcut, then press the power button to try it.

A finished shortcut, ready to save.
Hold the button, with the Assistant gesture
On many phones, holding the power button opens the digital assistant. When KeySnap is the digital assistant app, that gesture runs a KeySnap shortcut instead. This works without Advanced Mode.
- Start a shortcut on the Assistant gestureTap + at the bottom of the screen. Next to Press, tap a key, then choose Assistant gesture.
- Make KeySnap your digital assistantThe editor shows Make KeySnap your digital assistant. Tap it to open your phone’s assistant settings and choose KeySnap.
- Add an action and saveUnder Do, tap Add action, pick one and tap Save shortcut. Then hold the power button, or use your phone’s other assistant gesture, to run it.
Which gestures open the assistant depends on your phone. To still reach your usual assistant, add the Launch voice assistant action to a shortcut on another key.
Shortcut ideas for the power button
- Double press: flashlight
- Long press: open the camera or a note app
- Hold (Assistant gesture): switch to vibrate
Good to know
- Advanced Mode needs Wi-Fi and Developer options for setup. After you restart the phone, open KeySnap again to bring it back.
- Advanced Mode also reads the assistant button and many manufacturer keys. See the special-key guides.
- The volume buttons work without Advanced Mode. See how to remap the volume buttons.
Give the power button more to do.
KeySnap is free to install from Google Play. It offers in-app purchases.
KeySnap is an independent app by Arda Şen. It is not affiliated with Google or any phone manufacturer.