mirror of
https://github.com/stevenilsen123/mac-keyboard-behavior-in-windows.git
synced 2025-12-13 21:45:28 +03:00
* Support for AHK 2.0
* Reorganized files * Updated official MacOS shortcut page text * No additional shortcuts were added except Accessability shortcuts which are not intended to be supported * Removed stale note about admin rights being required * Added note about persisting script
This commit is contained in:
131
mac.ahk
131
mac.ahk
@@ -7,10 +7,9 @@
|
||||
; ! Ctrl (because of remapkey). For example, `Send, ^!a` would press Ctrl+Alt+A, and Send, ^{Home} would send Ctrl+Home. Note: ^A produces a different effect in some programs than ^a. This is because ^A presses Ctrl+Shift+A and ^a presses Ctrl+A. If in doubt, use lowercase.Sends Ctrl. For example, Send, ^!a would press Ctrl+Alt+A, and Send, ^{Home} would send Ctrl+Home. Note: ^A produces a different effect in some programs than ^a. This is because ^A presses Ctrl+Shift+A and ^a presses Ctrl+A. If in doubt, use lowercase.
|
||||
; & An ampersand may be used between any two keys or mouse buttons to combine them into a custom hotkey.
|
||||
|
||||
#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.
|
||||
; #Warn ; Uncomment to 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.
|
||||
|
||||
; Uncomment for key history
|
||||
; #InstallKeybdHook
|
||||
@@ -18,69 +17,93 @@ SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
|
||||
|
||||
; App and tab switching
|
||||
Ctrl & Tab::AltTab
|
||||
!Tab::Send ^{Tab}
|
||||
!Tab::Send("^{Tab}")
|
||||
|
||||
; Quit the active app
|
||||
^q::Send, !{f4}
|
||||
^q::Send("!{f4}")
|
||||
|
||||
; Insertion point movement
|
||||
^Left::
|
||||
Suspend, On
|
||||
Send, {Home}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("{Home}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
^Right::
|
||||
Suspend, On
|
||||
Send, {End}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("{End}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
^Up::
|
||||
Suspend, On
|
||||
Send, ^{Home}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("^{Home}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
^Down::
|
||||
Suspend, On
|
||||
Send, ^{End}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("^{End}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
+^Left::
|
||||
Suspend, On
|
||||
Send, +{Home}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("+{Home}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
+^Right::
|
||||
Suspend, On
|
||||
Send, +{End}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("+{End}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
+^Up::
|
||||
Suspend, On
|
||||
Send, +^{Home}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("+^{Home}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
+^Down::
|
||||
Suspend, On
|
||||
Send, +^{End}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("+^{End}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
#Left::
|
||||
Suspend, On
|
||||
Send, ^{Left}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("^{Left}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
#Right::
|
||||
Suspend, On
|
||||
Send, ^{Right}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("^{Right}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
+#Left::
|
||||
Suspend, On
|
||||
Send, +^{Left}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("+^{Left}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
+#Right::
|
||||
Suspend, On
|
||||
Send, +^{Right}
|
||||
Suspend, Off
|
||||
return
|
||||
{
|
||||
Suspend(true)
|
||||
Send("+^{Right}")
|
||||
Suspend(false)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user