Skip to content

Instantly share code, notes, and snippets.

@chrisdhanaraj
Last active September 16, 2022 00:02
Show Gist options
  • Save chrisdhanaraj/f6d1ff1e27e733bdd43257506688ccfc to your computer and use it in GitHub Desktop.
Save chrisdhanaraj/f6d1ff1e27e733bdd43257506688ccfc to your computer and use it in GitHub Desktop.

Revisions

  1. chrisdhanaraj revised this gist Jul 9, 2017. 1 changed file with 2 additions and 5 deletions.
    7 changes: 2 additions & 5 deletions osx.ahk
    Original file line number Diff line number Diff line change
    @@ -3,15 +3,12 @@
    SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

    #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn ; Enable warnings to assist with detecting common errors.
    SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

    LCtrl & Tab:: AltTab
    !Tab:: Send ^{Tab}
    !+Tab:: Send ^+{Tab}

    ^Space:: Send ^{Esc}

    ^Left::
    Send {Home}
    Return
  2. chrisdhanaraj revised this gist Jun 13, 2017. 1 changed file with 10 additions and 26 deletions.
    36 changes: 10 additions & 26 deletions osx.ahk
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,15 @@
    SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

    #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn ; Enable warnings to assist with detecting common errors.
    SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

    LCtrl & Tab:: AltTab
    !Tab:: Send ^{Tab}
    !+Tab:: Send ^+{Tab}

    ^Left::
    Send {Home}
    Return
    @@ -34,29 +43,4 @@ Return

    ^+Down::
    Send ^+{End}
    Return

    *tab::
    {
    if (GetKeyState("LAlt", "P")) {
    Send {LControl up}{Alt down}{tab}
    KeyWait, tab
    } else if (GetKeyState("LShift", "P")) {
    Send {LShift down}{tab}
    KeyWait, tab
    } else if (GetKeyState("LControl", "P")) {
    Send {LControl down}{Alt up}{tab}
    KeyWait, tab
    } else {
    send {tab}
    }
    return
    }

    ~LAlt Up::
    {
    send {lalt up}
    return
    }
    LAlt::LCtrl
    LCtrl::LAlt
    Return
  3. chrisdhanaraj created this gist Jun 12, 2017.
    62 changes: 62 additions & 0 deletions osx.ahk
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,62 @@
    #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn ; Enable warnings to assist with detecting common errors.
    SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

    ^Left::
    Send {Home}
    Return

    ^Right::
    Send {End}
    Return

    ^+Left::
    Send +{Home}
    Return

    ^+Right::
    Send +{End}
    Return


    ^Up::
    Send ^{Home}
    Return

    ^Down::
    Send ^{End}
    Return

    ^+Up::
    Send ^+{Home}
    Return

    ^+Down::
    Send ^+{End}
    Return

    *tab::
    {
    if (GetKeyState("LAlt", "P")) {
    Send {LControl up}{Alt down}{tab}
    KeyWait, tab
    } else if (GetKeyState("LShift", "P")) {
    Send {LShift down}{tab}
    KeyWait, tab
    } else if (GetKeyState("LControl", "P")) {
    Send {LControl down}{Alt up}{tab}
    KeyWait, tab
    } else {
    send {tab}
    }
    return
    }

    ~LAlt Up::
    {
    send {lalt up}
    return
    }
    LAlt::LCtrl
    LCtrl::LAlt