How can I do things while certain key pressed?
You may want to look into Action Mappings. You can see a simple sample of this in this tutorial. It sounds like you will probably want something similar to what is done in the tutorial, where you have a function that is triggered when the key is pressed (eg. turn a Bool on), and another that is triggered when the key is released (turn the Bool off). Then whenever the Bool is true, do whatever needs to be done while the key is down.
answered Jun 20 '14 at 09:40 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here