Android Studio basic auto completion shortcut not working - macos

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?

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.

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.

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

Click on Alt+Enter to make Auto Complete

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.

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.

Related

Visual Studio Code shortcut to display autocomplete list before typing on macOS

I am trying to display all possible words after putting the cursor in certain place in the code.
The autocomplete list appears when I start writing/typing:
However, I would like to see all suggested words even before typing.
I tried command + space, however it was a system shortcut for Search in macOS:
Any thoughts?
In case you are a CJK user using Mac, Ctrl+Space will not work, since it is used to switch IMEs.
There is another keyboard shortcut for triggering suggestions:
Option+Esc (Mac)
Alt+Esc (Windows)
Also see this post.
VS code version: 1.41.1
I solved this problem using fn+control+space.
Hope it helps you.
"change input source" keyboard shortcut should be disabled
To disable it->
Go to system preferences -> keyboard -> input sources
add a new input source (choose ABC)
Go to shortcuts tab (inside of keyboard settings)
Click on input sources on the left
disable the "select previous input source" shortcut
restart your vs code and now ctrl+space will show quick suggestions.
You can use the following alternative keyboard shortcuts:
⌘+I (mentioned in the official VS Code documentation for "Trigger suggestion")
⌥+esc
fn+control+space
The shortcut for the "Trigger Suggest" command is ⌃Space (ctrl+space) — as mentioned in the comments.
Most default shortcuts can be found in the documentation, which will automatically show the correct keybindings for the system you're on. In other words, if you visit the page on a Mac, you'll see Mac keybindings.
Additionally, you can:
go to Code > Preferences > Keyboard Shortcuts (on a Mac) and search for keybindings based on the command you want to execute
open up "show all commands" (⇧⌘P on a Mac) and search for the command there, allowing you to either view the keybinding for that command, or simply navigate to it directly from the search
Of course you'd have to have some idea of what the command's name might be. And in this case, a search for "suggest" would suffice.
If you use too many keyboard layouts, maybe the MacOS shortcut might be active. You can disabled ^(Ctrl)+Space shortcuts for MacOS.
System Preferences>Keyboard>Shorcuts>Input Sources> Disable Select the previous input source.
You can use next shortcut for change input sources.Ctrl+Alt+Space
when I was set up 2 keyboards with different layouts, and it turn out it overrides the ^+Space behavior, so this is how fix it:
Go to system preferences -> Keyboard -> Keyboard shortcuts
Click on input sources
and disable the "select previous input source" shortcut

ctrl+shift+space Not Working in Visual Studio

Starting about a week ago (11/30/2017) I noticed that ctrl+shift+space was no longer working in visual studio (any version) to show the parameter info of a method invocation. I did quite a bit of searching to figure out the problem, especially here on SO, and I couldn't find a solution. I also double-checked my VS settings and even reverted back to an old settings file.
I methodically started closing applications to see if another application was stealing the input. My hunch was right and it turned out to be the Microsoft Teams desktop application. It turns out that Teams already has a similar bug open about shortcut keys related to the Polish language not working correctly when Teams is running. Those details are here: https://microsoftteams.uservoice.com/forums/555103-public/suggestions/32265802-alt-a-and-alt-s-affecting-polish-character-for-%C4%85
Within the above link there is a link to a beta build that fixes the problem for Polish, and it turns out that it fixes the problem for the ctrl+shift+space shortcut too.
Nothing worked for me. I use also Resharper. So I had to reset my VS key bindings and reapply Resharper shortcuts. Only this got me it working. If you do not use resharper then it's enough to only do the first step and reset VS keyboard configuration to default
Reset current keyboard configuration (Tools | Options | Environment | Keyboard | Reset).
Go to ReSharper | Options | Environment | Keyboard & Menus | "Visual Studio" | Apply Scheme.
Had the same issue. I used to press Ctrl + Shift + Space to see the method parameters info and I was stuck when it stopped working. But I figured out that default Visual Studio shortcut settings changed, and now it corresponds to the Ctril + K,P shortcut. You can see it under Edit -> IntelliSens menu. And it is easily changeable to Ctrl + Shift + Space under Tool -> Options , then Environment/Keyboard section.
For me, it was Microsoft Teams that was absorbing the Ctrl + Shift + Space shortcut. I've searched the keybinding definitions in Visual Studio 2022 Tools > Options menu, section Environment > Keyboard and unfortunately I did not find any other alternative for the Edit.ParameterInfo command:
I know I could add a custom shortcut of my preference, but I do not want to have a shortcut which is not universal; when I change computer and I go to a different machine, the same shortcut will not be there.
Then, I decided to go by a more universal thing: The menu shortcut for this option (Press Alt key to see the respective letters underlined). It is located at menu Edit > IntelliSense > Parameter Info, which results in the Alt + E + I + P keyboard shortcut.

In Mac how to switch between the projects' window in AndroidStudio?

