Home > Enterprise >  Android Studio keyboard short cut to open Android Java Source code in new tab
Android Studio keyboard short cut to open Android Java Source code in new tab

Time:01-19

When developing code it can prove useful to view the Java source code - e.g. It is particularly useful for reviewing various defined values

I know Android Studio has a keyboard short cut to open the source code related to a highlighted item, but after losing my cheat sheet I can't find the short cut I was using

Can someone please remind me of the short cut?

Google documentation does not appear to list it

CodePudding user response:

In Android Studio, you can use the keyboard shortcut Ctrl Alt Left Click or Cmd Alt Left Click (MacOS) to open the Java source code of a class or method in a new tab. This shortcut works on both Windows and MacOS.

When you use this shortcut, the cursor will turn into a hand, and you can click on any class or method name to open its source code in a new tab. This is a very convenient way to navigate through the codebase, and it allows you to easily switch between different parts of the codebase without having to use the mouse.

You can also use the shortcut Ctrl B (Cmd B in MacOS) which will navigate to the definition of the selected class or method, also you can use Ctrl Alt B (Cmd Alt B in MacOS)to navigate to the implementation of the selected class or method.

Additionally, you can customize the shortcuts from the File menu, then Settings and then Keymap, there you can look for the action you want to execute and assign the desired shortcut.

  • Related