[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why [(return)] does not catch <return> in a console ?

From: Kai Großjohann
Subject: Re: Why [(return)] does not catch <return> in a console ?
Date: Mon, 17 Feb 2003 16:51:34 +0100
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (François Fleuret) writes:

> I am writing a major-mode, and I need to associate something to
> 'return'. The following line :
> (define-key mp3play-mode-map [(return)] 'mp3play-play)
> works fine if I run emacs in a window under X, but does not in a
> console.  What is the standard symbol for the 'return' key ?

On a tty, Emacs cannot tell the difference between C-m and <return>,
as the tty converts the latter to the former.

I suggest to use (kbd "RET"), that's the same syntax as the output
from C-h k and friends.  You can also use "\r" instead.

(define-key mp3play-mode-map (kbd "RET") 'mp3play-play)

A turnip curses Elvis

reply via email to

[Prev in Thread] Current Thread [Next in Thread]