Skip to content

Commit 9d0d3ce

Browse files
committed
Initial commit: MouseVolume source
0 parents  commit 9d0d3ce

6 files changed

Lines changed: 271 additions & 0 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+

README.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# 🖱️ MouseVolume — Control Windows Volume with Mouse Side Buttons
2+
3+
**MouseVolume** is a lightweight Windows utility that lets you control system volume using your mouse's side buttons.
4+
No heavy apps, no background junk, just fast, clean volume control.
5+
6+
> **Windows-only utility**
7+
8+
Perfect for:
9+
10+
- 🎮 Gamers
11+
- 🎧 Video & audio editors
12+
- 🖥️ Multi‑monitor setups
13+
- 🎬 Streamers
14+
- Anyone who wants instant volume control without the keyboard
15+
16+
---
17+
18+
## 🎥 Demo
19+
20+
> _(Add your GIF / video preview here)_
21+
22+
```
23+
[ Your GIF / MP4 will appear here when added on GitHub ]
24+
```
25+
26+
---
27+
28+
## ✅ Features
29+
30+
- **Mouse Back Button** → Volume Down
31+
- **Mouse Forward Button** → Volume Up
32+
_(Technical names: XButton1 = Back, XButton2 = Forward)_
33+
- 🟢 Tray icon when active
34+
- 🔴 Tray icon when disabled
35+
- Starts with Windows (installer option)
36+
- Stand‑alone EXE
37+
- Very lightweight & fast
38+
39+
---
40+
41+
## 🪟 Supported OS
42+
43+
| OS | Supported |
44+
| ---------- | --------- |
45+
| Windows 11 ||
46+
| Windows 10 ||
47+
| macOS ||
48+
| Linux ||
49+
50+
---
51+
52+
## 🚀 Installation
53+
54+
### ✅ Option 1 — Installer (Recommended)
55+
56+
Download the latest installer from Releases:
57+
58+
👉 https://github.com/**YOUR_USERNAME**/MouseVolume/releases/latest
59+
60+
Run:
61+
62+
```
63+
MouseVolume_Setup.exe
64+
```
65+
66+
The installer will:
67+
68+
- Copy files to:
69+
```
70+
%localappdata%\Tools\MouseVolume\
71+
```
72+
- Add a Startup shortcut (runs automatically)
73+
- Launch the app — tray icon will appear ✅
74+
75+
### ⚙️ Option 2 — Portable
76+
77+
Download:
78+
79+
```
80+
MouseVolume.exe
81+
```
82+
83+
Run it — done.
84+
No installation required.
85+
86+
---
87+
88+
## ⌨️ Usage
89+
90+
| Action | Button / Hotkey |
91+
| ------------- | ------------------------- |
92+
| Volume Up | Mouse Forward Side Button |
93+
| Volume Down | Mouse Back Side Button |
94+
| Toggle ON/OFF | Ctrl + Pause |
95+
96+
---
97+
98+
## 📂 Folder Structure
99+
100+
```
101+
MouseVolume/
102+
├─ src/
103+
│ ├─ MouseVolume.ahk
104+
│ ├─ MouseVolume.ico
105+
│ ├─ MouseVolume_off.ico
106+
│ ├─ installer
107+
│ │ ├─ MouseVolume.iss
108+
└─ README.md
109+
```
110+
111+
---
112+
113+
## 🛠️ Modify / Build From Source
114+
115+
### Requirements
116+
117+
- AutoHotkey v2 _(to edit and compile)_
118+
- Inno Setup _(to build installer)_
119+
120+
### Edit the script
121+
122+
Source located in:
123+
124+
```
125+
src/MouseVolume.ahk
126+
```
127+
128+
### Compile EXE
129+
130+
Right‑click the `.ahk`**Compile**
131+
Or via terminal:
132+
133+
```
134+
Ahk2Exe.exe /in MouseVolume.ahk /out MouseVolume.exe
135+
```
136+
137+
### Build Installer
138+
139+
Open:
140+
141+
```
142+
src/MouseVolume.iss
143+
```
144+
145+
Build via **Inno Setup**.
146+
147+
---
148+
149+
## 💬 Tips
150+
151+
- Buttons are the same ones used for _Back_ and _Forward_ in browsers
152+
- Works great with gaming mice that have two side buttons
153+
154+
---
155+
156+
## 📄 License
157+
158+
MIT — free to modify & use.
159+
160+
---
161+
162+
## ⭐ Support
163+
164+
If this tool helps you, consider giving the project a ⭐ on GitHub — it means a lot!

