Quellcode durchsuchen

Move completer invocation shortcuts to shortcuts plugin.

Afshin Darian vor 8 Jahren
Ursprung
Commit
122c305828
1 geänderte Dateien mit 19 neuen und 5 gelöschten Zeilen
  1. 19 5
      src/shortcuts/plugin.ts

+ 19 - 5
src/shortcuts/plugin.ts

@@ -9,6 +9,10 @@ import {
   CommandIDs as CommandPaletteCommandIDs
 } from '../commandpalette';
 
+import {
+  CommandIDs as CompleterCommandIDs, COMPLETABLE_CLASS
+} from '../completer';
+
 import {
   CommandIDs as ConsoleCommandIDs
 } from '../console';
@@ -66,11 +70,6 @@ import {
  * required, using the `'body'` selector is more appropriate.
  */
 const SHORTCUTS = [
-  {
-    command: CommandPaletteCommandIDs.activate,
-    selector: 'body',
-    keys: ['Accel Shift P']
-  },
   {
     command: ApplicationCommandIDs.activateNextTab,
     selector: 'body',
@@ -81,6 +80,21 @@ const SHORTCUTS = [
     selector: 'body',
     keys: ['Accel ArrowLeft']
   },
+  {
+    command: CommandPaletteCommandIDs.activate,
+    selector: 'body',
+    keys: ['Accel Shift P']
+  },
+  {
+    command: CompleterCommandIDs.invokeConsole,
+    selector: `.jp-ConsolePanel .${COMPLETABLE_CLASS}`,
+    keys: ['Tab']
+  },
+  {
+    command: CompleterCommandIDs.invokeNotebook,
+    selector: `.jp-Notebook .${COMPLETABLE_CLASS}`,
+    keys: ['Tab']
+  },
   {
     command: ConsoleCommandIDs.run,
     selector: '.jp-CodeConsole-prompt',