By John Gruber
Jiiiii — All your anime stream schedules in one place.
Another bit of follow-up from yesterday’s piece on Catalyst apps and standard keyboard shortcuts. The Cocoa text editing system — which dates back to NeXTStep with a slew of standard shortcuts that date back to classic Mac OS (and Emacs!) — is incredibly rich and deep. UIKit follows much of it, but not all. (For example, on the Mac, Cocoa supports custom keybindings — a very powerful feature that lets you customize text editing shortcuts and have them work almost everywhere.)
This 2006 document by Jacob Rus remains an essential resource for anyone who wants to dig in. The good news about Catalyst: Catalyst apps just inherit these features and shortcuts automatically on the Mac. System-wide Services “just work” too, even though iOS doesn’t have them.
Douglas Hill, following up on my piece yesterday on scrolling with standard keyboard shortcuts in UIKit and Catalyst apps:
I wish this was the case, but unfortunately it is not. The standard UIKit scrolling class, UIScrollView, does not provide any keyboard-driven scrolling functionality. […]
What’s going on here is that Apple did not add support for Page Up and Page Down in UIKit: They added this in WebKit/Safari. Fortunately WebKit is open source so we can see how they did it. Developers need to use the undocumented input strings
UIKeyInputPageUp
andUIKeyInputPageDown
and write their own code to scroll up or down by the correct amount in response to those input events. While WebKit doesn’t support Home and End it’s possible to do some guessing: The stringsUIKeyInputHome
andUIKeyInputEnd
do in fact work.
Hill has an open source framework, KeyboardKit, to fill these gaps.