unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Why [(return)] does not catch <return> in a console ?
@ 2003-02-17 15:10 François Fleuret
  2003-02-17 15:51 ` Kai Großjohann
  0 siblings, 1 reply; 2+ messages in thread
From: François Fleuret @ 2003-02-17 15:10 UTC (permalink / raw)


Hi,

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 ?

Thanks in advance,

FF

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Why [(return)] does not catch <return> in a console ?
  2003-02-17 15:10 Why [(return)] does not catch <return> in a console ? François Fleuret
@ 2003-02-17 15:51 ` Kai Großjohann
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Großjohann @ 2003-02-17 15:51 UTC (permalink / raw)


francois.fleuret@noos.fr (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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-17 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-17 15:10 Why [(return)] does not catch <return> in a console ? François Fleuret
2003-02-17 15:51 ` Kai Großjohann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).