Editor must be focused before allowing certain keyboard shortcuts.

closes #4253
- checked for the CodeMirror-focused class on the CodeMirror div
- used length to determine whether CodeMirror-focused has been added
- determines whether the editor has been focused on