Windows全局改键成mac+VS code快捷键设置

本文介绍了如何在Windows上更改键位,模拟Mac操作,并提供了VS Code的快捷键设置方法,包括光标移动和文本操作等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

下载软件并进行如图设置

效果:Ctrl和Alt键互换
链接: https://pan.baidu.com/s/1ZT6Eu8W5mW-eLSQMZIq9Bw 提取码: 58x4

Windows注册表改键

VS code用户设置

{
    "explorer.confirmDelete": false,
    "python.pythonPath": "E:\\anaconda\\python",
    "python.formatting.provider": "autopep8",
    "python.linting.flake8Enabled": true,
    "terminal.integrated.rendererType": "dom",
    "editor.formatOnSave": true,
}

VS code快捷键设置

效果:
ctrl+a 光标移动到行首
ctrl+e 光标移动到行尾
ctrl+f 光标向右移动一个字符
ctrl+b 光标向左移动一个字符
ctrl+p 光标移动到上一行
ctrl+n 光标移动到下一行
ctrl+u 删除整行内容

// 将按键绑定放在此文件中以覆盖默认值
[
    {
        "key": "alt+n",
        "command": "cursorDown",
        "when": "textInputFocus"
    },
    {
        "key": "down",
        "command": "-cursorDown",
        "when": "textInputFocus"
    },
    {
        "key": "shift+alt+n",
        "command": "cursorDownSelect",
        "when": "textInputFocus"
    },
    {
        "key": "ctrl+shift+down",
        "command": "-cursorDownSelect",
        "when": "textInputFocus"
    },
    {
        "key": "alt+e",
        "command": "cursorEnd",
        "when": "textInputFocus"
    },
    {
        "key": "end",
        "command": "-cursorEnd",
        "when": "textInputFocus"
    },
    {
        "key": "shift+alt+e",
        "command": "cursorEndSelect",
        "when": "textInputFocus"
    },
    {
        "key": "shift+end",
        "command": "-cursorEndSelect",
        "when": "textInputFocus"
    },
    {
        "key": "alt+a",
        "command": "cursorHome",
        "when": "textInputFocus"
    },
    {
        "key": "home",
        "command": "-cursorHome",
        "when": "textInputFocus"
    },
    {
        "key": "shift+alt+a",
        "command": "cursorHomeSelect",
        "when": "textInputFocus"
    },
    {
        "key": "shift+home",
        "command": "-cursorHomeSelect",
        "when": "textInputFocus"
    },
    {
        "key": "alt+b",
        "command": "cursorLeft",
        "when": "textInputFocus"
    },
    {
        "key": "left",
        "command": "-cursorLeft",
        "when": "textInputFocus"
    },
    {
        "key": "shift+alt+b",
        "command": "cursorLeftSelect",
        "when": "textInputFocus"
    },
    {
        "key": "shift+left",
        "command": "-cursorLeftSelect",
        "when": "textInputFocus"
    },
    {
        "key": "alt+f",
        "command": "cursorRight",
        "when": "textInputFocus"
    },
    {
        "key": "right",
        "command": "-cursorRight",
        "when": "textInputFocus"
    },
    {
        "key": "shift+alt+f",
        "command": "cursorRightSelect",
        "when": "textInputFocus"
    },
    {
        "key": "shift+right",
        "command": "-cursorRightSelect",
        "when": "textInputFocus"
    },
    {
        "key": "alt+p",
        "command": "cursorUp",
        "when": "textInputFocus"
    },
    {
        "key": "up",
        "command": "-cursorUp",
        "when": "textInputFocus"
    },
    {
        "key": "shift+alt+p",
        "command": "cursorUpSelect",
        "when": "textInputFocus"
    },
    {
        "key": "ctrl+shift+up",
        "command": "-cursorUpSelect",
        "when": "textInputFocus"
    },
    {
        "key": "alt+u",
        "command": "editor.action.deleteLines",
        "when": "textInputFocus && !editorReadonly"
    },
    {
        "key": "ctrl+shift+k",
        "command": "-editor.action.deleteLines",
        "when": "textInputFocus && !editorReadonly"
    },
    {
        "key": "alt+k alt+u",
        "command": "editor.action.removeCommentLine",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+k ctrl+u",
        "command": "-editor.action.removeCommentLine",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "shift+alt+f",
        "command": "-editor.action.formatDocument",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "shift+alt+f",
        "command": "-filesExplorer.findInFolder",
        "when": "explorerResourceIsFolder && explorerViewletVisible && filesExplorerFocus && !inputFocus && resourceScheme == 'file'"
    },
    {
        "key": "shift+ctrl+f",
        "command": "filesExplorer.findInFolder",
        "when": "explorerResourceIsFolder && explorerViewletVisible && filesExplorerFocus && !inputFocus && resourceScheme == 'file'"
    }
]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值