6 ms·
Customizing the Cocoa Text System (2006)
- littlecosmic 5y agoIt's easy to forget that this little beast is all pervasive and can be customised so much. Every time I set up a new Mac, I feel happy it is here, but scared that one day it will just stop working. The perils of closed source, I guess.
- DennisP 5y agoFor a while I was keenly interested in replacing the underlying text model with my own class, to support some weird stuff I wanted to do. It seemed like it would be straightforward, given the MVC structure, but the documentation confused me and I never quite figured it out. It didn't seem to be something Apple expected anyone to do.
- littlecosmic 5y agoFor sure. The whole thing feels like a happy accident that fell out of how NextStep was built.
- nateroling 5y agoSadly, Catalyst apps seem to use a different text system, which is not customizable.
- littlecosmic 5y agoThanks for the heads up. My most used feature is a simple remapping of 'backwards delete word', which still seems to work.
- kccqzy 5y agoReally? The built-in Stocks app is a Catalyst app AFAIK. My text system customizations still work in the search bar of the Stocks app.
- nateroling 5y agoWell that’s interesting. Maybe it’s changed? Messages was not using my customizations last I tried…
- gradys 5y agoI would love to hear about the customizations my fellow HN readers use.
- ultrarunner 5y agoOne of the first things I set up on a new Mac is option-f to move-word-forward and option-b to backward. This is so useful that I am doomed to typing ƒ on every other Mac I use temporarily
- masklinn 5y agoDo you also update your shell and emacs keybindings to match? Or do you use option as meta in emacs to start with, and forego all the native option chords?
- ultrarunner 5y agoYes, although I don't spend much time in emacs anymore
- stefanfisk 5y agoIsn’t that supported by default using alt-left/right?
- anchpop 5y agoWhen I switch between mac and windows I'm always getting those confused (on windows the same is ctrl-left/right). Any advice?
- littlecosmic 5y agoWhen I was at uni I took Steve Yegge's Effective Emacs post to heart (https://sites.google.com/site/steveyegge2/effective-emacs https://sites.google.com/site/steveyegge2/effective-emacs), now my most used tweak is: "^w" = (deleteWordBackward:);
- bluedino 5y agoI don't know what it is about it, but having came from Win32 and going to Cocoa (in 2008 or so), it just felt like an amazingly well engineered set of API's. Everything was so fancy and elegant, while Windows felt like hack on top of hack.
- mpweiher 5y agoImagine how it felt in the early 90s!
- pjmlp 5y agoUnfortunately it still does, they had a nice thing going with WinRT, .NET Native and C++/CX, and they just messed it all up. Now imagine the experience porting a NeXTSTEP app into MFC back in the the Windows 98 glory days.
- 2ion 5y agoIf the state of current (10/11) Windows UI and UX is any indicator it must have gotten much worse since 2008. I would never have done anything that shows a GUI on Windows hadn't I had access to Qt to absolve me from that hell.
- mbforbes 5y agoI was shocked and delighted to find that, after pairing a Bluetooth keyboard to my iPhone, the default emacs-lite Cocoa keybindings work there too. C-a to beginning of line, C-e to end, etc.
- masklinn 5y agoAm i just missing something or do the “command” shortcuts don’t work? Is there an option to enable? Being able to quickly type text via a real keyboard is quite neat (except for C-Spc switching the input method, turns out I hit that quite a lot), but having to get back to the phone in order to cut/copy/paste is quite frustrating.
- Synaesthesia 5y agoThey do work, including copy, paste, cut, undo ... cmd-h to go to home screen ... theres a lot
- masklinn 5y agoHuh, you're right, it seems to be just some applications which behave oddly and break those shortcuts, I guess I'll have to take it up with them.
- coolandsmartrr 5y agoInsert (2006) in title?
- legulere 5y agoI’m still annoyed by the fact that you cannot remap caps lock to backspace.
- adamfeldman 5y agoI did this via an OSS app https://karabiner-elements.pqrs.org/ https://karabiner-elements.pqrs.org/
- rado 5y agoAny idea how to fix keyboard input switching, which doesn't respect each app's language? There is an option to keep each app's text input source, but it works only when an app has a text input field focused. It's my only serious issue with macOS for 17 years now.