Debug Console Settings
If the settings are stored “globally”, and the user needs to switch between projects (to fix errors, improvements, additions, etc.) with different settings (permissions, platform, orientation (portrait, landscape)), then you need to remember and reconfigure the Debug Console. Saving the settings in a project ensures that the customized environment for a particular job is saved.
But this can be achieved using nodes.
Shortcuts for Debug Console
It is more convenient to store it “globally”, because most likely they will not change from project to project.
Therefore, it is necessary to decide how best to do it?
I’m waiting for an opinion, maybe someone else will speak…
Nice! To make the code a bit more readbable you can use the constants defined here: http://api.kha.tech/kha/input/KeyCode.html, so instead of 16 you can write KeyCode.Tilde (which btw isn’t 16 according to the API documentation)
To assign buttons as it is done in Keymap, you need to use EnumProperty with a list of required keys. But there are the following problems:
to use event means without modifiers (Shift, Ctrl…) and this prevents the user from assigning ~ to hotkeys (with full_event - Blender crashes);
it is necessary to take into account all keys in EnumProperty, otherwise if the user clicks one that is not included in the enumeration, then a message will be displayed in the console and it must be processed (you need to figure out how), but the button will be assigned in the interface;
if you specify symbols (~, *, /…) as default values, they will not be displayed to the field. If you assign them, then everything will be fine. Also a strange situation: