A NSTableView doesn’t receive the space bar keyboard event.
When I press keyUp or keyDown the selection changes correctly, but I’m not able to check/uncheck the checkbox in the first column by pressing the space bar.
Since the arrow keys work correctly, I assume the events are correctly received by the NSTableView.
Also, I’ve just checked for any delegate method in my code, that could interfere:
- (void)sendEvent:(NSEvent *)event;
- (BOOL)handleEvent:(NSEvent *)event;
- (void) keyDown:(NSEvent *)event;
and commented them out, but the space bar still doesn’t work.
Thanks
I’ve actually found out the reason. It is not true that the space bar is checking the table items by default.
It works only if Systems Preferences > Keyboard > KeyBoard Shortcuts > All Controls radio button is selected.