VS Code 有类似 Atom 的 addKeystrokeResolver 的东西吗?
Does VS Code have anything like Atom's addKeystrokeResolver?
Atom 有一个功能,允许您在 Atom 对它们执行任何操作之前拦截键盘输入事件并将它们转换为不同的键盘输入。这是 Atom 文档中的示例:
atom.keymaps.addKeystrokeResolver ({event}) ->
if event.code is 'KeyG' and event.altKey and event.ctrlKey and event.type isnt 'keyup'
return 'ctrl-@'
此代码使 Atom 将 ctrl-alt-g 视为 ctrl-@。
VS Code 有类似的东西吗?
看看 VSCode vim 扩展的作用:https://github.com/VSCodeVim/Vim/blob/aa8d9549ac0d31b393a9346788f9a9a93187c222/extension.ts#L208
它挂钩并覆盖 VSCode 的 type
命令。这是一个比 atom 的击键解析器更低级别的扩展点,但它可能会提供您正在寻找的东西
Atom 有一个功能,允许您在 Atom 对它们执行任何操作之前拦截键盘输入事件并将它们转换为不同的键盘输入。这是 Atom 文档中的示例:
atom.keymaps.addKeystrokeResolver ({event}) ->
if event.code is 'KeyG' and event.altKey and event.ctrlKey and event.type isnt 'keyup'
return 'ctrl-@'
此代码使 Atom 将 ctrl-alt-g 视为 ctrl-@。
VS Code 有类似的东西吗?
看看 VSCode vim 扩展的作用:https://github.com/VSCodeVim/Vim/blob/aa8d9549ac0d31b393a9346788f9a9a93187c222/extension.ts#L208
它挂钩并覆盖 VSCode 的 type
命令。这是一个比 atom 的击键解析器更低级别的扩展点,但它可能会提供您正在寻找的东西