My OS is Mac.
I have opened several projects in AndroidStudio, sometimes I wanted to switch between the projects to choose a project. Is there any keyboard shortcuts to do it just like "command/ctrl + tab" ?
Use Cmd + ` (Cmd + Backtick). It switches between all the projects that are open on Android Studio.
In Android studio command to switch between diffrent project windows (i.e. windows those are not minimised) is as following :
⌘` -> (i.e command + backtick) -> for next project window
⇧⌘`-> (i.e shift + command + backtick) for previous project window
You can add your preferable shortcuts in Android studio -> Preference -> Keymap
Sometimes it doesn't work because of conflicts with other shortcuts.
Go to the menu "Android Studio" -> "Preferences", choose "Keymap".
And, use the search field for quick access.
For example, I made Ctrl+Shift+` shortcut, which is easy to use with one hand.
I'm not familiar with the Mac version of Android Studio, but the standard key combo for switching between windows within an app on the Mac is cmd-` (cmd-backtick) unless the app maps that to something else.
For AS 3.5.3 and after, open Window menu and look for Next Project Window or Previous Project Window options. They have the shortcut combinations next to them.
Precisely:
Next Project ⌥ ⌘ `
Previous Project ⌥⇧ ⌘ `
On a MacBook Pro keyboard getting the backtick requires pressing Shift so stock shortcut doesn't work (Studio 3).
But you can remap it to use the 'tick' instead : ´
So it becomes ⌘ + ´ for next project
and ⌘ + shift + ´ for previous project (equivalent of ⌘ + `)
That is probably what the designer had in mind.
A forward tilted tick to indicate a forward navigation and the
backtick symbolizing "backwards".
See Android Studio -> Preferences -> Keymap -> Main Menu -> Window
⌘` is the default shortcut. But since I have Android Studio 3 installed it doesn't work anymore. I solved this by replacing it through ⌘^ which is the same key combination.
When I update android studio to version 4.2.1, I also can't switch project. When I swith to official keymap like "Eclipse (macOS)", I search "cmd+ Backtick". I find the name is "Active Next Window". So I switch to my keymap and search "Active Next Window" as the second screenshot. Then I set it to "cmd+ Backtick".
Backtick is the "'" key on keyboard.
Windows - Command + ` (Backtick)
Mac - Option + Command + ` (Backtick)
Command ⌘ + Backtick `
It's Worked for me.
To switch between projects:
command+option+`

Android Studio - OS X : 'Dvorak - Qwerty ⌘' layout shortcuts switching doesn't work in Android Studio

'Dvorak - Qwerty ⌘' layout, which map my key back to qwerty if i press ⌘ simply works well in most app but not Android Studio with Keymap Mac OS X 10.5+. Anyone have a workaround? Or I should just change my layout on my Mac back to just 'Dvorak' ?.
In case anyone is looking for this - in my current version of Android Studio (v2.3.3), you can go into Android Studio > Preferences and select the Keymap option in the Preferences Pane.
From there, you can re-assign your shortcuts. I did the big ones: Find, Copy, Paste... When you reassign them, it will show Dvorak keys for the shortcuts - my shortcut for Find (Cmd + F) shows up as CMD + U.
Also, be sure to choose the Remove option, to remove any previously existing actions that might be paired with your new key combos.
And don't forget to hit Apply and not just OK !

Navigate To (CTRL + comma) in Visual Studio does not work

The "Navigate To" function (CTRL + comma) does not work on my solution. It gets stuck on "Found 0 matching results" while the little progress bar stays there but is empty.
I searched for some kind of IntelliSense cache file next to the .sln, but all I found was a .suo file which I deleted but it did not help.
Why is it not working?
I had the same problem. I went to Tools > Options... > Environment > Keyboard and clicked Reset. Yes, it will reset any customizations you had, but I figured that was the problem for me (I had an add-in take over Ctrl-, and even when I disabled the add-in it wasn't working). Resetting the keyboard shortcut customizations did the trick.
The command is not "Navigate-To" but actually Edit-GotoAll and it has the keyboard shortcuts of Ctrl-T and the more known one of Ctrl-, (comma).
Reference Default keyboard shortcuts in Visual Studio
💡 Solution 💡
Here are the steps to resolve
Verify it is working by trying the opposite keyboard shortcut. If both shortcuts do not work type in "Edit Goto All" in the command search/execute box of Visual Studio.
Does the command work? If it does not work then do a reset via Visual Studio Options:
Then verify or add the keyboard command to the command in the mapping after the reset.
Type in "Edit.Goto" in the Window commands containing
Then selected Edit.Goto.All:
If you do not see the mapping (#3)
Add the keystroke in the box where bubble 4 is above and click Assign.
Set OK as shown on bubble step 5.
This is for Chinese user only. This is because of the Sogou Pinyin (搜狗输入法)occupy this shortcut system wide. And it won't release if you just uninstall it.
Go to here to disable it: Language->Advanced settings->Change language bar hot keys
Uninstall it is not working, you need disable that setting then uninstall it.
The Navigate To Feature does not use an on disk cache so that shouldn't be the issue.
The only thing I can think of that would cause this behavior is a bad Visual Studio install. I hate making this suggestion but have you tried repairing the install?
Tools > Options... > Environment > Keyboard and clicked Reset.That will work.If you installed the latest version/framework or re-sharper of visual studio then it may happens...
I just got the same problem and solve it by following the instruction I found here: http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/2bbab30e-3188-406b-b492-eabf8c2fbc0b/
For Chinese users, if you are using Sogou Pinyin, you can turn off Ctrl + Comma thru this.
Use spyxx_amd64.exe in this answer should work for most cases. https://stackoverflow.com/a/43645062/1179950
However, this didn't work for me... For my case, which is caused by language keyboard hotkey setting in Windows. By Sougou Pinyin though I have uninstalled it..
You can unset this in Control Panal (Windows 10):
Region&Language -> Advanced keyboard settings -> Language bar options ->Advanced Key settings panel
Unset all hotkeys you wont use!
For traditional Chinese users, you muse use the old version of new Cangjie.
Ctrl+Comma

Resources