changing keyup to keydown

This is a basic fix for this issue.