Compare commits

..

17 Commits
ripley ... main

Author SHA1 Message Date
f5699be1b5 Add mouse natural scrolling script 2025-02-06 22:24:29 +00:00
f497175429 Add explorer.exe tab move left/right mappings 2024-12-24 14:17:35 +00:00
06e029c28c Add mapping for {cmd}+` equivelent
https://superuser.com/a/1721255
2024-04-29 21:21:08 +01:00
d7fe390d09 Add 1Password mappings 2024-04-10 22:40:46 +01:00
3e1b872a00 Add media key mappings using Menu as Fn 2024-04-10 22:33:20 +01:00
d30be41414 Add File Explorer tab mappings 2024-04-06 11:40:18 +01:00
2b3e259009 Add support for WezTerm 2024-04-04 22:11:21 +01:00
4a2b1bd211 Add Ferdium to list of browsers to remap keys for 2023-12-09 11:07:15 +00:00
3c01eb9dbb Fix Alt+= to zoom in on browsers 2023-01-14 13:16:33 +00:00
0dadc1bf13 Add explorer.exe to some bindings 2022-09-09 23:10:16 +01:00
8c18eba3f8 Include Edge and Chrome in browser group 2022-09-09 23:08:48 +01:00
51f3d28183 Remove Windows terminal tab change mappings 2022-05-04 19:19:47 +01:00
47fee4c280 Add Win+Space mapping to Win+` for Quake mode 2022-05-04 19:18:59 +01:00
6c1e48b622 Use groups to apps with similar keybindings 2022-04-27 19:17:29 +01:00
8fb1d28e3a Add AltGr+[ and AltGr+] for back/forward 2022-04-27 17:58:08 +01:00
83628bebe7 Add forward/back to "Personal" 2022-04-26 21:46:00 +01:00
994ea47f5b Add "Personal" app to list of key bindings 2022-04-26 21:08:57 +01:00
2 changed files with 101 additions and 46 deletions

135
macOS.ahk
View File

