Skip to content

Conversation

@direc85
Copy link

@direc85 direc85 commented Sep 27, 2025

I'm used to sending messages with Ctrl+Enter, but other users may prefer Shift+Enter or just plain Enter. Previously the option was just invertEnterKey boolean, which didn't allow any flexibility, so I replaced it with a three-choice option: Enter, Shift+Enter and Ctrl+Enter being the send message choices. Add newline combos are Shift+Enter, Enter and Shift+Enter respectively.

I ended up fixing the emoji/mention pop-up behavior as a side product. If any of the three combos are pressed, the pop-up is handled and the event is accepted. This makes it impossible to accidentally send the message if a pop-up is open.

If an Enter combo didn't match, it's passed to the next event handler.

The old invertEnterKey is migrated to the new sendMessageKey, so this change doesn't change the existing preference.

Tested with Linux only, but this should work fine with other platforms as well, thanks to Qt keypress abstraction.

Fixes: #1445 #788 if I'm not mistaken.

Previously the option was just `invertEnterKey` boolean, which didn't
allow any flexibility, so I replaced it with a three-choice option:
Enter, Shift+Enter and Ctrl+Enter being the send message choices.
Add newline combos are Shift+Enter, Enter and Shift+Enter respectively.

I ended up fixing the emoji/mention pop-up behavior as a side product.
If any of the three combos are pressed, the pop-up is handled and
the event is accepted. This makes it impossible to accidentally send the
message if a pop-up is open.

If an Enter combo didn't match, it's passed to the next event handler.

The old `invertEnterKey` is migrated to the new `sendMessageKey`,
so this change doesn't change the existing preference.
@direc85 direc85 force-pushed the send-message-key-selection branch from d65be87 to 451e88f Compare September 28, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

option to send message with strg+enter

1 participant