zoukankan      html  css  js  c++  java
  • macos下用karabiner实现preview翻半页

    其实我没找到翻半页的方式,只是搞了个方法多翻几行,来达到效果。
    配置文件目录:

    /Users/xxx/.config/karabiner/assets/complex_modifications
    

    新增一个my.json

    {
      "title": "my_key_map",
      "rules": [
        {
          "description": "my_key_map",
          "manipulators": [
            {
              "type": "basic",
              "conditions": [
                {
                  "bundle_identifiers": [
                    "^com\.apple\.Preview$"
                  ],
                  "type": "frontmost_application_if"
                }
              ],
              "from": {
                "key_code": "d"
              },
              "to": [
                {
                  "key_code": "up_arrow"
                },
                {
                  "key_code": "up_arrow"
                },
                {
                  "key_code": "up_arrow"
                },
                {
                  "key_code": "up_arrow"
                },
                {
                  "key_code": "up_arrow"
                }
              ]
            },
            {
              "type": "basic",
              "conditions": [
                {
                  "bundle_identifiers": [
                    "^com\.apple\.Preview$"
                  ],
                  "type": "frontmost_application_if"
                }
              ],
              "from": {
                "key_code": "f"
              },
              "to": [
                {
                  "key_code": "down_arrow"
                },
                {
                  "key_code": "down_arrow"
                },
                {
                  "key_code": "down_arrow"
                },
                {
                  "key_code": "down_arrow"
                },
                {
                  "key_code": "down_arrow"
                }
              ]
            },
            {
              "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_or_backspace"
                }
              ]
            }
          ]
        }
      ]
    }
    

    然后在karabiner的设置中重新加载一下rule,remove再enable。

  • 相关阅读:
    添加脚本真机调试Error launching remote program: failed to get the task for process xxx.
    问题资源Android lint 能够做的事情
    调用生成通过存储过程自动生成AWR报告
    破解行Android apk 逆向工程研究﹣破解 MyTV HD 機種限制手記
    代码判断判断给定的图是否是有向无环图
    修改系统android2.3.4增加gsensor
    类对象工厂设计模式(Factory Pattern)
    脚本指令《游戏脚本的设计与开发》第一章 读取和解析一个脚本文件
    级别指示Android Hierarchy 工具的一些知识
    nullnull[小代码] 双击BACK键 退出
  • 原文地址:https://www.cnblogs.com/shanchuan/p/15315165.html
Copyright © 2011-2022 走看看