@ -4,20 +4,48 @@ SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode 2
GroupAdd, Browser, Firefox
GroupAdd, Browser, Edge
GroupAdd, Browser, Chrome
GroupAdd, WebCatalog, Personal
GroupAdd, WebCatalog, Apple
GroupAdd, WebCatalog, Work
GroupAdd, WebCatalog, Ferdium
; ---------------------------------- Global ----------------------------------
#Space:: ; toggle Windows Terminal quake mode
send #``
return
!`:: ; switch between windows of same app
WinGetClass, OldClass, A
WinGet, ActiveProcessName, ProcessName, A
WinGet, WinClassCount, Count, ahk_exe %ActiveProcessName%
IF WinClassCount = 1
Return
loop, 2 {
WinSet, Bottom,, A
WinActivate, ahk_exe %ActiveProcessName%
WinGetClass, NewClass, A
if (OldClass <> "CabinetWClass" or NewClass = "CabinetWClass")
break
}
; ---------------------------------- Editing ---------------------------------
!x:: ; cut
send ^x
return
!c:: ; copy
if WinActive("ahk_exe WindowsTerminal.exe")
if WinActive("ahk_exe WindowsTerminal.exe") || WinActive("ahk_exe wezterm-gui.exe")
send ^+c
else
send ^c
return
!v:: ; paste
if WinActive("ahk_exe WindowsTerminal.exe")
if WinActive("ahk_exe WindowsTerminal.exe") || WinActive("ahk_exe wezterm-gui.exe")
send ^+v
else
send ^v
@ -36,30 +64,34 @@ send ^a
return
$!r:: ; reload
if WinActive("Firefox") || WinActive("Ferdi")
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog")
send ^r
else if WinActive("ahk_exe explorer.exe")
send {F5}
else
send !r
return
; -------------------------------- Navigation --------------------------------
$![:: ; back
if WinActive("Firefox")
$![:: ; back from Alt+[
$<^>![:: ; from AltGr+[
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog") || WinActive("ahk_exe explorer.exe")
send !{Left}
else
send ![
return
$!]:: ; forward
if WinActive("Firefox")
$!]:: ; forward from Atl+]
$<^>!]:: ; from AltGr+]
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog") || WinActive("ahk_exe explorer.exe")
send !{Right}
else
send !]
return
$!+r:: ; reload (override cache)
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^+r
else
send !+r
@ -67,42 +99,42 @@ return
; ------------------------------- Current Page -------------------------------
$!Down:: ; go to bottom of page
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^{Down}
else
send !{Down}
return
$!Up:: ; go to top of page
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^{Up}
else
send !{Up}
return
$!p:: ; print
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^p
else
send !p
return
$!+=:: ; zoom in
if WinActive("Firefox")
$!=:: ; zoom in
if WinActive("ahk_group Browser")
send ^+=
else
send !+=
return
$!-:: ; zoom out
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^-
else
send !-
return
$!0:: ; zoom reset
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^0
else
send !0
@ -110,14 +142,14 @@ return
; ---------------------------------- Search ----------------------------------
$!f:: ; find
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^f
else
send !f
return
$!l:: ; focus address bar
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^l
else
send !l
@ -125,143 +157,145 @@ return
; ------------------------------ Windows & Tabs ------------------------------
$!w:: ; close tab
if WinActive("Firefox")
if WinActive("ahk_group Browser") || WinActive("ahk_exe explorer.exe")
send ^w
else if WinActive("ahk_exe wezterm-gui.exe")
send ^+w
else
send !w
return
!<#w:: ; close window - the fuck is this?
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^+w
; TODO: else
return
!q:: ; quit
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^+q
else
send !{F4}
return
$!+[:: ; go one tab left
if WinActive("Firefox")
if WinActive("ahk_group Browser") || WinActive("ahk_exe wezterm-gui.exe")
send ^{PgUp}
else if WinActive("ahk_exe WindowsTerminal.exe")
else if WinActive("ahk_exe explorer.exe")
send ^+{Tab}
else
send !+[
return
$!+]:: ; go one tab right
if WinActive("Firefox")
if WinActive("ahk_group Browser") || WinActive("ahk_exe wezterm-gui.exe")
send ^{PgDn}
else if WinActive("ahk_exe WindowsTerminal.exe")
else if WinActive("ahk_exe explorer.exe")
send ^{Tab}
else
send !+]
return
$^!+[:: ; move one tab left
if WinActive("Firefox")
if WinActive("ahk_group Browser") || WinActive("ahk_exe wezterm-gui.exe")
send ^+{PgUp}
else
send ^!+[
return
$^!+]:: ; move one tab right
if WinActive("Firefox")
if WinActive("ahk_group Browser") || WinActive("ahk_exe wezterm-gui.exe")
send ^+{PgDn}
else
send ^!+]
return
$!t:: ; new tab
if WinActive("Firefox")
if WinActive("ahk_group Browser") || WinActive("ahk_exe explorer.exe")
send ^t
else
send !t
return
$!n:: ; new window
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^n
else
send !n
return
$!+n:: ; new private window
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^+p
else
send !+n
return
$!+t:: ; undo closed tab
if WinActive("Firefox")
if WinActive("ahk_group Browser")
send ^+t
else
send !+t
return
$!1:: ; select tab 1
if WinActive("Firefox") || WinActive("Ferdi")
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog")
send ^1
else
send !1
return
$!2:: ; select tab 2
if WinActive("Firefox") || WinActive("Ferdi")
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog")
send ^2
else
send !2
return
$!3:: ; select tab 3
if WinActive("Firefox") || WinActive("Ferdi")
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog")
send ^3
else
send !3
return
$!4:: ; select tab 4
if WinActive("Firefox") || WinActive("Ferdi")
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog")
send ^4
else
send !4
return
$!5:: ; select tab 5
if WinActive("Firefox") || WinActive("Ferdi")
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog")
send ^5
else
send !5
return
$!6:: ; select tab 6
if WinActive("Firefox") || WinActive("Ferdi")
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog")
send ^6
else
send !6
return
$!7:: ; select tab 7
if WinActive("Firefox") || WinActive("Ferdi")
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog")
send ^7
else
send !7
return
$!8:: ; select tab 8
if WinActive("Firefox") || WinActive("Ferdi")
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog")
send ^8
else
send !8
return
$!9:: ; select tab 9
if WinActive("Firefox") || WinActive("Ferdi")
if WinActive("ahk_group Browser") || WinActive("ahk_group WebCatalog")
send ^9
else
send !9
@ -274,3 +308,26 @@ return
; TODO: Firefox Miscellaneous
; TODO: Firefox Media shortcuts
; TODO: Firefox Selection of Multiple Tabs
; -------------------------------- Media Keys --------------------------------
AppsKey & F7::Send {Media_Prev}
AppsKey & F8::Send {Media_Play_Pause}
AppsKey & F9::Send {Media_Next}
AppsKey & F10::Send {Volume_Mute}
AppsKey & F11::Send {Volume_Down}
AppsKey & F12::Send {Volume_Up}
AppsKey::Send, {AppsKey}
; -------------------------------- 1Password ---------------------------------
!+Space:: ; quick access
send ^+{Space}
return
!+c:: ; copy password
if WinActive("ahk_exe 1Password.exe")
send ^+c
else
send !+c
return

View File

@ -1,7 +1,5 @@
#MaxHotkeysPerInterval 200
WheelUp::
Send {WheelDown}
Return
WheelDown::
Send {WheelUp}
Return
; mouse bindings
; natural scrolling
WheelUp::Send {WheelDown}
WheelDown::Send {WheelUp}