I have an NSCollectionView
which lives inside an NSViewController
. NSViewController
overrides the following:
class myViewController : NSViewController{
weak var collectionView : NSCollectionView!
public override keyDown(with event: NSEvent){
print("Key pressed.")
}
}
However, when collectionView.selectable = true
, the view controller no longer receives key down events. I have tried this several ways, and in each case I either capture key too many key events (for example when the view controller is not even in focus) or too few (I don't get they key events at all). Please advise.