Hotkeys for CKEditor format/styles

Sourced from
http://stackoverflow.com/a/14425430/9908

function bib_onKey(event){
            var styles = [], config = this.config,
                codex = { }, format_name = undefined;
            codex[CKEDITOR.ALT + 49] = "format_h1";
            codex[CKEDITOR.ALT + 50] = "format_h2";
            codex[CKEDITOR.ALT + 51] = "format_h3";

            format_name = codex[event.data.keyCode];

            if (format_name !== undefined) {
                this.fire("saveSnapshot"); #save state for undo
                //Format codes are not stored anywhere I could find
                // so build them.
                var style = new CKEDITOR.style(config[format_name]),
                    elementPath = this.elementPath();
                    #Honestly no idea but its needed to work
                    style._.enterMode = config.enterMode;
                #if format is live, kill it or vice versa
                this[style.checkActive( elementPath )
                    ? "removeStyle"
                    : "applyStyle"
                ]( style );
                #another hit on the undo logic.
                this.fire( 'saveSnapshot' );
            }
        }

put that in the call to CKEditor as a custom config parameter

CKEDITOR.inline("your tag name", { on:{key:bib_onKey}})