From 2d597a4cab4f5df29cf063dca879ce2cc02483e4 Mon Sep 17 00:00:00 2001 From: Prateek Saxena Date: Fri, 7 Nov 2014 14:01:32 +0530 Subject: [PATCH] Add keyboard shortcut to Clear Authorship Colors. Fixes #2292 --- src/static/js/ace2_inner.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 4ef0a087c..ad5dd9057 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3757,7 +3757,7 @@ function Ace2Inner(){ doInsertUnorderedList() specialHandled = true; } - if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "n" && (evt.metaKey || evt.ctrlKey) && evt.shiftKey) + if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "n" && (evt.metaKey || evt.ctrlKey) && evt.shiftKey) { // cmd-shift-N (orderedlist) fastIncorp(9); @@ -3765,6 +3765,12 @@ function Ace2Inner(){ doInsertOrderedList() specialHandled = true; } + if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "c" && (evt.metaKey || evt.ctrlKey) && evt.shiftKey) { + // cmd-shift-C (clearauthorship) + fastIncorp(9); + evt.preventDefault(); + CMDS.clearauthorship(); + } if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "h" && (evt.ctrlKey)) { // cmd-H (backspace)