97
votes

Is there any way to disable the new text cursor in macOS Sonoma? The caps lock indicator is kind of distracting.

1
  • 20
    And all we needed is for Apple to add a simple setting in keyboard preferences to enable/disable it. Commented Nov 2, 2023 at 22:43

5 Answers 5

109
votes

Simplifying the code yet further, you can just do:

sudo defaults write /Library/Preferences/FeatureFlags/Domain/UIKit.plist redesigned_text_cursor -dict-add Enabled -bool NO 

The folders will be created if not existing.

You'll still need a restart.

Sign up to request clarification or add additional context in comments.

6 Comments

Perfect. One simple command that gets the job done. Can be easily integrated with machine setup scripts ala github.com/kevinSuttle/macOS-Defaults
I had to revert this change because it caused my text cursor to disappear in some UI elements. For example, when entering the title of a new calendar event. I'm running macOS 14.2 (23C64).
Along the same lines, Ulysses does not display a cursor at all in this mode. Apparently the custom shenanigans they had to do to make their text editor play nicely with the new cursor… don't play nicely with disabling the new cursor.
What script do you run to revert the changes. Cant seem to figure that part out
@Yusuf.I sudo defaults delete /Library/Preferences/FeatureFlags/Domain/UIKit.plist redesigned_text_cursor
|
69
votes

Thanks to stephancasas for the explanation and the solution. Another way of implementing it, from Terminal:

sudo mkdir -p /Library/Preferences/FeatureFlags/Domain sudo /usr/libexec/PlistBuddy -c "Add 'redesigned_text_cursor:Enabled' bool false" /Library/Preferences/FeatureFlags/Domain/UIKit.plist 

Reboot for the change to take effect.

1 Comment

Thanks for sharing this! This is in fact the worst 'new' feature Apple provided so far.
25
votes
+100

The redesigned insertion point in macOS Sonoma can be disabled by setting an OS feature flag for UIKit/redesigned_text_cursor/Enabled. You can use the JXA script below to create the PLIST with the required values. Just copy everything into Script Editor, change the language to JavaScript, and press play:

#!/usr/bin/env osascript -l JavaScript const App = Application.currentApplication(); App.includeStandardAdditions = true; const kCFPrefsFeatureFlagsDir = '/Library/Preferences/FeatureFlags/Domain'; const kCFPrefsFeatureEnabledKey = 'Enabled'; const kUIKitDomainPrefsTemporaryPath = '/tmp/UIKit.plist'; const kUIKitRedesignedTextCursorKey = 'redesigned_text_cursor'; function run(_) { const dict = $.NSMutableDictionary.new; const enabled = $.NSMutableDictionary.new; enabled.setValueForKey(false, kCFPrefsFeatureEnabledKey); dict.setValueForKey(enabled, kUIKitRedesignedTextCursorKey); const error = $(); dict.writeToURLError( $.NSURL.fileURLWithPath(kUIKitDomainPrefsTemporaryPath), error, ); if (typeof error.js != 'undefined') { return `🫤: ${error.localizedDescription}`; } return App.doShellScript( [ `mkdir -p '${kCFPrefsFeatureFlagsDir}'`, `mv '${kUIKitDomainPrefsTemporaryPath}' '${kCFPrefsFeatureFlagsDir}'`, ].join(' && '), { administratorPrivileges: true, }, ).length == 0 ? '😃' : '🫤'; } 

6 Comments

Amazing, this has fixed it. Reboot after. Not sure why half the internet has decided to be so bullish about it being a design feature! If you want to run it via terminal/command line, you can save the file as a js file, then use: osascript whatever.js A password popup will appear, then show the smiley face if all goes well. As mentioned, reboot (maybe relog, reboot for good measure :)).
Yes! Thank you, @stephancasas. I asked this question some weeks ago over on Think Different. If you post an answer over there, even if it's just point here, I'd be happy to mark it as accepted. apple.stackexchange.com/questions/464717/…
Bonus question: The cursor still retains its accent-based color in Safari. Happen to know of trick to disable it there as well?
@benwiggy, I attached lldb to the CursorUIViewService process and started looking for caps lock-related instructions. Apple uses pretty consistent naming patterns for their symbols, so if you know what you want to achieve, you can narrow-down to the likely procedures in pretty short order. As for what process I knew to look debug, I go into detail on that here.
Just another piece of @stephancasas wizardry!
|
14
votes

You can try this to disable Input Source Switching Popup as of Dec 6, 2023:

  1. Open Terminal app and type:

    defaults write kCFPreferencesAnyApplication TSMLanguageIndicatorEnabled 0 
  2. Press Return and restart your machine afterwards.

1 Comment

No need to restart, just restart each app.
3
votes

Toggle in

Onyx – Parameters – Misc. - Show the caps lock indicator

and Deeper – Misc. - Show the caps lock indicator

https://www.titanium-software.fr/en/applications.html

OnyX 4.5.5

• Added option to hide or show the caps lock indicator https://www.titanium-software.fr/en/onyx_release.html

Deeper 3.0.4

• Added option to hide or show the caps lock indicator

https://www.titanium-software.fr/en/deeper_release.html

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.