Minor shortcut amends

issue #1463

- disables some of codemirrors default shortcuts to prevent them clashing
- minor cleanup of shortcut listing
This commit is contained in:
Hannah Wolfe 2014-09-24 16:08:10 +01:00
parent 5f5993819a
commit 75897d2bb7
2 changed files with 12 additions and 4 deletions

View File

@ -64,7 +64,15 @@ var Codemirror = Ember.TextArea.extend(MarkerManager, {
dragDrop: false,
extraKeys: {
Home: 'goLineLeft',
End: 'goLineRight'
End: 'goLineRight',
'Ctrl-U': false,
'Cmd-U': false,
'Shift-Ctrl-U': false,
'Shift-Cmd-U': false,
'Ctrl-S': false,
'Cmd-S': false,
'Ctrl-D': false,
'Cmd-D': false
}
});

View File

@ -17,9 +17,9 @@ shortcuts['ctrl+alt+u'] = {action: 'codeMirrorShortcut', options: {type: 'strike
shortcuts[ctrlOrCmd + '+b'] = {action: 'codeMirrorShortcut', options: {type: 'bold'}};
shortcuts[ctrlOrCmd + '+i'] = {action: 'codeMirrorShortcut', options: {type: 'italic'}};
shortcuts['ctrl+U'] = {action: 'codeMirrorShortcut', options: {type: 'uppercase'}};
shortcuts['ctrl+shift+U'] = {action: 'codeMirrorShortcut', options: {type: 'lowercase'}};
shortcuts['ctrl+alt+shift+U'] = {action: 'codeMirrorShortcut', options: {type: 'titlecase'}};
shortcuts['ctrl+u'] = {action: 'codeMirrorShortcut', options: {type: 'uppercase'}};
shortcuts['ctrl+shift+u'] = {action: 'codeMirrorShortcut', options: {type: 'lowercase'}};
shortcuts['ctrl+alt+shift+u'] = {action: 'codeMirrorShortcut', options: {type: 'titlecase'}};
shortcuts[ctrlOrCmd + '+shift+c'] = {action: 'codeMirrorShortcut', options: {type: 'copyHTML'}};
//Headings