Can I check if CTRL or SHIFT is pressed when using CHARTEVENT_KEYDOWN?

 

Hi guys,

I just used CHARTEVENT_KEYDOWN this way:

if (lparam=="A")...

Is it somehow possible to check if SHIFT and A are pressed? I didn't find anything about it in the MQL4 docs.

 

SHIFT = 16

CTRL  = 17

 
apirakkamjan:

SHIFT = 16

CTRL  = 17

Thanks! But I can't do it this:

if (lparam==16 && lparam=="A") ....

So how can I check if SHIFT and A are pressed together?

 
trigger a key press event?
trigger a key press event?
  • 2016.05.05
  • www.mql5.com
How can I program triggering a key press/event...
 

Great. Thank you!!

 
bool IsKeyEsc( void ) { return(::TerminalInfoInteger(TERMINAL_KEYSTATE_ESCAPE) < 0); }
bool IsKeyTab( void ) { return(::TerminalInfoInteger(TERMINAL_KEYSTATE_TAB) < 0); }
bool IsKeyCtrl( void ) { return(::TerminalInfoInteger(TERMINAL_KEYSTATE_CONTROL) < 0); }
bool IsKeyShift( void ) { return(::TerminalInfoInteger(TERMINAL_KEYSTATE_SHIFT) < 0); }