Android Studio Keyboard Shortcut Control

Android Studio Keyboard shortcut control

Move to File -> Settings -> Keymap and change Keymaps settings to eclipse so that you can use the short cut keys like in eclipse.

Sample Image

Android Studio 4.2 - Keyboard Shortcut Problem

Android Studio - Preferences - Keymap - Keymap List - MacOs selected and fixed.
Intellij idea classic did not work when selected.

Android Studio shortcuts like Eclipse

Yes, the list of keyboard shortcuts for Android Studio is at https://developer.android.com/studio/intro/keyboard-shortcuts.html.

Here are a few that I know.

Check :File ->Settings ->Keymap ->
<Choose Eclipse from Keymaps dropdown> or

Add unimplemented methods: CTRL + I

Override methods: CTRL + O

Format code: CTRL + ALT + L

Show project: ALT + 1

Show logcat: ALT + 6

Hide project - logcat: SHIFT + ESC

Build: CTRL + F9

Build and Run: CTRL + F10

Expand all: CTRL + SHIFT + NumPad +

Collapse all: CTRL + SHIFT + NumPad -

Find and replace: CTRL + R

Find: CTRL + F

In case I'm missing any shortcut that you need you can ask here and for more check implink!! or link!!:)

Project structure shortcut key not working in Android Studio?

The Docs says, it'll open up the project structure dialog by pressing shortcut CtrlAltShiftS as given in here. But still, if you can't open that project structure window by shortcut, there should be an issue with your keybindings. Go to Preferences > Keymap and check for it or press Ctrl+Shift+A and start typing the name of a command and it will show you all matching commands and their key bindings if they have one. That's really convenient for looking up the key shortcut for something if you have a hint of what it's called.

In most dialogs/windows there's a search box, and you can usually just start typing to start a search. It's especially good for preferences, where there are so many options that are hard to find.

As a quick fix, you can modify the key-binding for the project structure dialog as given in the screenshot.

MacOS Android Studio Key-Binding

Shortcuts not working after updating to Android studio 4, in Mac?

To fix :
in Android studio, from top menu tap on Android studio then Preferences... and type keymap then in the drop-down on the right screen select Mac and apply.

all sorted now, all the shortcuts are aligned with the Mac keyboard.
Sample Image

Ctrl + N shortcut - Android Studio

That documentation and given short cut might be old, not sure though! but as per the key reference given, Ctrl+N is used for navigating to the particular class.

Sample Image

For getting NEW files menu, press Alt + Insert.

Code formatting shortcuts in Android Studio for Operation Systems

Windows: Ctrl + Alt + L

Linux: Ctrl + Shift + Alt + L

macOS: Option + Command + L

Reference: Key Commands and here are all of the commands for Windows/ Linux users and for Mac users.


As Rohit faced a problem in Ubuntu with the format code shortcut, this is due to the Ctrl + Alt + L key being used to lock the screen in Ubuntu.

I found that Ubuntu handles this keyboard shortcut first. So you should bind the Ctrl + Alt + L keyboard shortcut to something else so that it doesn't conflict with Ubuntu.

Steps

  1. Go to System ToolsSystem SettingsKeyboardShortcuts tab → SystemLock Screen.

  2. Select the row New Accelerator..., then press any special key with the Alpha key (e.g. Shift + L). You should've successfully changed the keyboard shortcut.

  3. Check if the keyboard shortcut now works in Android Studio.

Alternative method

Ctrl + Alt + Shift + L (to show a dialog)


You can also use Eclipse shortcuts.

  • Windows and Linux: Go to menu FileSettingsKeymap
  • macOS: Go to menu PreferencesKeymap and choose Eclipse from the drop-down menu.

Using MenuBar

  • Select code which you want to reformat

  • Click on Code in the menu bar and select Reformat Code as shown in the image below:

    Sample Image

In Android studio 3.5, there is problem with rearranging the xml code, it also rearrange the views as well, so need to use these settings first.

Settings -> Editor -> Code Style -> XML-> Set From -> Predefined Style > Android.

Update for Android Studio 4+

Since Android Studio 4+, you might face issue shortcuts on mac. Shortcuts not working after updating to Android studio 4, in Mac? have an answer for that.

Disable shortcut in Android Studio

Go to File -> Settings -> Keymap search for Clear Context and remove or replace the shortcut

clear context image



Related Topics



Leave a reply



Submit