Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat issues #2061

Open
MrAlaux opened this issue Nov 30, 2024 · 9 comments
Open

Chat issues #2061

MrAlaux opened this issue Nov 30, 2024 · 9 comments

Comments

@MrAlaux
Copy link
Collaborator

MrAlaux commented Nov 30, 2024

Tested in the latest master artifact (Win-64).


Chat macros prevent me from typing certain characters

My keyboard layout has some characters that can be typed by pressing a given key while holding Ctrl + Alt (e.g. Ctrl + Alt + 3 for #). However, Alt is also used for the chat macros, whose code comes before the normal input code. Not sure if something reasonable could be done about this.


Backspace doesn't work with native keyboard mapping

Simple as that. Disabling vanilla_keyboard_mapping makes backspace work again.


Input lock-ups when holding Alt while in the chat

If I hold Alt while the chat is active, pressing non-number keys will perform their action normally (e.g. pressing W without holding Alt types said character into the chat, but pressing W while holding Alt will move me forward). If I let go of Alt while holding said other keys, they'll become locked and continue performing their action until I press them again "properly" (i.e. through this Alt bug or by exiting the chat and pressing them).

@rfomin
Copy link
Collaborator

rfomin commented Nov 30, 2024

#2063 should fix issues. Thanks for testing, but it's tempting to remove chat macros. Does anyone use them?

@MrAlaux
Copy link
Collaborator Author

MrAlaux commented Nov 30, 2024

it's tempting to remove chat macros. Does anyone use them?

I don't know, really, but I think they're worth keeping.

@fabiangreffrath
Copy link
Owner

How about this? We do not accept chat macros in the middle of a chat message:

--- a/src/st_widgets.c
+++ b/src/st_widgets.c
@@ -396,7 +396,7 @@ boolean ST_MessagesResponder(event_t *ev)
     else
     {
         // send a macro
-        if (altdown)
+        if (altdown && chatline.pos == 0)
         {
             int ch = (ev->type == ev_keydown) ? ev->data1.i : 0;
 

@rfomin
Copy link
Collaborator

rfomin commented Dec 1, 2024

How about this? We do not accept chat macros in the middle of a chat message:

But Choco/Vanilla allows the sending of macros in the middle of a chat message.

@fabiangreffrath
Copy link
Owner

Yes, but it doesn't serve any purpose.

@rfomin
Copy link
Collaborator

rfomin commented Dec 1, 2024

Chat macros don't serve any purpose either 😆

I think we should just merge #2063 for now.

@fabiangreffrath
Copy link
Owner

I think we should just merge #2063 for now.

Yes, definitely, I have already approved it.

My idea was about @MrAlaux's case with # being printed with Ctrl+Alt+3 which in turn triggers chat macro 3 in the middle of a chat message.

@MrAlaux
Copy link
Collaborator Author

MrAlaux commented Dec 1, 2024

On that note, I didn't realize to mention that there are other such Ctrl + Alt combos where the third key isn't a number (e.g. Ctrl + Alt + the key next to P for [); those are simply ignored in the latest master.

Just like # and [, the rest of characters that require that combo are rather-unimportant symbols, so this isn't critical. I would assume that other keyboard layouts also put uncommon (if not language-specific) symbols behind the combo, but I don't know for sure.

@fabiangreffrath
Copy link
Owner

These cases should also be fixed by the little patch I posted above, at least if you don't try to post one of the special combos as the first character in a chat string.

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

No branches or pull requests

3 participants