src/MouseVolume.ahk

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#Requires AutoHotkey v2.0
2+
3+
global isOn := true
4+
5+
TraySetIcon(A_ScriptDir "\MouseVolume.ico")
6+
7+
ToggleState() {
8+
global isOn
9+
isOn := !isOn
10+
11+
if (isOn) {
12+
TraySetIcon(A_ScriptDir "\MouseVolume.ico")
13+
TrayTip("MouseVolume", "Volume control ON", 1500)
14+
} else {
15+
TraySetIcon(A_ScriptDir "\MouseVolume_off.ico")
16+
TrayTip("MouseVolume", "Volume control OFF", 1500)
17+
}
18+
}
19+
20+
^Pause::ToggleState()
21+
22+
XButton1::{
23+
global isOn
24+
if (!isOn)
25+
return
26+
27+
start := A_TickCount
28+
while GetKeyState("XButton1", "P") {
29+
elapsed := A_TickCount - start
30+
if (elapsed < 500)
31+
Sleep(100)
32+
else
33+
Sleep(30)
34+
Send "{Volume_Down}"
35+
}
36+
}
37+
38+
XButton2::{
39+
global isOn
40+
if (!isOn)
41+
return
42+
43+
start := A_TickCount
44+
while GetKeyState("XButton2", "P") {
45+
elapsed := A_TickCount - start
46+
if (elapsed < 500)
47+
Sleep(100)
48+
else
49+
Sleep(30)
50+
Send "{Volume_Up}"
51+
}
52+
}

src/MouseVolume.ico

27.5 KB
Binary file not shown.

src/MouseVolume_off.ico

32 KB
Binary file not shown.

src/installer/MouseVolume.iss

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
; Script generated by the Inno Setup Script Wizard.
2+
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3+
4+
#define MyAppName "MouseVolume"
5+
#define MyAppVersion "1.0"
6+
#define MyAppPublisher "Yehuda V"
7+
#define MyAppExeName "MouseVolume.exe"
8+
9+
[Setup]
10+
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
11+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
12+
AppId={{DB517567-9850-4CE6-8297-A95712A419AA}
13+
AppName={#MyAppName}
14+
AppVersion={#MyAppVersion}
15+
;AppVerName={#MyAppName} {#MyAppVersion}
16+
AppPublisher={#MyAppPublisher}
17+
DefaultDirName={localappdata}\Tools\{#MyAppName}
18+
UninstallDisplayIcon={app}\{#MyAppExeName}
19+
; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run
20+
; on anything but x64 and Windows 11 on Arm.
21+
ArchitecturesAllowed=x64compatible
22+
; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the
23+
; install be done in "64-bit mode" on x64 or Windows 11 on Arm,
24+
; meaning it should use the native 64-bit Program Files directory and
25+
; the 64-bit view of the registry.
26+
ArchitecturesInstallIn64BitMode=x64compatible
27+
DisableProgramGroupPage=yes
28+
; Remove the following line to run in administrative install mode (install for all users).
29+
PrivilegesRequired=lowest
30+
OutputBaseFilename=MouseVolumeSetup
31+
SetupIconFile=C:\Users\User\Downloads\MouseVolume.ico
32+
SolidCompression=yes
33+
WizardStyle=modern
34+
35+
[Languages]
36+
Name: "english"; MessagesFile: "compiler:Default.isl"
37+
38+
[Tasks]
39+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
40+
41+
[Files]
42+
Source: "C:\Program Files (x86)\Inno Setup 6\Examples\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
43+
Source: "C:\Program Files (x86)\Inno Setup 6\Examples\MouseVolume.ico"; DestDir: "{localappdata}\Tools\MouseVolume"; Flags: ignoreversion
44+
Source: "C:\Program Files (x86)\Inno Setup 6\Examples\MouseVolume_off.ico"; DestDir: "{localappdata}\Tools\MouseVolume"; Flags: ignoreversion
45+
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
46+
47+
[Icons]
48+
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
49+
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
50+
51+
[Run]
52+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
53+

0 commit comments

Comments
 (0)