profanity-im / profanity

Ncurses based XMPP client
https://profanity-im.github.io/
Other
1.33k stars 188 forks source link

Handle alt+enter as newline char #1927

Closed H3rnand3zzz closed 1 year ago

H3rnand3zzz commented 1 year ago

See commit message.

How to test functionality

Write a message and use alt+enter during writing to put a new character symbol there. Plain "Enter" for sending message/command should work as well as before.

Why alt+enter?

Well, you see, shift+enter and ctrl+enter aren't that bindable, as you can see by using showkey --ascii command. Though shift/ctrl variants might be more preferable since they are used in some popular applications, we just can't bind on them using GNU Readline, while alt+enter does the work as well.

I will be glad if someone can improve the solution to take keybinding from preference and allow custom settings for ctrl+enter, shift+enter etc. Though even current solution will suffice in terms of functionality and you can get used to it quite quickly.

H3rnand3zzz commented 1 year ago

Should be mentioned in the keybinding section in docs/profanity.1 as well.

Done, thx for quick review :)