A call to MessageBox() make subsequent calls to TerminalInfoInteger(TERMINAL_KEYSTATE_*) return incorrect result? - page 2

 
Andriy Moraru #: Some more testing showed that the bug is present in both Build 1353 and Build 1355, while it is absent in MT5/MQL5.

I can confirm that on MetaTrader 4 build 1356 that the behaviour you have described is happening on my setup as well.

However, since I have never used these terminal states before and don't know the meaning of the returned values (-128,-127, 0, 1) I can offer no comment on whether it is the expected behaviour or not.

All I can do is confirm that the behaviour you observe has been replicated on my end with your code.