I have tested with hotkeys defined in an #include file and did not end up with duplicate entries.zhaowu wrote: ↑14 Jan 2019, 09:21Thanks for sharing this little useful tool.
This reply is to post a bug and solution concerning duplicate entries. Somehow, each entry displays twice for #include files. I do not fully understand the code, so I just add U option to remove duplicates in each sort as below.
Code: Select all
Sort, Display_Section, U
I was able to replicate this behavior by having an #include file include itself but that seems more like the wrong use of #include. And in that case the hotkey really is in the script twice.
Now if the code actually defines the same hotkey twice that is a different matter. You can have the same hotkey defined twice, usually using the #if command but you can have one hotkey override another hotkey.
The problem with just eliminating all duplicates is that sometimes you really do have duplicates that need to be displayed. For example I personally have F12 defined four times. Each hotkey does a different thing depending on what is active at the moment. It is my go-to context sensitive hotkey.
Can you post code that creates duplicate entries?