This code snippet threw me for a loop trying to understand what "961" meant. After a good amount of digging I found the appearance numbers in the bluetooth spec, to see that 961 is 0x03C1 or "keyboard".
Add a comment to hopefully guide future readers.