diff --git a/demo/show_keyboard_shortcuts.html b/demo/show_keyboard_shortcuts.html index 8d456c5b..c55902f6 100644 --- a/demo/show_keyboard_shortcuts.html +++ b/demo/show_keyboard_shortcuts.html @@ -21,12 +21,17 @@
-function foo(items) {
- var i;
- for (i = 0; i < items.length; i++) {
- alert("Ace Rocks " + items[i]);
+Editor.prototype.showKeyboardShortcuts = function () {
+ showKeyboardShortcuts(this);
+};
+editor.commands.addCommands([{
+ name: "showKeyboardShortcuts",
+ bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
+ exec: function(editor, line) {
+ editor.showKeyboardShortcuts();
}
-}
+}]);
+
diff --git a/demo/show_settings_menu.html b/demo/show_settings_menu.html
index b23d9a6b..72de2357 100644
--- a/demo/show_settings_menu.html
+++ b/demo/show_settings_menu.html
@@ -21,12 +21,18 @@
-function foo(items) {
- var i;
- for (i = 0; i < items.length; i++) {
- alert("Ace Rocks " + items[i]);
- }
-}
+Editor.prototype.showSettingsMenu = function () {
+ showSettingsMenu(this);
+};
+editor.commands.addCommands([{
+ name: "showSettingsMenu",
+ bindKey: {win: "Ctrl-q", mac: "Command-q"},
+ exec: function(editor, line) {
+ editor.showSettingsMenu();
+ },
+ readOnly: true
+}]);
+