From a4197a68f0f100d67e2c356da407d203e4bd245c Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 26 Feb 2016 00:39:28 +0100 Subject: [PATCH] Replaced not working shortcut on win, alt+ctrl+t with alt+ctrl+v. --- .../app/controllers/widget/keyboard_shortcuts.coffee | 2 +- .../javascripts/app/lib/base/jquery.contenteditable.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee b/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee index 70b5429ac..bd69223ed 100644 --- a/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee +++ b/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee @@ -334,7 +334,7 @@ App.Config.set( description: 'Format as ||italic||' } { - key: 't' + key: 'v' hotkeys: true description: 'Format as //strikethrough//' } diff --git a/app/assets/javascripts/app/lib/base/jquery.contenteditable.js b/app/assets/javascripts/app/lib/base/jquery.contenteditable.js index c3f21ba4b..6740b28b4 100644 --- a/app/assets/javascripts/app/lib/base/jquery.contenteditable.js +++ b/app/assets/javascripts/app/lib/base/jquery.contenteditable.js @@ -110,6 +110,7 @@ // altKey + ctrlKey + u -> Toggles the current selection between underlined and not underlined // altKey + ctrlKey + b -> Toggles the current selection between bold and non-bold // altKey + ctrlKey + i -> Toggles the current selection between italic and non-italic + // altKey + ctrlKey + v -> Toggles the current selection between strike and non-strike // altKey + ctrlKey + f -> Removes the formatting tags from the current selection // altKey + ctrlKey + z -> Inserts a Horizontal Rule // altKey + ctrlKey + l -> Toggles the text selection between an unordered list and a normal block @@ -124,7 +125,7 @@ || e.keyCode == 90 || e.keyCode == 76 || e.keyCode == 75 - || e.keyCode == 79 + || e.keyCode == 86 || e.keyCode == 87)) { e.preventDefault() @@ -154,7 +155,7 @@ if (e.keyCode == 75) { document.execCommand('InsertOrderedList') } - if (e.keyCode == 79) { + if (e.keyCode == 86) { document.execCommand('StrikeThrough') } if (e.keyCode == 87) {