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

To add comments, please log in or register
Marbo
434
Marbo  

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.

apirakkamjan
55
apirakkamjan  

SHIFT = 16

CTRL  = 17

Marbo
434
Marbo  
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?

apirakkamjan
55
apirakkamjan  
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...
Marbo
434
Marbo  
fxsaber
14148
fxsaber  
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); }
To add comments, please log in or register