key listener fix, cursor up/down inverted