isamert / scli

a simple terminal user interface for signal messenger (using signal-cli)
GNU General Public License v3.0
449 stars 39 forks source link

Insert newline keybinding #165

Closed mark2185 closed 2 years ago

mark2185 commented 2 years ago

Alt+Enter inserts a newline in message composing input field.

Is it possible to make this configurable?

Using i3 and my Alt+Enter is already taken so I would prefer this to be something like Shift+Enter, like it is in many other applications.

EDIT: I see this is related to #111 but it looks forgotten/abandoned?

exquo commented 2 years ago

Shift + Enter won't be usable in most terminal emulators - it's passed to applications as just Enter: https://github.com/isamert/scli/issues/92#issuecomment-729665237.

The #111 is not abandoned, just postponed :). It's on the 'next things' list though, along with sending the read receipts.

In the meantime, as a hack you can edit the meta enter in line https://github.com/isamert/scli/blob/master/scli#L2808 to whatever you want. Or even pull #111 and add to your sclirc: bind=input_new_line:meta n (or any other key combo). The PR should already work, it's just not fully implemented and tested for all keys.

vargn commented 2 years ago

I also encountered this issue with i3, my solution was to use the escapekeys mode.

bindsym $mod+apostrophe mode "escapekeys"

mark2185 commented 2 years ago

@zer0lean that's smart, nice thinking outside the box!

I presume this can be closed since I was given 3 different solutions, one of which is in an open PR.

Thanks!