Strange problem on new system with <Enter> versus <Return> (or linefeed versus carriage return)
Jon LaBadie
mutter at jgcomp.com
Thu May 9 22:06:53 UTC 2024
On Thu, May 09, 2024 at 05:59:39PM +0200, Dennis Preiser wrote:
>On Thu, May 09, 2024 at 04:24:56PM +0100, Chris Green wrote:
>> I have the following in muttrc so that hitting 'Enter' (the CR key) on
>> the keyboard sends an E-Mail after composing it:-
>>
>> bind compose \n send-message # rather than 'y'
>>
>> This works as intended on the old system but not on the new system, it
>> would seem that mutt sees the 'Enter' key as CR (0x0d) on the new
>> system whereas on the old system it sees it as LF (0x0a).
>> Can anyone explain why this is and, more to the point, tell me how to
>
>>From the documentation:
>
>| 6.2. Enter versus Return
>|
>| Prior to version 2.2, Mutt used a default ncurses mode (“nl()”). This
>| mode maps keyboard input of either <Enter> or <Return> to the same
>| value, which Mutt interpreted as <Return> internally.
>|
>| However, starting in version 2.2, this mode is turned off, allowing
>| <Return> and <Enter> to be mapped separately, if desired. The default
>| keyboard mappings set both, but you can override this or create new
>| bindings with one or the other (or both).
>|
>| Note that in terminal application, such as Mutt, <Enter> is the same as
>| “\n” and ^J; while <Return> is the same as “\r” and ^M.
Kudos to the document writers! It is nice to see readable
and complete documentation.
>
>> fix it?
>
>
> bind compose \r send-message # rather than 'y'
--
Jon H. LaBadie jon at labadie.us
154 Milkweed Dr (540) 868-8052 (H)
Lake Frederick, VA 22630 (703) 935-6720 (M)
More information about the Mutt-users
mailing list