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.
November: Problems with chat and KeyPress events
- Dommy
- Translator
- Posts: 1866
- Joined: 25 Aug 2011, 21:45
- Manialink: exchange
- Location: Poland
- Contact:
November: Problems with chat and KeyPress events
Ryzen 7 2700X, GTX 1070 Ti, 16 GB RAM, Windows 10 Insider Build
FORUM MODERATOR • CREATOR OF SHOOTMANIA GALAXY & TRACKMANIA² PURSUIT
Contact me via GALAXY & PURSUIT DISCORD
FORUM MODERATOR • CREATOR OF SHOOTMANIA GALAXY & TRACKMANIA² PURSUIT
Contact me via GALAXY & PURSUIT DISCORD
Re: November: Problems with chat and KeyPress events
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.
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own.
Check out
openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
Forum moderator, opinions are my own.

Check out

I also stream and tweet.
Who is online
Users browsing this forum: No registered users and 3 guests