Skip to content

Instantly share code, notes, and snippets.

View gdavis's full-sized avatar

Grant Davis gdavis

View GitHub Profile
@gdavis
gdavis / disable-mouse-accel.markdown
Created July 3, 2022 14:27
Disable Mouse Scaling on macOS via Terminal

Adopted from: https://techinfluence.net/turn-off-mouse-acceleration-on-mac/#Method_2_Turn_Off_Mouse_Acceleration_Using_the_Terminal

Check the current value of scaling in user defaults:

~ defaults read .GlobalPreferences com.apple.mouse.scaling

This will display a hidden preference setting that you can change by altering the number at the end. If the mouse acceleration feature is enabled, the above command should display a value between 0 and 3. This is the value that is altered when you move the ‘Tracking Speed’ slider

Disable mouse acceleration:

@gdavis
gdavis / divvy-shortcut.markdown
Last active April 17, 2025 16:29
Divvy Global Control+Command+Space Shortcut

I have been using Control+Command+Space as my shortcut to launch Divvy for over a decade. MacOS now assigns that to another system command (Character Viewer) which I assign to another shortcut. To allow Divvy to use this key combo you need to update some defaults keys to force this to happen. The below commands are from Mizage who posted an answer for this on Stack Exchange. I'm reposting this in a gist for preservation and easier access.

  1. Quit Divvy.
  2. Launch Terminal.app and paste this command, on one line, and press enter:

    defaults write com.mizage.direct.Divvy globalHotkey -dict keyCode 49 modifiers 4352

  3. Also, paste this command, on one line, and press enter:

    defaults write com.mizage.Divvy globalHotkey -dict keyCode 49 modifiers 4352

  4. Restart Divvy.