Skip to content

Commit 09f4a3c

Browse files
✨ Add the Mouse section (#350)
* ✨ Add mouse linear acceleration command * ✨ Add mouse scaling command * 🚚 Move mouse focus follow command --------- Co-authored-by: Alexander Momchilov <[email protected]>
1 parent 43a598a commit 09f4a3c

File tree

9 files changed

+182
-5
lines changed

9 files changed

+182
-5
lines changed

docs/.vitepress/config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,17 @@ export default defineConfig({
323323
},
324324
],
325325
},
326+
{
327+
text: 'Mouse',
328+
items: [
329+
{ text: 'Disable acceleration', link: '/mouse/linear.md' },
330+
{
331+
text: 'Set movement speed',
332+
link: '/mouse/scaling.md',
333+
},
334+
{ text: 'Focus Follows Mouse', link: '/mouse/focusfollowsmouse.md' },
335+
],
336+
},
326337
{
327338
text: 'Trackpad',
328339
items: [
@@ -445,7 +456,6 @@ export default defineConfig({
445456
text: 'Key held down behavior',
446457
link: '/misc/applepressandholdenabled.md',
447458
},
448-
{ text: 'Focus Follows Mouse', link: '/misc/focusfollowsmouse.md' },
449459
{
450460
text: 'Close confirm changes popup',
451461
link: '/misc/nsclosealwaysconfirmschanges.md',

docs/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ defaults rename ${domain} ${old_key} ${new_key}
134134
- [Flash clock time separators](./menubar/flashdateseparators.md)
135135
- [Set menubar digital clock format](./menubar/dateformat.md)
136136

137+
### Mouse
138+
139+
- [Disable acceleration](./mouse/linear.md)
140+
- [Set movement speed](./mouse/scaling.md)
141+
- [Focus Follows Mouse](./mouse/focusfollowsmouse.md)
142+
137143
### Trackpad
138144

139145
- [Click weight (threshold)](./trackpad/firstclickthreshold.md)
@@ -182,7 +188,6 @@ defaults rename ${domain} ${old_key} ${new_key}
182188
- [Show Music song notifications](./misc/userwantsplaybacknotifications.md)
183189
- [Disable application quarantine message](./misc/lsquarantine.md)
184190
- [Key held down behavior](./misc/applepressandholdenabled.md)
185-
- [Focus Follows Mouse](./misc/focusfollowsmouse.md)
186191
- [Close confirm changes popup](./misc/nsclosealwaysconfirmschanges.md)
187192
- [Function keys behavior](./misc/applekeyboardfnstate.md)
188193

docs/misc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ All the others `defaults` that don't deserve their own category.
2121
- [Show Music song notifications](./userwantsplaybacknotifications.md)
2222
- [Disable application quarantine message](./lsquarantine.md)
2323
- [Key held down behavior](./applepressandholdenabled.md)
24-
- [Focus Follows Mouse](./focusfollowsmouse.md)
2524
- [Close confirm changes popup](./nsclosealwaysconfirmschanges.md)
2625
- [Function keys behavior](./applekeyboardfnstate.md)

docs/misc/focusfollowsmouse.md renamed to docs/mouse/focusfollowsmouse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Focus Follows Mouse | Miscellaneous
2+
title: Focus Follows Mouse | Mouse
33
description: Focus of the Terminal windows when the mouse cursor hovers over them. The focus change only works between the Terminal windows.
44
head:
55
- - meta
66
- property: 'og:title'
7-
content: macOS defaults > Miscellaneous > Focus Follows Mouse
7+
content: macOS defaults > Mouse > Focus Follows Mouse
88
- - meta
99
- property: 'og:description'
1010
content: Focus of the Terminal windows when the mouse cursor hovers over them. The focus change only works between the Terminal windows.

docs/mouse/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Mouse
3+
description: The hardware device to control the cursor.
4+
head:
5+
- - meta
6+
- property: 'og:title'
7+
content: macOS defaults > Mouse
8+
- - meta
9+
- property: 'og:description'
10+
content: The hardware device to control the cursor.
11+
---
12+
13+
# Mouse
14+
15+
The hardware device to control the cursor.
16+
17+
## Keys
18+
19+
- [Disable acceleration](./linear.md)
20+
- [Set movement speed](./scaling.md)
21+
- [Focus Follows Mouse](./focusfollowsmouse.md)

docs/mouse/linear.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Mouse | Acceleration
3+
description: Disable mouse acceleration.
4+
head:
5+
- - meta
6+
- property: 'og:title'
7+
content: macOS defaults > Mouse > Acceleration
8+
- - meta
9+
- property: 'og:description'
10+
content: Enable or disable mouse acceleration
11+
---
12+
13+
# Acceleration
14+
15+
Enable or disable mouse acceleration.
16+
17+
By default, macOS has mouse acceleration enabled, which causes the cursor to move less when you slowly move the mouse, and much more when you move the mouse faster.
18+
19+
The underlying acceleration curve (which determines how much movement you get at any given mouse speed) is not customizable without third party tools.
20+
21+
⚠️ A restart of your Mac is required to apply these changes.
22+
23+
<!-- break lists -->
24+
25+
- **Tested on macOS**:
26+
- Sonoma
27+
- **Parameter type**: bool
28+
29+
## Requirements
30+
31+
This setting was introduced in macOS 14 Sonoma.
32+
33+
## Disable mouse acceleration
34+
35+
Disabling mouse acceleration can be preferable for gaming, because it's more amenable to building muscle-memory.
36+
37+
```bash
38+
defaults write NSGlobalDomain com.apple.mouse.linear -bool "true"
39+
```
40+
41+
## Enable mouse acceleration (default value)
42+
43+
Turning on mouse acceleration can be preferable if you have limited desk space for mouse movements, and need to cover a large screen area.
44+
45+
```bash
46+
defaults write NSGlobalDomain com.apple.mouse.linear -bool "false"
47+
```
48+
49+
## Read current value
50+
51+
```bash
52+
defaults read NSGlobalDomain com.apple.mouse.linear
53+
```
54+
55+
## Reset to default value
56+
57+
```bash
58+
defaults delete NSGlobalDomain com.apple.mouse.linear
59+
```
60+
61+
## Set value from UI
62+
63+
1. <a href="x-apple.systempreferences:com.apple.Mouse-Settings.extension">Access Mouse settings from macOS UI</a>
64+
2. Open the Advanced panel
65+
3. Toggle "Pointer acceleration" value

docs/mouse/scaling.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: Mouse | Speed
3+
description: Set movement speed of the mouse cursor.
4+
head:
5+
- - meta
6+
- property: 'og:title'
7+
content: macOS defaults > Mouse > Speed
8+
- - meta
9+
- property: 'og:description'
10+
content: Set movement speed of the mouse cursor
11+
---
12+
13+
# Speed
14+
15+
Set movement speed of the mouse cursor.
16+
17+
⚠️ A restart of your Mac is required to apply these changes.
18+
19+
<!-- break lists -->
20+
21+
- **Tested on macOS**:
22+
- Sonoma
23+
- Venura
24+
- Monterey
25+
- Big Sur
26+
- Catalina
27+
- Mojave
28+
- High Sierra
29+
- Sierra
30+
- El Capitan
31+
- Yosemite
32+
- Mavericks
33+
- Mountain Lion
34+
- Lion
35+
- Snow Leopard
36+
- Leopard
37+
- **Parameter type**: float
38+
39+
## Set to `1` (default value)
40+
41+
By default, the mouse movement scale factor is 1x.
42+
43+
```bash
44+
defaults write NSGlobalDomain com.apple.mouse.scaling -float "1"
45+
```
46+
47+
This setting is listed in the Mouse preference pane as the "Tracking speed" slider. Its ticks give the following values:
48+
49+
- `0.0` (which surprisingly, does not mean "no movement")
50+
- `0.125`
51+
- `0.5`
52+
- `0.6875`
53+
- `0.875`
54+
- `1.0`
55+
- `1.5`
56+
- `2.0`
57+
- `2.5`
58+
- `3.0`
59+
60+
This command allows you set a scale factor greater than 3x.
61+
62+
## Read current value
63+
64+
```bash
65+
defaults read NSGlobalDomain com.apple.mouse.scaling
66+
```
67+
68+
## Reset to default value
69+
70+
```bash
71+
defaults delete NSGlobalDomain com.apple.mouse.scaling
72+
```
73+
74+
## Set value from UI
75+
76+
1. <a href="x-apple.systempreferences:com.apple.Mouse-Settings.extension">Access Mouse settings from macOS UI</a>
77+
2. Slide "Tracking speed" range value

0 commit comments

Comments
 (0)