rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.24k stars 212 forks source link

Unable to Set Autocomplete on VSCode #783

Open pathsny opened 1 year ago

pathsny commented 1 year ago

Describe the bug The Mac shortcut to complete on VSCode is Ctrl+Space. Setting that on the AHK file with my mac keyboard opens the windows menu instead.

Expected behavior Should trigger autocomplete on vscode

Install Type: Bare Metal Distro: Windows, 1.2-13

Additional context The AHK file has the config

   ; Cmd+Space Alternative
    $^Space::
    MsgBox "this is ^Space"    
   Send ^{Esc}
   return

Under the vscode section, I've added the following entry

        $#Space::
        MsgBox "this is #space"
        Send ^{Space}           ; Code Suggestions
        return

However, I never see the msgbox stating that ^Space has been detected.

RedBearAK commented 1 year ago

@pathsny

Note: This VSCode shortcut (physical Ctrl+Space) is in conflict with a system-wide shortcut in macOS for input switching (cycling through active keyboard layouts). Unless you've disabled the system shortcut, that never should have worked in VSCode on a Mac. VSCode also has a lot of Alt and Shift-Alt shortcuts in the shortcut list that don't work on macOS, because of the way Apple assigns special characters to the entire keyboard when you hold Option or Shift-Option.

It shouldn't be the default for Kinto to enable this, but you should be able to make it work. When I get a chance I'll hook up an Apple USB keyboard to a Windows laptop and try to figure out the problem.

RedBearAK commented 1 year ago

There are existing lines that seem to deal with this, and I see a MsgBox when I add a line for that. So I'm not sure what the problem is.

    ; Sublime Text Remaps for VS Code
    #IfWinActive ahk_group vscode
[snip]
      #Space::Send ^{Space}                                ; Default - Basic code completion
;       !Space::Send ^{Space}                                ; CB/IBM - Basic code completion
    #If

But I also see the code completion suggestion box popping up all the time, even if I don't use that shortcut, so I'm probably not qualified to have more input on this until I have a better understanding of what should be happening when using that shortcut.

If I make the automatic suggestions widget go away with Escape and then hit Ctrl+Space, it brings back the widget. Is that all that's supposed to happen? If so, it's working for me with both the Windows and Apple keyboards. 🤷🏽‍♂️

AlecsFarias commented 9 months ago

Is there any update on that ? the waiting to vscode offers the autocomplete is massive

RedBearAK commented 9 months ago

@AlecsFarias

Can you do the following:

I'm not sure I understand what the problem is, which physical keys you want to press when Kinto is enabled, what shortcut combo needs to be sent to the application, and what is supposed to happen in VSCode(s) when sending that combo. Read my previous comment in this thread, where I could not identify a problem with this shortcut while using VSCode.

This line in the config is supposed to let you press physical Ctrl+Space and send logical Ctrl+Space to VSCode(s):

      #Space::Send ^{Space}                                ; Default - Basic code completion

The line uses the symbol for the "Win" key because prior to this line the Ctrl key gets remapped to be the Win key.

AlecsFarias commented 8 months ago

Hi Again! The actual shortcut is CTL+Space for autocomplete on vs code on linux (KDN neon) , the problem here is that when you use this shortcut this opens the Application Launcher, weird. I tried to remove and reinstall using the quick install terminal command on readme but still not working.

The solution: (Don´t know why it worked)

Saw the video on how to install on the youtube (https://www.youtube.com/watch?v=kd4al45XD1g) and it simples clone de git repo and run ./setup.py, it just works !

I think there is something different, maybe something related to code version, anyway, thanks for the help! @RedBearAK