31

I have checked Preferences->Editor->Code completion. Basic code completion is turned on. Shortcut is ^Space. When I click [control]+[space], it is opening spotlight search instead of code completion. How to solve this problem?

Joe Rakhimov
  • 4,713
  • 9
  • 51
  • 109

6 Answers6

35

You need to change the Mac OS X keyboard shortcuts (Preferences | Keyboard | Shortcuts | Spotlight) and either disable the "Show Spotlight search" shortcut or reassign it to a different key.

yole
  • 92,896
  • 20
  • 260
  • 197
29

As an alternative to yole's answer: Since I did not want to modify my system's shortcuts to have them the same across my Macs, I just edited the shortcut in Android Studio (Android Studio -> Preferences -> Keymap and change Basic Completion).

I've used Option+Space which is not assigned to any global shortcut.

P.S.: This is indeed a nuisance coming from years of Windows usage.

Lucas P.
  • 4,282
  • 4
  • 29
  • 50
  • 1
    After a year of using this, I can say I find it the same as using Ctrl+Space, and I've been using this on all of IntelliJ IDEs I use every day. I still suggest just editing the shortcut If you don't want to modify your default OSX shortcuts. – Lucas P. Jan 23 '19 at 14:34
6

I'm running Android Studio on Windows 10. File -> Settings -> Editor -> General -> Code Completion

The default hotkeys for Auto-Complete are:

1) Control + Space + Spacebar

2) Control+ Spacebar

enter image description here

Gene
  • 10,819
  • 1
  • 66
  • 58
1

On MacOS Ventura (13.0), Ctrl-Space is assigned to switching input sources.

This needs to be disabled or changed to some other keys in System Settings... Keyboard > Keyboard Shortcuts > Input Sources if you want to keep using the same short cut in Visual Studio.

Ber
  • 40,356
  • 16
  • 72
  • 88
0

Click on Alt+Enter to make Auto Complete

Muhammad Ashraf
  • 3,323
  • 2
  • 12
  • 19
-1

The shortcut is different now but is still working, you just need to click

ctrl + space

. The ^ you see listed in your preferences is the symbol for ctrl on a mac.

codingjeremy
  • 5,215
  • 1
  • 36
  • 39