Emacs 24.3 removed variable last-command-char. Changed to last-command-event.