Solved the first responder issue in working but brutal way. Here’s what I learned:
The First Responder at the start of didSelect is an NSTextBox, presumably the search field.
The First Responder is set to the keyboard view.
The First Responder at the end of didSelect is confirmed to be the keyboard view.

I used an NSTimer to periodically print the First Responder, and found that some time after didSelect, it changes back to the mainView of the pref pane.
Interface builder has an outlet for the initialFirstResponder of the main window. I hypothesize that this has a default value that’s always set, even if you leave it unconnected.

How the fix works:
The AMKeyboardView class overrides the resignFirstResponder method. Returning NO blocks the First Responder from changing away from the AMKeyboardView.
A BOOL is initially set to NO, so as to block the FirstResponder from changing away from the AMKeyboardView.
An NSTimer is used to run an async task 1 second later, which changed the BOOL to YES, so that First Responder behaviour is restored to normal.

This is a sub-optimal solution, yes, but unless we can find what’s causing the First Responder change shortly after didSelect, there’s not much better I can do.

https://gist.github.com/amomchilov/d445ed791aba73925b49