unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: M-RET ok, C-RET wrong?
@ 2024-08-24 10:06 Kepa via Users list for the GNU Emacs text editor
  2024-08-24 10:16 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Kepa via Users list for the GNU Emacs text editor @ 2024-08-24 10:06 UTC (permalink / raw)
  To: Kepa via Users list for the GNU Emacs text editor

> From:     Eli Zaretskii
> Subject:     Re: M-RET ok, C-RET wrong?
> Date:     Sat, 24 Aug 2024 12:30:13 +0300
>
> > From: Arash Esbati <arash@gnu.org>
> > Cc: help-gnu-emacs@gnu.org
> > Date: Sat, 24 Aug 2024 09:56:57 +0200
> >
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> > >> From: Arash Esbati <arash@gnu.org>
> > >> Date: Sat, 24 Aug 2024 09:16:04 +0200
> > >>
> > >> Eli Zaretskii <eliz@gnu.org> writes:
> > >>
> > >> > I think that's because RET is actually C-m, and you cannot have two
> > >> > Ctrl modifiers on the same key.
> > >>
> > >> (key-valid-p "C-RET") => t
> > >
> > > Ha!
> > >
> > >> @Kepa: What do you get with:
> > >>
> > >> (keymap-set dired-mode-map "C-RET" 'dired-w32explore)
> > >
> > > I'm not Kepa, but I get the same result.  Although I actually tried
> > >
> > >    (keymap-set global-map "C-RET" 'dired)
> >
> > I can confirm this with your recipe as well.  So this is a deficiency in
> > `key-valid-p'?
>
> I guess so.  Patches welcome to fix that.

A couple of additional details, in case they are helpful:

1. Keyboards usually have two RET keys: one near the letters and one on 
the numpad. I receive two different messages when using each of them:

     C-<return> is undefined (letters)
     C-<enter> is undefined (numpad)

2. C-RET works in org-mode, where the following keybinding exists (I 
believe by default):
     Key Bindings: org-mode-map C-<return>

Best regards!


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: M-RET ok, C-RET wrong?
@ 2024-08-24 10:22 Kepa via Users list for the GNU Emacs text editor
  2024-08-24 12:43 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Kepa via Users list for the GNU Emacs text editor @ 2024-08-24 10:22 UTC (permalink / raw)
  To: Kepa via Users list for the GNU Emacs text editor

> From:     Eli Zaretskii
> Subject:     Re: M-RET ok, C-RET wrong?
> Date:     Sat, 24 Aug 2024 13:16:12 +0300
>
> > Date: Sat, 24 Aug 2024 12:06:23 +0200
> > From:  Kepa via Users list for the GNU Emacs text editor
> > <help-gnu-emacs@gnu.org>
> >
> > 1. Keyboards usually have two RET keys: one near the letters and one on
> > the numpad. I receive two different messages when using each of them:
> >
> >      C-<return> is undefined (letters)
> >      C-<enter> is undefined (numpad)
>
> in my case the second on is identified as C-<kp-enter> instead.

Just if it's useful: M-RET doesn't work with the numpad RET.



^ permalink raw reply	[flat|nested] 10+ messages in thread
* M-RET ok, C-RET wrong?
@ 2024-08-24  4:51 Kepa via Users list for the GNU Emacs text editor
  2024-08-24  6:21 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Kepa via Users list for the GNU Emacs text editor @ 2024-08-24  4:51 UTC (permalink / raw)
  To: Kepa via Users list for the GNU Emacs text editor

Hello,



I’m experiencing strange behavior when setting a keybinding.

C-RET keybinding does not work for me, and I have had to use C-<return>, although M-RET does work:

This doesn’t work:

(define-key dired-mode-map (kbd "C-RET") 'dired-w32explore)

I receive this message:

C-<return> is undefined


This works, though:

(define-key dired-mode-map (kbd "C-<return>") 'dired-w32explore)

This works too:

(define-key dired-mode-map (kbd "M-RET") 'dired-create-directory)


GNU Emacs 29.3 (build 2, x86_64-w64-mingw32) of 2024-03-24


Best regards

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

end of thread, other threads:[~2024-08-24 12:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-24 10:06 M-RET ok, C-RET wrong? Kepa via Users list for the GNU Emacs text editor
2024-08-24 10:16 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2024-08-24 10:22 Kepa via Users list for the GNU Emacs text editor
2024-08-24 12:43 ` Eli Zaretskii
2024-08-24  4:51 Kepa via Users list for the GNU Emacs text editor
2024-08-24  6:21 ` Eli Zaretskii
2024-08-24  7:16   ` Arash Esbati
2024-08-24  7:33     ` Eli Zaretskii
2024-08-24  7:56       ` Arash Esbati
2024-08-24  9:30         ` Eli Zaretskii

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).