Separated get_gesture function into two functions

The list of keys only needs to be made once per game.