Page 1 of 1

November: Problems with chat and KeyPress events

Posted: 18 Dec 2017, 12:11
by Dommy
There are a few problems with chat and KeyPress event related to chat itself. These issues are stopping me and Reaby from making good working custom chat plugins.

1. KeyPress event doesn't always work while chat is hidden.

If you want to read KeyPress event for button bound by default to the chat key (T), you have random chance the event is going to be registered. This happens while player is spawned in TrackMania and generally in ShootMania. If player is spectating, event works correctly.

How to reproduce:
1. Launch TrackMania mode, be spawned for race, create manialink layer for testing.
2. Hide chat using ClientUI.OverlayHideChat = True;
3. Log all KeyPress events in the manialink.
4. Try pressing every other key, except T. All events are logged immediately.
5. Try pressing T. You will notice event is fired randomly.

2. Hiding chat in ShootMania doesn't hide input box shown after pressing T.
This is most likely the cause of the problem above. When you hide chat and press T, nothing happens in TrackMania, but in ShootMania the chat imput field is shown. Apparently this is why T KeyPress event doesn't work properly - input box (even if hidden in TM) has priority most of the time while pressing T.

Re: November: Problems with chat and KeyPress events

Posted: 18 Dec 2017, 12:48
by Miss
Problem with T might be a similar issue as pressing T in regular chats it would add the letter "t" to your chat message, dunno.