3 ms·
I have frequently encountered the fallout from the problem the article mentions with the way that osx handles alt-character input. Specifically with emacs styl
by breatheoften 10y ago
I have frequently encountered the fallout from the problem the article mentions with the way that osx handles alt-character input.
Specifically with emacs style character manipulation modifiers -- alt-b and alt-f. In older versions of OS X -- I think pre snow leopard although I can't remember the exact version which first included the change -- the alt-b and alt-f characters were bound by default system wide (I think this mechanism is part of CoreText maybe?) to emacs style forward-word and backward-word. At some point OS X changed to turn all these alt-key combos into Unicode characters for the given keyboard language. This made the forward word and backward word behavior no longer available system wide at all text editing points.
OS X allows customizing the keyboard handling to invoke this operation (~/Library/KeyBindings/DefaultKeyBinding.dict). Meanwhile Applications (mainly those targeting programmers) layered on their own way to provide this familiar behavior within their own text editing context -- and Things break down in a variety of application specific ways. Workarounds to get back the closest thing to the old universal binding become irksome to find and maintain compatibility across applications ...
I'd really like to see apple add a new key to the keyboard specifically for system-wide implementation of operations that "invoke commands to manipulate text buffers/selection while editing text buffers" -- and perhaps include an extension point to allow new functionality to be defined for manipulating text buffers system wide. The mechanism for defining bindings from keyboard to action for this setup should be an abstract statement about the relative physical position of the modifier and target key -- so that the same muscle memory works (or approximates working in a way that preserves universal muscle memory) for all keyboard input languages.
A whole lot of text editor functionality is about muscle memory around character manipulation -- as a programmer I want a system-wide mechanism for allowing muscle memory to most efficiently enhance text manipulation in as many text editing contexts as possible ...
Solving the problem this way would create a single uniform-across-languages keybinding space for the most frequently used keyboard shortcuts. If this idea were implemented many of the most annoying problems with keybinding inconsistency across applications would eventually go away I think ...
- arm 10y ago“Specifically with emacs style character manipulation modifiers -- alt-b and alt-f. In older versions of OS X -- I think pre snow leopard although I can't remember the exact version which first included the change -- the alt-b and alt-f characters were bound by default system wide (I think this mechanism is part of CoreText maybe?) to emacs style forward-word and backward-word. At some point OS X changed to turn all these alt-key combos into Unicode characters for the given keyboard language. This made the forward word and backward word behavior no longer available system wide at all text editing points.” I don’t believe that was ever the case. ⌥B and ⌥F were never bound to an Emacs-style forward-word and backward-word, even back in the pre-Leopard days (from what I remember). You may be confusing it with ⎈B and ⎈F (⌃B and ⌃F), which move backwards and forwards by one ‘character’, respectively, and still work even on the newest versions of macOS. If you actually do want to move between words, then the keyboard shortcuts ⌥← and ⌥→ have always done that, and work across every app that uses Cocoa text fields.
- breatheoften 10y agoIt definitely was bound to that behavior in some version of OS X -- may have been even older, I think it changed around 2008 or 2009. I used the binding all the time in mail and safari until the default binding changed. And it drove me so crazy to lose the capability that I had to figure out the (incomplete) workaround. The left and right arrow keystrokes also always worked however require moving hands from keyboard and are less efficient to intersperse with other key strokes.