Skip to main content

Command Palette

Search for a command to run...

[Win] Map Functions Keys to Programs

Published
View as Markdown
A

9+ years in tech industry. I had the opportunity to work on a wide range of projects with companies both locally and remotely, including with software engineers from well-known tech firms such as Amazon, Atlassian, Google, and Microsoft.

I have a track record of taking ideas and turning them into successful software projects, and have made numerous contributions to open source.

I have experience working with a variety of languages and frameworks, and am highly adaptable and able to quickly learn and become proficient in new technologies.

https://github.com/AutoHotkey/AutoHotkey/releases

#SingleInstance Force  ; Ensures only one instance of the script is running

; Map F1 to toggle VS Code instances
; F1 alone: Toggle between VS Code windows
;F1:: {
;    if WinActive("ahk_exe Code.exe") {
;        GroupAdd("VSCodeWindows", "ahk_exe Code.exe")
;        if WinExist("ahk_exe Code.exe") {
;            GroupActivate("VSCodeWindows", "R")
;        }
;    } else if WinExist("ahk_exe Code.exe") {
;        WinActivate("ahk_exe Code.exe")
;    } else {
;        Run "C:\Users\user\AppData\Local\Programs\Microsoft VS Code\Code.exe"
;    }
;}

F1:: {
    if WinActive("ahk_exe firefox.exe") {
        GroupAdd("FirefoxWindows", "ahk_exe firefox.exe")
        if WinExist("ahk_exe firefox.exe") {
            GroupActivate("FirefoxWindows", "R")
        }
    } else if WinExist("ahk_exe firefox.exe") {
        WinActivate("ahk_exe firefox.exe")
    } else {
        Run "firefox.exe"
    }
}

F2:: {
    if WinActive("ahk_exe pycharm64.exe") {
        GroupAdd("PycharmWindows", "ahk_exe pycharm64.exe")
        if WinExist("ahk_exe pycharm64.exe") {
            GroupActivate("PycharmWindows", "R")
        }
    } else if WinExist("ahk_exe pycharm64.exe") {
        WinActivate("ahk_exe pycharm64.exe")
    } else {
        Run "C:\Users\user\AppData\Local\Programs\PyCharm Professional 2024.3.1.1\bin\pycharm64.exe"
    }
}

; Map F4 to Alt+F4 (close window)
F4:: {
    Send "!{F4}"
}

CapsLock:: {
    send "{Escape}"
}

; Map Escape to Alt+Tab
Escape:: {
    Send "!{Tab}"
}

; Shift+Escape for reverse Alt+Tab
+Escape:: {
    Send "+!{Tab}"
}