I've put together the following keyboard shortcuts and they work great in Firefox and Chrome however they break IE and don't work in Opera
Secondly, I cannot find the commands for headings (h1, h2, h3, etc.) to set keystrokes/shortcuts in CKEditor, does anyone know what to use?: ?:
I've tried all the commands that I could find for headings in the ckeditor.js file but no luck
sorry, not a programmer. . . just following the info I've found in the documentation for CKEditor. Thanks.
CKEDITOR.config.keystrokes=[ // Formatting [ CKEDITOR.CTRL + 81 /*Q*/, 'blockquote' ], [ CKEDITOR.CTRL + 66 /*B*/, 'bold' ], [ CKEDITOR.CTRL + 56 /*8*/, 'bulletedlist' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 56 /*8*/, 'bulletedListStyle' ], // [ CKEDITOR.CTRL + 67 /*C*/, 'copy' ], // [ CKEDITOR.CTRL + 88 /*X*/, 'cut' ], //CAN'T FIND COMMAND FOR HEADINGS //[ CKEDITOR.CTRL + 49 /*1*/, 'H1' ], //[ CKEDITOR.CTRL + 50 /*2*/, 'H2' ], //[ CKEDITOR.CTRL + 51 /*3*/, 'H3' ], //[ CKEDITOR.CTRL + 52 /*4*/, 'H4' ], //[ CKEDITOR.CTRL + 53 /*5*/, 'H5' ], [ CKEDITOR.CTRL + 77 /*M*/, 'indent' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 77 /*M*/, 'outdent' ], [ CKEDITOR.CTRL + 73 /*I*/, 'italic' ], [ CKEDITOR.CTRL + 74 /*J*/, 'justifyblock' ], [ CKEDITOR.CTRL + 69 /*E*/, 'justifycenter' ], [ CKEDITOR.CTRL + 76 /*L*/, 'justifyleft' ], [ CKEDITOR.CTRL + 82 /*R*/, 'justifyright' ], [ CKEDITOR.CTRL + 55 /*7*/, 'numberedlist' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 55 /*7*/, 'numberedListStyle' ], [ CKEDITOR.CTRL + 89 /*Y*/, 'redo' ], [ CKEDITOR.CTRL + 32 /*SPACE*/, 'removeFormat' ], [ CKEDITOR.CTRL + 65 /*A*/, 'selectall' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 88 /*X*/, 'strike' ], [ CKEDITOR.CTRL + 188 /*COMMA*/, 'subscript' ], [ CKEDITOR.CTRL + 190 /*PERIOD*/, 'superscript' ], [ CKEDITOR.CTRL + 85 /*U*/, 'underline' ], [ CKEDITOR.CTRL + 90 /*Z*/, 'undo' ], // Insert [ CKEDITOR.ALT + 65 /*A*/, 'anchor' ], [ CKEDITOR.ALT + 68 /*D*/, 'creatediv' ], [ CKEDITOR.ALT + CKEDITOR.SHIFT + 68 /*D*/, 'editdiv' ], [ CKEDITOR.ALT + 70 /*F*/, 'flash' ], [ CKEDITOR.ALT + 72 /*H*/, 'horizontalrule' ], [ CKEDITOR.CTRL + 57 /*9*/, 'image' ], [ CKEDITOR.ALT + 73 /*I*/, 'image' ], [ CKEDITOR.CTRL + 75 /*K*/, 'link' ], [ CKEDITOR.ALT + 76 /*L*/, 'link' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 75 /*K*/, 'unlink' ], [ CKEDITOR.ALT + CKEDITOR.SHIFT + 76 /*L*/, 'unlink' ], [ CKEDITOR.CTRL + 13 /*ENTER*/, 'pagebreak' ], [ CKEDITOR.ALT + 13 /*ENTER*/, 'pagebreak' ], // [ CKEDITOR.CTRL + 86 /*V*/, 'paste' ], [ CKEDITOR.ALT + 86 /*V*/, 'pastetext' ], [ CKEDITOR.ALT + CKEDITOR.SHIFT + 86 /*V*/, 'pastefromword' ], [ CKEDITOR.ALT + 69 /*E*/, 'smiley' ], [ CKEDITOR.ALT + 67 /*C*/, 'specialchar' ], [ CKEDITOR.ALT + 84 /*T*/, 'table' ], [ CKEDITOR.ALT + 79 /*O*/, 'templates' ], // Other - dialogs, views, etc. [ 112 /*F1*/, 'about' ], //[ CKEDITOR.ALT + 48 /*ZERO*/, 'blur' ], [ CKEDITOR.ALT + 8 /*Backspace*/, 'blur' ], [ CKEDITOR.CTRL + 87 /*W*/, 'blur' ], [ CKEDITOR.ALT + 51 /*#3*/, 'colordialog' ], [ CKEDITOR.ALT + 77 /*M*/, 'contextMenu' ], [ CKEDITOR.ALT + 122 /*F11*/, 'elementsPathFocus' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 70 /*F*/, 'find' ], [ CKEDITOR.ALT + 88 /*X*/, 'maximize' ], [ CKEDITOR.CTRL + 113 /*F2*/, 'preview' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 80 /*P*/, 'print' ], [ CKEDITOR.CTRL + 72 /*H*/, 'replace' ], [ CKEDITOR.ALT + 83 /*S*/, 'scaytcheck' ], [ CKEDITOR.ALT + 66 /*B*/, 'showblocks' ], [ CKEDITOR.ALT + CKEDITOR.SHIFT + 84 /*T*/, 'showborders' ], [ CKEDITOR.ALT + 90 /*Z*/, 'source' ], [ CKEDITOR.ALT + 188 /*comma*/, 'toolbarCollapse' ], [ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ], ];
Re: keystroke commands needed
Did you figure this out? I'm having the same issue, it's driving me crazy to be able to do absolutely everything via the keyboard except set headings. I can see why it's not straightforward because they are done through the format menu - but if anyone has an answer it would be great!
MTIA
Re: keystroke commands needed & issues with IE & Opera
No, haven't found anything on this.
Sucks that they don't have easy and obvious commands for headings!
Update: found this tutorial for associating shortcuts and headings.
http://greg.gannicott.co.uk/2011/01/18/ckeditor-associating-headings-eg-h1-with-a-keyboard-shortcuts/
Didn't work for the cms I'm using but maybe others will have luck.
Heading hotkeys for CKEditor 4.4
Hi,
What's the solution for headings on current (4.4) version of CKEditor? I've modified config.js file adding custom keystrokes for headings, but hotkeys don't work on the form. Here is my config.js file:
What else should be done to make hotkeys for headings work?
Another problem is that I would like to set hotkeys for "Ctrl + 1", "Ctrl + 2" and so on, withour "Shift" buttons, but these hotkeys are already taken by Chrome and blockedKeystrokes don't solve the issue for me.
Hope to get your suggestions soon!