adding keyboard shortcuts

This commit is contained in:
Rolux 2010-02-08 15:15:48 +05:30
parent 63decc0af0
commit 92ab6f6b48
2 changed files with 16 additions and 15 deletions

View File

@ -2458,7 +2458,7 @@ requires
$("<td>", {
"class": "OxCell OxModifiers",
html: $.map(self.options.keyboard.modifiers, function(modifier) {
return oxui.symbol[modifier];
return oxui.symbols[modifier];
}).join("")
})
)
@ -2466,7 +2466,8 @@ requires
$("<td>", {
"class": "OxCell Ox" + (self.options.items.length ? "Submenu" : "Key"),
html: self.options.items.length ? oxui.symbols.triangle_right :
oxui.symbols[self.options.keyboard.key] || self.options.keyboard.key
oxui.symbols[self.options.keyboard.key] ||
self.options.keyboard.key.toUpperCase()
})
);

View File

@ -74,26 +74,26 @@
id: "file",
title: "File",
items: [
{ id: "load", title: "Load" },
{ id: "save", title: "Save" },
{ id: "save_ad", title: "Save As..."}
{ id: "load", keyboard: "control o", title: "Open" },
{ id: "save", keyboard: "control a", title: "Save" },
{ id: "save_ad", keyboard: "shift control s", title: "Save As..."}
]
},
{
id: "edit",
title: "Edit",
items: [
{ id: "undo", title: "Undo" },
{ id: "redo", title: "Redo" },
{ id: "undo", keyboard: "control z", title: "Undo" },
{ id: "redo", keyboard: "shift control z", title: "Redo" },
{},
{ id: "cut", title: "Cut" },
{ id: "copy", title: "Copy" },
{ id: "paste", title: "Paste"},
{ id: "delete", title: "Delete"},
{ id: "cut", keyboard: "control x", title: "Cut" },
{ id: "copy", keyboard: "control c", title: "Copy" },
{ id: "paste", keyboard: "control v", title: "Paste"},
{ id: "delete", keyboard: "delete", title: "Delete"},
{},
{ id: "select_all", title: "Select All" },
{ id: "select_none", title: "Select None" },
{ id: "invert_selection", title: "Invert Selection" },
{ id: "select_all", keyboard: "control a", title: "Select All" },
{ id: "select_none", keyboard: "shift control a", title: "Select None" },
{ id: "invert_selection", keyboard: "alt control a", title: "Invert Selection" },
]
},
{
@ -114,7 +114,7 @@
id: "help",
title: "Help",
items: [
{ id: "help", title: "Help" }
{ id: "help", keyboard: "control h", title: "Help" }
]
}
],