• macos键盘映射修改


    在windows下,我使用AutoHotkey (AHK)进行键盘映射,AHK不支持macos,所以重新选了一款软件,这款软件是Karabiner-Elements

    要把键位映射成什么样子?

    如下图:

    映射图

    这样基本就可以实现在编辑东西的时候不需要使用鼠标了。

    配置Karabiner-Elements

    vi方式的上下左右使用官网带的(Add rule->import from internet)就可以了。其余的我自己创造一下。

    进入目录~/.config/karabiner/assets/complex_modifications 中,新建一个my.json文件,写入如下内容:

    {
        "title": "my_key_map",
        "rules": [
          {
            "description": "my_key_map",
            "manipulators": [
              {
                "type": "basic",
                "from": {  
                  "key_code": "u",
                  "modifiers": {
                    "mandatory": [ "command" ], 
                    "optional": [ "any" ]
                  }
                },
                "to": [
                  {
                    "key_code": "left_arrow",
                    "modifiers": [
                        "command"
                    ]
                  }
                ]
              },
              {
                "type": "basic",
                "from": {  
                  "key_code": "y",
                  "modifiers": {
                    "mandatory": [ "command" ], 
                    "optional": [ "any" ]
                  }
                },
                "to": [
                  {
                    "key_code": "left_arrow",
                    "modifiers": [
                        "command",
                        "shift"
                    ]
                  }
                ]
              },
              {
                "type": "basic",
                "from": {  
                  "key_code": "i",
                  "modifiers": {
                    "mandatory": [ "command" ], 
                    "optional": [ "any" ]
                  }
                },
                "to": [
                  {
                    "key_code": "right_arrow",
                    "modifiers": [
                        "command"
                    ]
                  }
                ]
              },
              {
                "type": "basic",
                "from": {  
                  "key_code": "o",
                  "modifiers": {
                    "mandatory": [ "command" ], 
                    "optional": [ "any" ]
                  }
                },
                "to": [
                  {
                    "key_code": "right_arrow",
                    "modifiers": [
                        "command",
                        "shift"
                    ]
                  }
                ]
              },
              {
                "type": "basic",
                "from": {  
                  "key_code": "comma",
                  "modifiers": {
                    "mandatory": [ "command" ], 
                    "optional": [ "any" ]
                  }
                },
                "to": [
                  {
                    "key_code": "left_arrow",
                    "modifiers": [
                        "shift"
                    ]
                  }
                ]
              },
              {
                "type": "basic",
                "from": {  
                  "key_code": "period",
                  "modifiers": {
                    "mandatory": [ "command" ], 
                    "optional": [ "any" ]
                  }
                },
                "to": [
                  {
                    "key_code": "right_arrow",
                    "modifiers": [
                        "shift"
                    ]
                  }
                ]
              },
              {
                "type": "basic",
                "from": {  
                  "key_code": "d",
                  "modifiers": {
                    "mandatory": [ "command" ], 
                    "optional": [ "any" ]
                  }
                },
                "to": [
                  {
                    "key_code": "delete_forward"
                  }
                ]
              }
            ]
          }
        ]
      }
    

    然后在Add rule时就可以看到该配置项,Enable它即可。

    配置文件说明

    其实不需要太多说明,根据已有的配置文件猜一猜,改一改就可以了。

    备注

    各个键对应的英文名是什么?

    可以在Karabiner-Elements的Simple modifications中看到。

  • 相关阅读:
    性能测试总结(三)--工具选型篇
    什么是性能瓶颈
    基于Linux服务器的性能分析与优化
    常见的APP性能测试指标
    性能测试方案设计的方法和思路
    测试渐进式
    Selenium2Library关键字
    互联网运营工作四大内容
    RF学习过程中遇到的问题
    Robot Framework自动化测试环境的搭建
  • 原文地址:https://www.cnblogs.com/shanchuan/p/13661004.html
Copyright © 2020-2023  润新知