Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Android 17 QPR1 Beta 6 Linux Terminal Keyboard Shortcuts Remapping

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can remap keyboard shortcuts for the Linux terminal on Android 17 QPR1 Beta 6, but only for shortcuts that the terminal app itself defines. The system-wide keyboard shortcut remapping is not available for the terminal; you must edit the terminal app's own configuration files. This guide shows you how to do it using the built-in Termux app (the most common terminal for Android) or the Android Debug Bridge (ADB) shell if you prefer a different terminal.

What You'll Need

  • An Android device running Android 17 QPR1 Beta 6 (the steps are the same for any Android version, but the beta is the target).
  • Termux installed from the Google Play Store or F-Droid (official sources only).
  • Optional: A physical keyboard connected via Bluetooth or USB.
  • Optional: ADB (Android Debug Bridge) installed on a computer if you want to use a different terminal app.

Step-by-Step

  1. Open Termux. If you haven't installed it, get it from the Play Store or F-Droid. Do not use unofficial APKs.
  2. Check the current shortcut configuration. Termux stores its keyboard shortcuts in a file named termux.properties in the ~/.termux/ directory. To see the current settings, run: cat ~/.termux/termux.properties. If the file doesn't exist, the default shortcuts are in effect.
  3. Edit the properties file. Run nano ~/.termux/termux.properties (or use vim if you prefer). This opens the file in a text editor.
  4. Understand the shortcut syntax. Each line maps a key combination to an action. The format is shortcut-key = action. For example, ctrl+alt+c = copy maps Ctrl+Alt+C to the copy action. The default shortcuts are listed in the Termux wiki (search for “Termux shortcuts”). Common actions include copy, paste, open-url, reset, font-size, and back.
  5. Add or modify a shortcut. For instance, to make Ctrl+Shift+V paste, add the line: ctrl+shift+v = paste. To change an existing shortcut, edit the line or add a new one that overrides it (the last matching line wins).
  6. Save and exit. In nano, press Ctrl+X, then Y, then Enter.
  7. Reload the configuration. Run termux-reload-settings in the terminal. This applies the changes immediately without restarting Termux.
  8. Test the shortcut. Press the key combination you defined. It should perform the action you mapped.

If you are using a different terminal app (e.g., a custom one from the Play Store): The steps are similar but the configuration file location and syntax differ. Most terminal apps have a settings menu where you can change key mappings. If the app doesn't expose that, you cannot remap shortcuts without modifying the app's source code, which is not practical. In that case, stick to Termux, which is the most flexible.

Common Mistakes

  • Using the wrong modifier key. On Android, the physical keyboard may have a Cmd (⌘) key that acts as the Ctrl key in some layouts. Check what your keyboard sends by running cat in the terminal and pressing the key – you'll see the escape sequence. Use that in the shortcut definition.
  • Forgetting the equals sign and spaces. The line must be exactly shortcut = action with spaces around the equals sign. If you omit spaces, it may not parse.
  • Not reloading settings. Changes won't take effect until you run termux-reload-settings or restart Termux.
  • Overriding a system shortcut. Some key combinations are captured by Android itself (e.g., Ctrl+Alt+Del). You cannot remap those; the system will intercept them.

Tips

  • Use the volumedown and volumeup keys as modifiers in Termux – they are useful on phones without a physical keyboard. For example, volumeup+1 = ctrl+1 sends Ctrl+1.
  • To see all available actions, run termux-info and look for the “Shortcut actions” section, or check the official Termux wiki.
  • Back up your termux.properties file before making changes: cp ~/.termux/termux.properties ~/.termux/termux.properties.bak.
  • If you use ADB, you can also set the terminal app's key mappings via the input keyevent command, but that's for sending keys, not for remapping.

Troubleshooting

Shortcut does nothing. First, run termux-reload-settings again. Then, check the syntax of your line – a common issue is using a modifier name that Termux doesn't recognize (like alt instead of alt – actually alt is correct, but option is not). Also, make sure the action name is exactly one of the supported actions (e.g., copy, not copy-text).

Shortcut conflicts with another app. If the key combination is used by the Android system or a foreground app (like a launcher gesture), it will not reach Termux. Try a different combination, such as Ctrl+Alt+Shift.

Changes revert after restart. Ensure you are editing the correct file: ~/.termux/termux.properties. If you are using a shared storage location (like /sdcard), the file may be overwritten. Keep it in the home directory.

Termux crashes after editing. This is rare, but if it happens, restore the backup: cp ~/.termux/termux.properties.bak ~/.termux/termux.properties and reload.

Frequently Asked Questions

Can I remap system-wide shortcuts like Ctrl+C to copy in all apps?

No. Android does not provide a system-wide keyboard shortcut remapping feature. Each app must implement its own shortcuts. Termux does, but most other apps do not.

Does this work on Android 17 QPR1 Beta 6 specifically?

Yes, the steps are the same as on any Android version. The beta does not change how Termux handles keyboard shortcuts.

What if I don't have a physical keyboard?

You can still use Termux's on-screen shortcuts by long-pressing the volume down key or using the volumeup modifier in the properties file.

Can I remap the Ctrl key to something else, like the Alt key?

No, the modifier keys are fixed by the keyboard hardware. You can only change which combinations trigger actions, not what the keys themselves send.

Is there a way to remap shortcuts in the ADB shell?

If you are using a terminal app that runs inside ADB (like a remote shell), the shortcuts are handled by the remote system, not Android. You would need to remap them on that remote system (e.g., in a Linux SSH session).

Why doesn't Ctrl+Shift+C work as copy?

By default, Termux uses Ctrl+Alt+C for copy. You can add a line ctrl+shift+c = copy to make it work, but be aware that some terminals use Ctrl+Shift+C for copy, so it's a matter of preference.