#3494: <enter> cannot be bound (only <return>)
---------------------+----------------------
Reporter: rafael | Owner: mutt-dev
Type: defect | Status: new
Priority: major | Milestone:
Component: mutt | Version: 1.5.21
Resolution: | Keywords: patch
---------------------+----------------------
Old description:
> This bug has been reported to debian at http://bugs.debian.org/cgi-
> bin/bugreport.cgi?bug=547661 . I tried it and I could reproduce it as
> well. I even compiled the official version and still the error was
> reproducible there.
>
> The problem happens when I try to bind \Cj, mutt interprets that as
> <Return>. Even if execute ``bind -r '\C-j''' in my shell first, I still
> get the same error. I used mutt's what-key function and both C-j and
> <Return> report: Char = <Return>, Octal = 12, Decimal = 10
>
> There was one person on Debian's bug report who couldn't reproduce the
> bug. So I suspect it might be related to the terminal or the shell. I'm
> using rxvt-unicode (urxvt) v9.07 and bash 4.1.5, both stock from Debian
> squeeze repository. Though I've also tried from tty and xterm using both
> csh and bash.
>
> I made a small curses program (it's attached) that reads a key press and
> prints the character. Running it in my setup gives me 10 for C-j and 13
> for <Return>. Afaik 10 is the character of \n and 13 is the character
> number for \r. So I guess I can see where the confusion arises from. But
> note how that differs from what-key output.
New description:
This bug has been reported to debian at http://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=547661 . I tried it and I could reproduce it as
well. I even compiled the official version and still the error was
reproducible there.
The problem happens when I try to bind \Cj, mutt interprets that as
<Return>. Even if execute ``bind -r '\C-j''' in my shell first, I still
get the same error. I used mutt's what-key function and both C-j and
<Return> report: Char = <Return>, Octal = 12, Decimal = 10
There was one person on Debian's bug report who couldn't reproduce the
bug. So I suspect it might be related to the terminal or the shell. I'm
using rxvt-unicode (urxvt) v9.07 and bash 4.1.5, both stock from Debian
squeeze repository. Though I've also tried from tty and xterm using both
csh and bash.
I made a small curses program (it's attached) that reads a key press and
prints the character. Running it in my setup gives me 10 for C-j and 13
for <Return>. Afaik 10 is the character of \n and 13 is the character
number for \r. So I guess I can see where the confusion arises from. But
note how that differs from what-key output.
--
Comment (by kevin8t8):
@dgc, I'd appreciate your input on this.
It looks like the patch maintains the default \r and \n bindings.
However, I worry about confusion that could be caused by this. Someone
who wants to rebind the behavior of their return key could get quite
confused which they want to rebind.
Would have to do both for consistent behavior across platforms, or does
adding the nonl() fix this problem?
--
Ticket URL: <https://dev.mutt.org/trac/ticket/3494#comment:6>
Mutt <http://www.mutt.org/>
The Mutt mail user agent