all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.