Where can I find documentation on Keymapping (if it exists)? Here are the basics I have so far: * the available set of shortcuts is per-class * a shortcut is created by creating a builder method (similar to World Menu registration) annotated with <keymap> * shortcuts are grouped into categories * categories (not individual shortcuts) are attached to Morph classes via KMBuilder>>attachShortcutCategory:to: * the system is updated when "KMPragmaKeymapBuilder uniqueInstance" resets itself via #reset (but see problems below)
Questions: * What is the purpose of naming shortcuts? * Why are shortcuts held by categories as named entries and separately as keymaps? There seems to be a problem with updating shortcuts (esp. changing existing ones): * It seems that when an existing named shortcut is modified, eventually KMShortcut>>shortcutHasChangedIn:by: is called, but this method does nothing, so the shortcut never gets updated. Why is this? It seems like a bug. * When a <keymap> method is saved in OB, KMPragmaKeymapBuilder>>reset is called twice - once via AnnouncementSubscription>>deliver:, and once via KMPragmaKeymapBuilder>>event: * Because KMRepository class>>reset is never called, it becomes very dirty if shortcuts are repeatedly edited. For example, create a shortcut named "myShortcut" with Cmd+D in Category "Test", now change its name and accept the code. You will have two shortcuts with the same key combination. Now change to Cmd+E and accept again. You will have three shortcuts, even though you have only one specified in your builder method... So it seems to me to keep integrity in the shortcuts, either: * "KMRepository reset" when anything is changed, and start from scratch * or, improve KMPragmaKeymapBuilder>>reset's ability to keep the system clean. Sean -- View this message in context: http://forum.world.st/Keymapping-Questions-tp3990667p3990667.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
