all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: emacs ctrl-m is RET. how to change for rebinding ?
Date: Sun, 02 Apr 2006 22:37:15 -0400	[thread overview]
Message-ID: <87slovjsiw.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.267.1143901196.2481.help-gnu-emacs@gnu.org

> But then, I discover that I bound "enter" to that function, cause Ctrl-m 
> is enter. How to solve this problem ? I want to insert newline with enter
> and do delete-backward-char with Ctrl+m.

When running in a tty, you don't get to choose: The `return' key sends a C-m
and that's all Emacs will ever see.

When running under X11, Emacs can indeed tell the difference.  The `return'
key is mapped to C-m via function-key-map, so all you need to do is to bind
[return] explicitly to a command like `newline' and the mapping to C-m will
not happen:

  (global-set-key [return] 'newline)


        Stefan

       reply	other threads:[~2006-04-03  2:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.267.1143901196.2481.help-gnu-emacs@gnu.org>
2006-04-03  2:37 ` Stefan Monnier [this message]
2006-04-03  3:30   ` emacs ctrl-m is RET. how to change for rebinding ? Johan Bockgård
2006-04-01 14:20 Stefan Horomnea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87slovjsiw.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.