Thanks a lot Peter, I feel like a real idiot, but that worked and I am ashamed for not picking that up sooner. Moving the variable declaration out of the function along with assigning the keyboard event listener to the stage and not the view solved my problem.
Many thanks with this, very much appreciated :)
