If the chart doesn't have focus, you shouldn't be trying to catch them. The terminal is processing them. Do you really want to override all keyboard short cuts of the terminal?
If the chart doesn't have focus, you shouldn't be trying to catch them. The terminal is processing them. Do you really want to override all keyboard short cuts of the terminal?
Why not ? If a gui element has the focus its not unusual to catch key strokes. I can ignore them end let them processed by another window.
If the chart doesn't have focus, you shouldn't be trying to catch them. The terminal is processing them. Do you really want to override all keyboard short cuts of the terminal?
And why this means that i need to override all ? The chart is the parent window. As i can't directly handle events for each client in this parent,
it is suitable to provide events in OnChartEvent, in particular when this function provides several params to identify the element.
In OnChartEvent, i have the option to handle it or not.
I really don't understand the design of this. For me, it is, in comparison to Win32 API in some, cases very strange which just forces you
to make time expensive workarounds (like focus or lbutton up event, which has to be catched by checking button pressed and mouse move).

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
when you focus an OBJ_EDIT.
Please have a look on this code:
Function do_something is not called, when the focus is on a OBJ_EDIT field and press a key.
When i click on the chart, then press a key again, the function is called.
Anyone has an idea how to catch keytrokes, when the focus is not in the chart ?
(.mql4)
Thank you