November: Problems with chat and KeyPress events

Moderators: w1lla, NADEO

Post Reply
User avatar
Posts: 1811
Joined: 25 Aug 2011, 21:45
Location: Poland

November: Problems with chat and KeyPress events

Post by Dommy » 18 Dec 2017, 12:11

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.

User avatar
Posts: 1194
Joined: 05 Jan 2016, 11:34
Location: The Netherlands

Re: November: Problems with chat and KeyPress events

Post by Miss » 18 Dec 2017, 12:48

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.
Forum moderator, opinions are my own. :thx:
Check out Image openplanet, the alternative Maniaplanet scripting platform! (Openplanet subforum)
I also stream on Twitch and tweet on Twitter.

Post Reply

Return to “Maniaplanet Reports”

Who is online

Users browsing this forum: No registered users and 2 guests