commit f4d2b52a80903357abffad43239573e6895bd85b
Author: Pablo Cárdenas <pablocb2303@gmail.com>
Date: Sat, 15 Apr 2017 22:43:30 -0500
Initial Commit
Diffstat:
5 files changed, 89 insertions(+), 0 deletions(-)
diff --git a/Autodesk.ahk b/Autodesk.ahk
@@ -0,0 +1,35 @@
+#If (MouseIsOver("ahk_exe acad.exe") && WinActive("ahk_exe acad.exe"))
+ || (MouseIsOver("ahk_exe Revit.exe") && WinActive("ahk_exe Revit.exe"))
+; Default behavior of thumb buttons
+XButton1::Esc
+XButton2::Enter
+
+; Hold MButton and press thumb buttons for switching between Windows
+~MButton::Return
+MButton & XButton1::Send {MButton up}^{Tab}{MButton Down}
+MButton & XButton2::Send {MButton up}^+{Tab}{MButton Down}
+
+; Hold RButton and press thumb buttons for switching between Windows
+RButton::Send {RButton}
+RButton & XButton1::Send ^{Tab}
+RButton & XButton2::Send ^+{Tab}
+
+#If MouseIsOver("ahk_exe Revit.exe") && WinActive("ahk_exe Revit.exe")
+; Hold XButton1 to orbit
+XButton1 & ~MButton::
+Send {Shift down}
+KeyWait XButton1
+Send {Shift up}
+Return
+
+; Hold XButton2 to select and unselect
+XButton2 & ~LButton::
+SendEvent {Ctrl down}{Shift down}
+KeyWait XButton2
+SendEvent {Ctrl up}{Shift up}
+Return
+
+; Press check or cross on edit mode
+!XButton1::Send {Alt}mxm
+!XButton2::Send {Alt}mfm
+#If
diff --git a/Common.ahk b/Common.ahk
@@ -0,0 +1,4 @@
+MouseIsOver(WinTitle, ClassNN = "") {
+ MouseGetPos,,, Win, _ClassNN
+ Return WinExist(WinTitle . " ahk_id" . Win) && (ClassNN = "" || RegExMatch(_ClassNN, ClassNN) = 1)
+}
diff --git a/DesktopEnvironment.ahk b/DesktopEnvironment.ahk
@@ -0,0 +1,28 @@
+; Launch Double Commander
+^#e::Run, "C:\Program Files\Double Commander\doublecmd.exe"
+
+; Launch Qutebrowser
+^#w::Run, "C:\Program Files\qutebrowser\qutebrowser.exe"
+
+; CapsLock shows an alert when pressed
+CapsLock::
+If !GetKeyState("capslock","T") {
+ SetCapsLockState, On
+ Progress, B2 W350 H50 ZH0 FS30 WS900 x0 y0 CWFFC7CE CT9C0006, CAPS LOCK ON
+} Else {
+ SetCapsLockState, Off
+ Progress, off
+}
+Return
+
+#If MouseIsOver("ahk_class MultitaskingViewFrame") || MouseIsOver("ahk_class Shell_TrayWnd", "MSTaskListWClass1")
+; Cycle through virtual desktops
+WheelUp::Send ^#{Right}
+WheelDown::Send ^#{Left}
+MButton::Send #{Tab}
+
+#If MouseIsOver("ahk_class Shell_TrayWnd", "ToolbarWindow323")
+; Change volume by scrolling
+WheelUp::Send {Volume_Up}
+WheelDown::Send {Volume_Down}
+#If
diff --git a/Main.ahk b/Main.ahk
@@ -0,0 +1,11 @@
+#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
+#Warn ; Enable warnings to assist with detecting common errors.
+#SingleInstance force
+SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
+SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
+SetTitleMatchMode, RegEx
+
+#include DesktopEnvironment.ahk
+#include Autodesk.ahk
+#include Qutebrowser.ahk
+#include Common.ahk
diff --git a/Qutebrowser.ahk b/Qutebrowser.ahk
@@ -0,0 +1,11 @@
+#If MouseIsOver("ahk_exe qutebrowser.exe")
+*RButton::Return
+*LButton::Return
+*MButton::Return
+*XButton1::Return
+*XButton2::Return
+*WheelDown::Return
+*WheelUp::Return
+*WheelLeft::Return
+*WheelRight::Return
+#If