Use last-command-event instead which works in ttys