FEATURE: Change "Preformatted text" shortcut (#13137)

FEATURE: Change “Preformatted text” shortcut (#13137)

Cmd/Ctrl+Shift+C was conflicting with browsers’ “inspect element” keyboard shortcuts. Cmd/Ctrl-E was chosen because it’s the same one that GitHub is now using: New codeblock shortcut | GitHub Changelog

diff --git a/app/assets/javascripts/discourse/app/components/d-editor.js b/app/assets/javascripts/discourse/app/components/d-editor.js
index 3457777..adcbc6b 100644
--- a/app/assets/javascripts/discourse/app/components/d-editor.js
+++ b/app/assets/javascripts/discourse/app/components/d-editor.js
@@ -129,7 +129,7 @@ class Toolbar {
     this.addButton({
       id: "code",
       group: "insertions",
-      shortcut: "Shift+C",
+      shortcut: "E",
       preventFocus: true,
       trimLeading: true,
       action: (...args) => this.context.send("formatCode", args),

GitHub sha: 5c3c2b8d

This commit appears in #13137 which was approved by pmusaraj. It was merged by CvX.