I have an Android phone (Cosmo Communicator) with a keyboard but without function keys. On Windows or Linux, ALT+F4 closes the application (well, window) that is focused.

Is there anything similar on Android (9.0 Pie)? I find it hard to believe this is impossible yet I was unable to google it out.

6 Answers 6


A spin on the Markus Lankeit's answer, tested on my Android TV.

  • Hold Alt key entire time
  • Press Tab key (app switcher will appear)
  • With arrow keys, select an app that is running
  • Press Del or Backspace to close the app
  • Repeat for other apps
  • You can press Esc to quit from the app switcher any time
  • Release Alt key

Overall, this task-killing keyboard procedure is essentially the same as on Windows 10, for example.


In Android 9:

  • To go home you can press the Windows key (if you have a keyboard for Windows) plus Enter

  • Press the Win key plus -. Android will show you all shortcuts.

  • Another way, if you already have plugged in your keyboard, go to "Settings" and search "Physical keyboard", there you will find configuration needed.

  • 1
    I do not have Windows key, unfortunately, and my keyboard is an integral part of the phone.
    – sup
    Jun 7, 2020 at 8:32

I'm on Android Pie as well, and under the keyboard settings (Language and Input), there is a physical keyboard section which lists out the shortcuts available (example). If your keyboard doesn't come with a function key, you may need to find a mobile equivalent to AHK that can bind a certain key input or combination to invoke the meta key input. Also note you may be able to send a keyinput event through ADB or your device's local shell terminal, which then might be made more accessible through various automation methods, some of which may have device-dependent factors.

Note: though it doesn't seem to appear on the list, I distinctly recall Alt+F4 working with a keyboard? Will verify on current device when I get the chance.

  • AHK is autohotkey, a software for windows:-). Seemns like I could use button remapper play.google.com/store/apps/… for that but I need to get root first, otherwise the action to kill current app is not available. (also not really sure if "kill current app" is what ALT+F4 does.)
    – sup
    Feb 28, 2020 at 13:30
  • Yes, that's the platform I'm most familiar with, nothing comes to mind specifically for Android but I would think it'd be strange if there wasn't an equivalent available out there somewhere. And I don't believe root is required, but this could be dependent on your make and model's limitations and quirks. I've seen some that work without root and some you can just grant a permission through ADB for it to work.
    – Arctiic
    Feb 28, 2020 at 22:16
  • Also, here's an explanation on the different terms.
    – Arctiic
    Feb 28, 2020 at 22:19

In my device (Redmi Note 5), we can force close the app by pressing the back button for about 3-5 seconds.

  • hm, does not work on my device. I am running Android 9 Pie, on Cosmo Communicator by Planet Computers. But it would not be practicle, I would like something instanteneous. Weird Android does not have that.
    – sup
    Feb 25, 2020 at 14:45
  • 1
    @sup LineageOS (a custom ROM for Android) has that feature built-in.
    – Izzy
    Feb 29, 2020 at 23:19
  • That does not exist from my device yet though :-( (If I understand it correctly, it needs to be adjusted for every device).
    – sup
    Mar 2, 2020 at 8:05

I got a video projector a few months back that is running Android as a base OS, to which I attached a cheap wireless generic Windows keyboard. Projector is running some older versions of Android. Here is what works for me:

Note: Hold down the Right-Alt key the entire time:

  • Tab to get a list of running apps.
  • Pick the app to close, then Down arrow, then Space to actually close it.
  • Repeat for other apps.
  • When done, release Right-Alt key

F3 also brings up the list of current apps, but it also seems to immediately context-switch to the selected app. The same happens when you Alt-Tab and don't hold down the Alt key.

  • I am sure it helps somebody, but my phone unfortunately does not have a right alt key and with the left one, this does not seem to work:-(. Thanks for the suggestion though!
    – sup
    Apr 20, 2020 at 7:48

TLDR: keymapper sequence enter image description here

Longer answer: A keymapper sequence to implement the answer given by Slider2k.

Keymapper is an app to remap your keys to perform another action, or sequence of actions. In this case I am remapping the double Volume Up press to kill the current app.

Disclaimer: I think keymapper is a great app, but it can be troublesome to get to work. Mostly to due to optimizations added by the manufactures into the firmware. Make sure to read the information given by the developer. Start by taking a look at Don't kill my app! to access how hard this maybe to get up and running in your device.

I my case my phone's manufacturer is not that bad, but I still got into trouble with the latest version of the app and had to stick to version 2.4.4.

You will probably want to start with a version from the Play Store of F-Droid.

In case you get the app to work here is the sequence I am using:

  1. Switch to the Key Mapper Basic Input Method, as otherwise the latter commands will not work.
  2. Open recents. This is equivalent to pressing Alt+Tab, with the advantage that you do not need to hold the Alt key.
  3. Then input the DPAD_LEFT key. This moves to the previous app.
  4. The input the DPAD_RIGHT key, to move back to the original app. I had to add this detour as the recents app ignored a direct delete key.
  5. Now input the DEL key to kill the app.
  6. The final call to recents selects the previous app. I prefer not to be left in the app selection.
  7. To finish-up I restore the keyboard to Gboard.

I chose to add 300 milisecond delays in between actions to make sure the sequence always worked. However I did not test smaller delays so it might be possible to reduce these timings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .