[GH-ISSUE #62] [Enhancement] Support (more) readline hotkeys when composing emails #56

Closed
opened 2026-03-03 01:19:26 +03:00 by kerem · 3 comments
Owner

Originally created by @sc0ttj on GitHub (Nov 22, 2020).
Original GitHub issue: https://github.com/d99kris/nmail/issues/62

Originally assigned to: @d99kris on GitHub.

In my terminal, I am able to do stuff like like Alt-f (skip forward a word), Alt-b (skip back a word), which are the readline "emacs style" defaults.

I notice that some of these readline hot keys do work with nmail, such as Ctrl-K (delete whole line).

I also have Alt-left, Alt-right set to skip whole words in my ~/.inputrc (in addition to the default hot keys, some of which I listed above)

However: When I use Alt, Ctrl or Shift with cursor/arrow keys, or even Alt-f and Alt-b, then nmail prints stuff like this:

ȫȈȜȫȱȜȫȜȱȫȜȫȈȜȩȆȚȩȯȚȩȯȚȆȚȩȯȚȩhiuigyftyyƉƉƉƒƒƒƉƉőőőŐŐ

It would be nice if nmail respected the readline settings, or at least provided some of its own, similar hot keys.

Specifically, it would be nice to skip whole words (back & forward) and delete whole words (back and forward, with Alt-delete and Alt-backspace).

Originally created by @sc0ttj on GitHub (Nov 22, 2020). Original GitHub issue: https://github.com/d99kris/nmail/issues/62 Originally assigned to: @d99kris on GitHub. In my terminal, I am able to do stuff like like `Alt-f` (skip forward a word), `Alt-b` (skip back a word), which are the `readline` "emacs style" defaults. I notice that _some_ of these readline hot keys do work with nmail, such as Ctrl-K (delete whole line). I also have `Alt-left`, `Alt-right` set to skip whole words in my `~/.inputrc` (in addition to the default hot keys, some of which I listed above) However: When I use `Alt`, `Ctrl` or `Shift` with cursor/arrow keys, or even `Alt-f` and `Alt-b`, then `nmail` prints stuff like this: ``` ȫȈȜȫȱȜȫȜȱȫȜȫȈȜȩȆȚȩȯȚȩȯȚȆȚȩȯȚȩhiuigyftyyƉƉƉƒƒƒƉƉőőőŐŐ ``` It would be nice if nmail respected the readline settings, or at least provided some of its own, similar hot keys. Specifically, it would be nice to skip whole words (back & forward) and delete whole words (back and forward, with Alt-delete and Alt-backspace).
kerem closed this issue 2026-03-03 01:19:27 +03:00
Author
Owner

@d99kris commented on GitHub (Nov 23, 2020):

Hi @sc0ttj - thanks for reporting this.

Yeah, the built-in compose editor in nmail is all but fantastic. Early on I added a functionality to compose in external $EDITOR by pressing CTRL-e for this reason.

I can agree it makes sense to support some more basic key shortcuts. Let me take a look at this and see what can be supported with reasonable effort.

<!-- gh-comment-id:732129356 --> @d99kris commented on GitHub (Nov 23, 2020): Hi @sc0ttj - thanks for reporting this. Yeah, the built-in compose editor in `nmail` is all but fantastic. Early on I added a functionality to compose in external `$EDITOR` by pressing `CTRL-e` for this reason. I can agree it makes sense to support some more basic key shortcuts. Let me take a look at this and see what can be supported with reasonable effort.
Author
Owner

@sc0ttj commented on GitHub (Nov 23, 2020):

Thanks 👍

A quick win might be to add just

Alt-left,
Alt-right,
Alt-backspace,
Alt-delete

...as I doubt any users of any language are expecting to see stuff like ȫȈȜȫȱȜȫȜȱȫȜȫȈȜȩȆȚȩȯȚȩȯȚ when using those combinations.. Then you could ignore readline entirely.. Just a thought, obvs..

<!-- gh-comment-id:732424542 --> @sc0ttj commented on GitHub (Nov 23, 2020): Thanks :+1: A quick win might be to add just Alt-left, Alt-right, Alt-backspace, Alt-delete ...as I doubt any users of any language are expecting to see stuff like `ȫȈȜȫȱȜȫȜȱȫȜȫȈȜȩȆȚȩȯȚȩȯȚ` when using those combinations.. Then you could ignore readline entirely.. Just a thought, obvs..
Author
Owner

@d99kris commented on GitHub (Nov 28, 2020):

I've implemented support for the keyboard shortcuts suggested in the last comment. I've only tested in Ubuntu gnome-terminal and macOS Terminal.app, where the default keyboard config should work correctly. Other environments may need manual configuration in ui.conf. See the README.md for details.

Please let me know if you encounter any issues. Thanks!

<!-- gh-comment-id:735223699 --> @d99kris commented on GitHub (Nov 28, 2020): I've implemented support for the keyboard shortcuts suggested in the last comment. I've only tested in Ubuntu `gnome-terminal` and macOS `Terminal.app`, where the default keyboard config should work correctly. Other environments may need manual configuration in `ui.conf`. See the `README.md` for details. Please let me know if you encounter any issues. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nmail#56
No description provided.