I am writing a game for Mac OS in Swift 3 with SpriteKit and GameplayKit. I already have created a method to capture keyboard press events and can control my character on the map. Sprite is moving using MovementComponent which is applying movement action on every Update if a keyboard event is recorded. However there is a delay in character movement right after the first key press. The moment I press and hold an arrow key my character moves for the duration of the standard movement action but then there is a delay before it continues to move as there is about .5 delay before keyboard will start repeat cycle after the first keypress. My question is: how can I change the keyboard repeat rate or remove this delay while my game is running or is there a better way to implement continuous movement controlled via keyboard in a mac game?
Thank you all in advance.