Starting in macOS Sonoma and continuing into macOS Sequoia, Apple introduced a floating visual Caps Lock indicator. Whenever you press the Caps Lock key on your Mac keyboard, a small blue upward-arrow HUD badge renders immediately adjacent to your active text cursor. While intended to alert users who accidentally engage all-caps mode, the floating icon frequently obstructs surrounding code, terminal prompts, and text fields during precision editing.
Because Apple does not provide a simple graphical toggle switch in System Settings to disable this overlay, power users and developers can turn off the persistent Caps Lock indicator badge using a straightforward Terminal command.
How to Disable the Caps Lock Cursor Indicator via Terminal
You can suppress the floating cursor badge by modifying the internal feature flag responsible for rendering UIKit overlay preferences.
- Open the Terminal app on your Mac (press Command + Space, type Terminal, and press Enter).
- Enter the following command into the terminal window:
sudo defaults write /Library/Preferences/FeatureFlags/Domain/UIKit.plist UIKitPreferences -dict-add CPSLOverrideDisabled -bool true - Press Enter. Type your macOS administrator password when prompted and press Enter again. (Terminal will not display asterisks or characters as you type passwords).
- To apply the change immediately across your active graphical desktop session, restart the system window server by running:
killall ControlCenter - Alternatively, restart your Mac to ensure all background frameworks adopt the revised configuration.
Once your desktop session reloads, pressing the Caps Lock key will toggle upper-case typing normally and illuminate the physical green LED on your keyboard, but the floating blue on-screen cursor badge will no longer appear.
How to Re-Enable the Caps Lock Indicator
If you ever wish to restore the default floating indicator behaviour, you can delete the override property using Terminal:
- Open Terminal.
- Execute the following command to remove the custom flag:
sudo defaults delete /Library/Preferences/FeatureFlags/Domain/UIKit.plist UIKitPreferences - Press Enter and enter your administrator password.
- Restart your Mac or run
killall ControlCenterto restore the default on-screen badge.
Alternative Option: Remapping or Disabling Caps Lock in System Settings
If you rarely or never use Caps Lock, you can deactivate the key entirely or remap it to serve a more productive function, such as Control or Escape:
- Open System Settings from the Apple menu () in the top-left corner of your display.
- Scroll down the left sidebar and select Keyboard.
- Click the Keyboard Shortcuts button in the main panel.
- Select Modifier Keys from the list on the left.
- Locate the Caps Lock Key dropdown menu and choose No Action (or remap it to Control).
- Click Done to save your changes.
For more window and cursor management configurations in macOS, explore our guide on how to float a note on top of other windows in Apple Notes on Mac.
Troubleshooting Indicator and Keyboard Glitches
If the Caps Lock indicator persists after running the defaults write command, verify the following details:
- Full terminal permissions: Ensure Terminal has full disk access permissions under System Settings > Privacy & Security > Full Disk Access if macOS restricts writing to
/Library/Preferences/. - Reboot required for certain apps: Heavy IDEs and third-party web browsers that manage custom text cursors may cache rendering flags until completely quit and relaunched.
- Third-party keyboard managers: Utilities such as Karabiner-Elements or BetterTouchTool maintain their own virtual input drivers. If you use keyboard remapping software, ensure it does not independently trigger synthetic Caps Lock state events.