You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
Add this code to an extension, or at the bottom of Menus.init():
// Bug 1
KeyBindingManager.addBinding(Commands.FILE_OPEN_FOLDER, "Ctrl-Alt-O");
// Bug 2
KeyBindingManager.removeBinding("Ctrl-Q");
// Bug 3
var MY_COMMAND_ID = "helloworld.sayhello";
CommandManager.register("Hello World", MY_COMMAND_ID, function () {
window.alert("Hello, world!");
});
KeyBindingManager.addBinding(MY_COMMAND_ID, "Ctrl-L");
var menu = Menus.getMenu(Menus.AppMenuBar.FILE_MENU);
menu.addMenuItem("menu-helloworld-sayhello", MY_COMMAND_ID);
Result:
File > Open Folder does not show any keyboard shortcut (even though pressing the shortcut works)
File > Quit still shows "Ctrl+Q" as its shortcut (even though pressing the shortcut does nothing)
File > Hello World does not show any keyboard shortcut (even though pressing the shortcut works)
To fix (1) & (2), KeyBindingManager needs to dispatch change events and Menus needs to listen to them and update the menu item UI.
To fix (3), KeyBindingManager needs to expose an API for getting the bindings for a specific Command and that Menus needs to call that API when initially constructing the menu item UI, rather than assuming that the only bindings that exist are those that were passed directly to it as args.
The text was updated successfully, but these errors were encountered:
commit 51c1c978163834e3a1b5fb171cb9cbb44d21783b
Author: Jason San Jose <jasonsj@adobe.com>
Date: Fri Jun 1 13:43:10 2012 -0700
Implement keyBindingAdded and keyBindingRemoved events
commit f937b2228cc133d578891981db82699cb2a64ea0
Author: Jason San Jose <jasonsj@adobe.com>
Date: Fri Jun 1 11:17:14 2012 -0700
Remove keymap
commit 1af5f5887909f682b7da032522f4c93b291becfb
Author: Jason San Jose <jasonsj@adobe.com>
Date: Thu May 31 16:32:34 2012 -0700
refactor for #964
commit 799ca1e
Author: Jason San Jose <jasonsj@adobe.com>
Date: Thu May 31 12:31:19 2012 -0700
refactor key descriptor formatting. remove unused dependency.
commit b2c253e
Author: Jason San Jose <jasonsj@adobe.com>
Date: Thu May 31 11:44:30 2012 -0700
Supporrt keyboard shortcut display override
Add this code to an extension, or at the bottom of Menus.init():
Result:
To fix (1) & (2), KeyBindingManager needs to dispatch change events and Menus needs to listen to them and update the menu item UI.
To fix (3), KeyBindingManager needs to expose an API for getting the bindings for a specific Command and that Menus needs to call that API when initially constructing the menu item UI, rather than assuming that the only bindings that exist are those that were passed directly to it as args.
The text was updated successfully, but these errors were encountered: