how to disable J,K, & L keys in AVPlayerView?

Trying to customize AVPlayerView. Right now, J plays the video backwards, L plays it forwards. For the app I'm making, I'd like to disable these keys.

I thought the way to do this would be to subclass AVPlayerView. I found some code that allowed me to disable the scrollwheel, and it works. But when I try to use almost the same code to disable (in this case) the J key, the J key still plays the video backwards. Any idea what I should try? Thanks.

code so far: (I have this as a second class in my viewController file.)

Code Block
class CustomAVPlayerView : AVPlayerView
{
  override func scrollWheel(with event: NSEvent)
  {
    if self.superview != nil
    {
      self.nextResponder?.scrollWheel(with: event)
    }
  }
   
  override func keyDown(with event: NSEvent) {
    if self.superview != nil
    {
      if event.keyCode == 38
      {
        self.nextResponder?.keyDown(with: event)
      }
    }
  }
   
   
}


Ah, figured it out. I was close. You do subclass AVPlayerView. You must include this bit of code:

Code Block
override var acceptsFirstResponder: Bool {
      get {
        return true
      }
    }

and the big one is you then have to set in the storyboard the class in the identity inspector to this new custom class. Then... code such as...

Code Block
override func keyDown(with event: NSEvent) {
    if self.superview != nil
    {
     if event.keyCode == 124
     {
      print("right arrow")
     }
    }
   }

works! :]

how to disable J,K, & L keys in AVPlayerView?
 
 
Q