-
Notifications
You must be signed in to change notification settings - Fork 35
Description
SpSaveItems saves spTBXItems and their shortcuts like this:
[Items]
Count=230
0=MainToolBar, tbiFileNewModule, Ctrl+N
1=MainToolBar, tbiFileOpen, Ctrl+O
There are issues with persisting shortcuts in their text representation:
ShortcutToText uses the Windows GetKeyNameText function the result of which is dependent on the active keyboard language layout.
Same virtual code with a russian keyboard active

So what you save depends on the active keyboard layout. And if you load the items when a different keyboard layout is active, shortcuts get mixed-up or lost.
Another example:
Another issue is that different shortcuts have the same text representation.
Example Ctrl + / (keyboard) Ctrl+ NUMPAD DIVIDE also represented as CTRL+/. But they correspond to different keys. The textual representation cannot make the distinction.
This is partially a problem of the ShortcutToText function:
You can see that the Hotkey control correctly differentiates, but ShortcutToText does not.
I think it more robust to save the shortcut as integers.


