No, as I could not find the explanation about a bit mask describing the status of keyboard buttons for CHARTEVENT_KEYDOWN in MQL4 reference although I wondered what it is.
I assume that a bit mask describing the status of "Shift" key for CHARTEVENT_KEYDOWN and CHARTEVENT_MOUSE_MOVE are different.
If so, where I can find the bit mask of keyboard information for CHARTEVENT_KEYDOWN ?
No, as I could not find the explanation about a bit mask describing the status of keyboard buttons for CHARTEVENT_KEYDOWN in MQL4 reference although I wondered what it is.
I assume that a bit mask describing the status of "Shift" key for CHARTEVENT_KEYDOWN and CHARTEVENT_MOUSE_MOVE are different.
If so, where I can find the bit mask of keyboard information for CHARTEVENT_KEYDOWN ?
Simply try to Print(sparam) while pressing SHIFT / CTRL / ALT - key and monitor this sparam value.
You could also try to press L/M/R-mouse button.
enjoy
For your reference:
https://www.mql5.com/en/book/applications/events/events_keyboard

- www.mql5.com
No, as I could not find the explanation about a bit mask describing the status of keyboard buttons for CHARTEVENT_KEYDOWN in MQL4 reference although I wondered what it is.
I assume that a bit mask describing the status of "Shift" key for CHARTEVENT_KEYDOWN and CHARTEVENT_MOUSE_MOVE are different.
If so, where I can find the bit mask of keyboard information for CHARTEVENT_KEYDOWN ?
While reviewing forum topic MQL4 site automatically provided, which is Can I check if CTRL or SHIFT is pressed when using CHARTEVENT_KEYDOWN?.
I find the solution, so closing this topic.
Thank you for your support.

Simply try to Print(sparam) while pressing SHIFT / CTRL / ALT - key and monitor this sparam value.
You could also try to press L/M/R-mouse button.
enjoy
For your reference:
https://www.mql5.com/en/book/applications/events/events_keyboard
Thank you for sending useful site that covers full information of keyboard events.
I will keep digging into MQL site next time, believing an answer to my question must exist somewhere.
Hi
You can try with some “flags” and mask for OnChartEvent function. For example you can set some flag “shiftpressed” as true when shift button is pressed and then only if this flag is true, detect if “Z” button is pressed and only with that combination follow your chosen action. Of course you should add also deactivation of the flag as soon as key is released or other key is pressed, but with some programming skills it’s doable to code.
Have a nice day👍📊

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I've been looking for the answer to the captioned question, but been unable to find it so far.
CHARTEVENT_KEYDOWN can only pass code of a(one) pressed key by lparam. Thus it can not tell "shift + z" key input from "z" key input.
Is there any way to capture a set of two key inputs, like "Ctrl + a", "Shift + z", etc. to trigger an event ?
Any help would be appreciated.