How to use UIKeyCommand
<p>I'm trying to select a row in a table view when a user presses the down arrow on a hardware keyboard. For now, I'm just trying to print a log, and I can't seem to get it to work. As per the other similar questions' answers, here's what I have so far:</p>

<pre><code>- (NSArray *)keyCommands {
UIKeyCommand *downArrowKeyCommand = [UIKeyCommand keyCommandWithInput:UIKeyInputDownArrow
                                                        modifierFlags:0
                                                               action:@selector(hardwareKeyboardDownArrowPressed)];

return @[downArrowKeyCommand];
}

- (BOOL)canBecomeFirstResponder {
return YES;
}

- (void)hardwareKeyboardDownArrowPressed {

NSLog(@"Down arrow pressed on external keyboard");

}
</code></pre>

<p>All help is appreciated!</p>