Listen for keycodes an react with a function.