25 September 2017
On iOS, if you connect a hardware keyboard, you can actually open Spotlight Search and navigate between search results without ever touching the screen.
KeyboardNavigationKit provides the same behaviour as a framework for any developer to add similar interactions to table views in their own applications. Check out the source on Github.
Use the up and down arrow keys to adjust the focused row. Press Enter to select a focused cell. Check the video for visual examples.
I’m very happy to finally be able to contribute to open-source iOS development with my first open-source Swift framework.
KeyboardNavigationKit is used within Visual Codes right now, so it’s tested in shipping applications. Ultimately third-party implementations of keyboard focus will not be necessary, as UIKit will provide system implementations (
UIFocusEngine is almost there already, but it’s tvOS only) as the iPad becomes more of a macOS replacement.
Feedback is very much welcomed. I am aware that documentation and example code is very much lacking. It’s on the to-do list. Shipping this fulfils a goal of mine I’ve had since the end of 2016, so here it is. I hope it is useful to someone.