Hi Theo,
I will try to explain a bit and I hope you can understand. It's not because I know everything, far of this.
What is really nice when user do not desists and try by theirselves digging the HMG source codes and then could be learn a lot. If chare, all we win with that.
Do you know this function MsgDebug ?
Please, do not make hurry up in my question.
I will answer, in place: I use a lot more than debugger, very pratical and fast.
When you make me this question:
trmpluym wrote: ↑Mon Mar 27, 2017 9:00 pm
Can you explain me the what the following system array's contain ?
_HMG_SYSDATA [3]
_HMG_SYSDATA [1]
_HMG_SYSDATA[4]
_HMG_SYSDATA[7]
_HMG_SYSDATA[8]
- IMHO, the maining it's very wide and comprehensive these vectors you mentioned and I'll show you with this example:
http://hmgforum.com/viewtopic.php?p=50376#p50376
- And now with this other (just remove the characters as comments (here's green color):

- Screen150.png (31.88 KiB) Viewed 2809 times
Different results, doesn't it ?
Ok. Lets go to yours questions.
I am to blame from begining, because I should have just limited myself to answering your question.
I wanted to be more extensive and with that answer in this topic in another one that has there.
trmpluym wrote: ↑Mon May 30, 2016 5:16 pm
Ik like to save and restore all the current "ON KEY" information to a variable (Array?)
This is possible. You will see at \hmg.3.4.3\INCLUDE\i_keybd.ch file (where is being all HMG keys controls). There you also will see there is a COMMAND:
STORE KEY <HMG_key> OF <parent> TO <baction> which it will assign to a variable (but this is not a normal variable, it's a CodeBlock type). i.e. Its has an ACTION and can not be displayed o simple readable like a character type.
trmpluym wrote: ↑Mon May 30, 2016 5:16 pm
I figured out the command
#xcommand ON KEY ADD [ OF <parent> ] ACTION <action> ;
is translated into:
_DefineHotKey ( <"parent"> , 0 , VK_ADD , <{action}> )
That's you right. Please note the define function has 4 arguments. Keep it for forward explanation.
trmpluym wrote: ↑Mon May 30, 2016 5:16 pm
But where is this info stored ? In the source it seems _HMG_SYSDATA [1] ?
Is it enough to save _HMG_SYSDATA [1] to a temporary array and later overwrite it back, for example ?
Yes, you are quite right. You will need the ACTION and three more arguments necessary to be stored. As you said in ARRAY, but not tempory. Must be PRIVATE, I guess. The action for HOTKEY control at HMG is saved/stored at
_HMG_SYSDATA[ 6 ][ Index_Control ].
I prepared another Demo for you. Now you need to see how I've done:
I hope I let you clear now. Sorry if my English it's not so good and also sorry if It seems (sure is not) that I have to underestimate on your knowledges.
When we can not express ourselves well, it leaves a sea of doubts. Maybe I have been repetitive or very extensive in my explanation, sorry for that.
But hopefully it was worth it for you to understand more about HotKeys.
Kevin Carmody, has prepared a large HotKey definition and according to Claudio is being release at next HMG version.
