List of Keycodes for CHARTEVENT_KEYDOWN?

 
I tried searching for C++ Keycodes but nothing came up for C++, just different languages. I noticed the MQL4 help manual offers some examples, but I couldn't even find the ones that match up with the following example in the help manual:

#define KEY_NUMPAD_5       12
#define KEY_LEFT           37
#define KEY_UP             38
#define KEY_RIGHT          39
#define KEY_DOWN           40
#define KEY_NUMLOCK_DOWN   98
#define KEY_NUMLOCK_LEFT  100
#define KEY_NUMLOCK_5     101
#define KEY_NUMLOCK_RIGHT 102
#define KEY_NUMLOCK_UP    104
 
user3822:
I tried searching for C++ Keycodes but nothing came up for C++, just different languages. I noticed the MQL4 help manual offers some examples, but I couldn't even find the ones that match up with the following example in the help manual:

Search Google for an ASCII table. You'll find most of the values there.

Or you can test keys for yourself:

void OnChartEvent(const int id, const long& lparam, const double& dparam, const string& sparam)
  {
   if(id==CHARTEVENT_KEYDOWN) Print(lparam);
  }
 
honest_knave:

Search Google for an ASCII table. You'll find most of the values there.

Or you can test keys for yourself:

void OnChartEvent(const int id, const long& lparam, const double& dparam, const string& sparam)
  {
   if(id==CHARTEVENT_KEYDOWN) Print(lparam);
  }
Gonna try it out now, thanks!
 
 
Andrii Medvediev #:

Thanks.

This is weird.

Why my value for w is 17? it should be 87?

 
toksis #:
This is weird.

Why my value for w is 17? it should be 87?

Because you need to check lparam and not sparam.
Reason: