DrBullwinkle wrote:
I do not understand your test... you know that you are supposed to KEEP the old hotkey and ADD a new one, right?
I definitely understand that. I am talking about the handle number returned by the register hotkey script call. When this issue occurs, the number returned is the same for any number of hotkeys you are trying to register with next hotkey overwriting the one registered before it.
DrBullwinkle wrote:
What number are you talking about? I tested by opening up the Controls / Interface menu and checking the availability of the hotkey there.
Not sure if there is another way to check this, we should be on the same page here
DrBullwinkle wrote:
I can see how it might be necessary to do it more than once. Just keep adding hotkeys until they "stick". Obviously, save after adding a hotkey in order to save the incremented counter.
Unfortunately, it doesn't stick. At least not if you add hotkeys for the same script file. My test went through ~6000 attempts of registering a hotkey before I killed X3AP.exe.
DrBullwinkle wrote:
If I understand Cycrow's description of the bug, it should increment the counter each time you add a different hotkey (different name).
I did, finally, experience the bug, and adding a single extra hotkey fixed the problem completely.
It might work in some special case, i.e. when only one hotkey was unregistered. It didn't work in my situation. Fortunately, the nuclear option seems to work. I am actually not sure why can renaming work based on Cycrow's explanation.
As I understand it, they have a collection there where some elements can get marked as "unregistered", but when adding a hotkey they actually use the # of registered hotkeys as a new index instead of either searching for one those "unregistered" elements or adding a new one at the end.