Detecting continuous key presses with UIKeyCommand

前端 未结 4 1639
盖世英雄少女心
盖世英雄少女心 2021-02-01 22:58

Is it possible to get continuous key presses?

I\'m using keyCommands: to intercept the arrows keys being pressed on an external keyboard, but I only ge

4条回答
  •  無奈伤痛
    2021-02-01 23:27

    Pro tip - my arrow keys were blocked because I'd returned false from

    -(BOOL) canPerformAction:(SEL)action withSender:(id)sender 
    

    Make sure to check for your own selectors you've created.

提交回复
热议问题