Add 'Ctrl-5' keyboard shortcut for 'strikethrough' #1987
A quick search revealed that 'Ctrl-5' is a popular shortcut for strikethrough. Implemented in 'ace2_inner' and updated the English l10n file for the tooltip.
This commit is contained in:
parent
6ec55309a7
commit
001d75cd1e
|
@ -5,7 +5,7 @@
|
||||||
"pad.toolbar.bold.title": "Bold (Ctrl-B)",
|
"pad.toolbar.bold.title": "Bold (Ctrl-B)",
|
||||||
"pad.toolbar.italic.title": "Italic (Ctrl-I)",
|
"pad.toolbar.italic.title": "Italic (Ctrl-I)",
|
||||||
"pad.toolbar.underline.title": "Underline (Ctrl-U)",
|
"pad.toolbar.underline.title": "Underline (Ctrl-U)",
|
||||||
"pad.toolbar.strikethrough.title": "Strikethrough",
|
"pad.toolbar.strikethrough.title": "Strikethrough (Ctrl-5)",
|
||||||
"pad.toolbar.ol.title": "Ordered list",
|
"pad.toolbar.ol.title": "Ordered list",
|
||||||
"pad.toolbar.ul.title": "Unordered List",
|
"pad.toolbar.ul.title": "Unordered List",
|
||||||
"pad.toolbar.indent.title": "Indent (TAB)",
|
"pad.toolbar.indent.title": "Indent (TAB)",
|
||||||
|
|
|
@ -3741,6 +3741,14 @@ function Ace2Inner(){
|
||||||
toggleAttributeOnSelection('underline');
|
toggleAttributeOnSelection('underline');
|
||||||
specialHandled = true;
|
specialHandled = true;
|
||||||
}
|
}
|
||||||
|
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "5" && (evt.metaKey || evt.ctrlKey))
|
||||||
|
{
|
||||||
|
// cmd-5 (strikethrough)
|
||||||
|
fastIncorp(13);
|
||||||
|
evt.preventDefault();
|
||||||
|
toggleAttributeOnSelection('strikethrough');
|
||||||
|
specialHandled = true;
|
||||||
|
}
|
||||||
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "h" && (evt.ctrlKey))
|
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "h" && (evt.ctrlKey))
|
||||||
{
|
{
|
||||||
// cmd-H (backspace)
|
// cmd-H (backspace)
|
||||||
|
|
Loading…
Reference in New Issue