macOS Disable mouse acceleration in certain apps Is there a way to disable mouse acceleration in certain apps? For instance disable in Team Fortress 2 but re-anable when the app doesn't have focus?
You can globally use the following command in Terminal (you must log out to take effect):

defaults write .GlobalPreferences com.apple.mouse.scaling -1


To know what the current acceleration is, use this command:

defaults read .GlobalPreferences com.apple.mouse.scaling


For most mice in macOS, the default is set to 3 or 2 but some users may find values as low as 0.25 or 0.12, it generally depends on what type of mouse you are having and the current version of macOS. The moderate value is 0 to 3.

defaults write .GlobalPreferences com.apple.mouse.scaling 0


Look at this useful AD post: How to disable mouse acceleration in Yosemite?

Also, for TF2 game you can definitely use Apple Automator: How to Use Automator in macOS


  ¡Hope this helps!