Topic Closed
Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

Anyone know of a list of keystrokes for CKEditor? They have a list of blocked keystrokes in the documentation; however, I'm looking for all possible functions I can use. . ..  like h1, h2, h3, h4, h5, center, right justify, left justify, etc. . .

I've gone through the ckeditor.js file and found all 'addcommand' and tested them. Below are my results. I'm going to work on setting shortcuts for many of them that will match google docs and/or word and OOo, but I cannot find commands for headers (h1, h2, h3, etc. . .). . . really want those!

What I have so far:

These can have keystrokes set for them:

  • about
  • anchor
  • blockquote
  • blur = removes focus from CKEditor
  • blurBack = ? same as blur?
  • bold
  • bulletedListStyle
  • bulletedlist
  • button = button properties
  • cellDelete
  • cellHorizontalSplit
  • cellInsertAfter
  • cellInsertBefore
  • cellMerge
  • cellMergeDown
  • cellMergeRight
  • cellProperties
  • cellVerticalSplit
  • checkbox
  • colordialog
  • columnDelete
  • columnInsertAfter
  • columnInsertBefore
  • contextMenu
  • copy (system)
  • creatediv
  • cut (system)
  • editdiv
  • elementsPathFocus
  • find = search/find
  • flash
  • form
  • hiddenfield = hidden field properties
  • horizontalrule
  • image = insert image
  • imagebutton = image button properties
  • indent
  • italic
  • justifyblock
  • justifycenter
  • justifyleft
  • justifyright
  • link
  • maximize = maximize CKEditor
  • newpage = create new page (don't use!!!)
  • numberedListStyle
  • numberedlist
  • outdent
  • pagebreak
  • paste (system)
  • pastefromword
  • pastetext
  • preview = opens page (only) in new tab/window
  • print
  • radio
  • redo
  • removeFormat
  • removediv
  • replace = search & replace
  • rowDelete
  • rowInsertAfter
  • rowInsertBefore
  • scaytcheck = enable/disable spellcheck as you type
  • select = select field properties
  • selectall (system)
  • showblocks
  • showborders
  • smiley = adds imotocon
  • source = view source code
  • specialchar = Character Map
  • strike = Strikethrough
  • subscript
  • subscript
  • superscript
  • superscript
  • table
  • tableDelete
  • tableProperties
  • templates
  • textarea
  • textfield
  • toolbarCollapse
  • toolbarFocus
  • underline
  • undo
  • unlink

These can't, or dont' work, have keystrokes set:

  • bgcolor = background color
  • font
  • fontsize
  • save
  • selectall (system default - can't change)
  • spellchecker
  • styles
  • textcolor

Can't find & would like to:

  • formatting: h1, h2, h3, h4, h5, h6, normal, etc.
Edited: 10 years ago#687

Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

OK. . . I put together a couple sets of keyboard shortcuts for those that would like to try them

The link to the gDoc is here.

You can make changes if you find errors. . . please don't change the shortcuts themselves--add them commented out with a comment.

There are two sets, complicated and simple. The complicated is very redundant taking into account gDocs & Word shortcuts while the simple follows the main standard and uses the Alt key for just about everything else. The simple is the one I would use.

Known issues: currently it does not work in IE, and I don't know why.

For those that want to get right at it here is the code for the simple:

d.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' ],                                                                                                                // don't use - conflicts with browser
// [ CKEDITOR.CTRL + 88 /*X*/, 'cut' ],                                                                                                                 // don't use - conflicts with browser
//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' ], //not needed
[ 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' ],                                                                                          // page break for printing
[ CKEDITOR.ALT + 13 /*ENTER*/, 'pagebreak' ],
// [ CKEDITOR.CTRL + 86 /*V*/, 'paste' ],                                                                                                               // don't use - conflicts with browser
[ 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 + 8 /*Backspace*/, 'blur' ],
[ CKEDITOR.CTRL + 87 /*W*/, 'blur' ],                                                                                                                           // protect against accidental tab closure - does not work in chrome
[ 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' ],                                                                                                                // MUST have maximize toolbar button loaded
[ CKEDITOR.CTRL + 113 /*F2*/, 'preview' ],                                                                                                      //not gpEasy preview. Does NOT work in Firefox.
[ 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 + 48 /*ZERO*/, 'toolbarCollapse' ],
[ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ],

];

End Code

Simply add this to /include/js/ckeditor_config.js before the }; close

Edited: 10 years ago#693

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register