12 |
- "use strict";(self.webpackChunkmy_application=self.webpackChunkmy_application||[]).push([[721],{721:(t,n,e)=>{e.r(n),e.d(n,{default:()=>o});const o='// Explanation:\n// First, we need to know the ID of the command.\n// If you know the default key bindings, you can get the ID by following these steps.\n// 1. open Visual Studio Code and navigate to "Preferences => Keyboard Shortcuts".\n// 2. enter a shortcut key (e.g. Tab, Escape, Enter, etc.) in the search text input at the top.\n// 3. Once the commands are filtered, you will need to find which command is the target command by ID and name.\n\n// In this sample, the cursor can be moved with the Ctrl key and HJKL.\n// To move the cursor to the left, we usually use the LeftArrow key, so we type `LeftArrow` in the search form.\n// You will see a number of commands, but you will find the most likely one, `cursorLeft`.\n// Note that the `When` column says `textInputFocus`.\n// In a similar fashion, you will find the commands `cursorDown`, `cursorUp`, and `cursorRight`.\n\nmonaco.editor.addKeybindingRules([\n\t{\n\t\tkeybinding: monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyH,\n\t\tcommand: "cursorLeft", // ID\n\t\twhen: "textInputFocus", // When\n\t},\n\t{\n\t\tkeybinding: monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyJ,\n\t\tcommand: "cursorDown",\n\t\twhen: "textInputFocus",\n\t},\n\t{\n\t\tkeybinding: monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyK,\n\t\tcommand: "cursorUp",\n\t\twhen: "textInputFocus",\n\t},\n\t{\n\t\tkeybinding: monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyL,\n\t\tcommand: "cursorRight",\n\t\twhen: "textInputFocus",\n\t},\n]);\n\nmonaco.editor.create(document.getElementById("container"), {\n\tvalue: [\n\t\t"",\n\t\t"class Example {",\n\t\t"\\tprivate m:number;",\n\t\t"",\n\t\t"\\tpublic met(): string {",\n\t\t\'\\t\\treturn "Hello world!";\',\n\t\t"\\t}",\n\t\t"}",\n\t].join("\\n"),\n\tlanguage: "typescript",\n});\n'}}]);
- //# sourceMappingURL=721.js.map
|