Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

鼠标按键映射不起作用 #235

Closed
Moexin opened this issue Aug 13, 2022 · 14 comments
Closed

鼠标按键映射不起作用 #235

Moexin opened this issue Aug 13, 2022 · 14 comments
Labels

Comments

@Moexin
Copy link

Moexin commented Aug 13, 2022

不知道是配置错误还是权限问题,查看文档没找到具体需要赋予哪些权限。

配置如下:

{
  "$schema" : "https:\/\/app.linearmouse.org\/schema\/0.7.3",
  "schemes" : [
    {
      "buttons" : {
        "universalBackForward" : false,
        "mappings" : [
          {
            "button" : 3,
            "command" : true,
            "action" : "missionControl.spaceLeft"
          },
          {
            "button" : 4,
            "command" : true,
            "action" : "missionControl.spaceRight"
          }
        ]
      },
      "if" : {
        "device" : {
          "productName" : "Wired Gaming Mouse",
          "productID" : "0x2e",
          "category" : "mouse",
          "vendorID" : "0x258a"
        }
      },
      "pointer" : {
        "disableAcceleration" : true
      },
      "scrolling" : {
        "reverse" : {
          "vertical" : true
        },
        "distance" : "36px"
      }
    }
  ]
}
@lujjjh
Copy link
Collaborator

lujjjh commented Aug 13, 2022

配置看起来没有问题,可否看下按下 command + 后退command + 前进 时的日志(参考 #117)?

另外,其他 action(比如 missionControl)有效吗?

@Moexin
Copy link
Author

Moexin commented Aug 13, 2022

配置看起来没有问题,可否看下按下 command + 后退 和 command + 前进 时的日志(参考 #117)?

另外,其他 action(比如 missionControl)有效吗?

missionControl 是有效的,抓取日志抓不到不知道是不是抓取设置有问题

截屏2022-08-13 10.23.44.png

@Moexin
Copy link
Author

Moexin commented Aug 13, 2022

权限只给了这个,是不是需要别的权限?

截屏2022-08-13 10.25.42.png

@Moexin
Copy link
Author

Moexin commented Aug 13, 2022

截屏2022-08-13 10.33.26.png

@Moexin
Copy link
Author

Moexin commented Aug 13, 2022

去掉 "command" : true, 就可以使用了,就很迷。。。

{
  "$schema" : "https:\/\/app.linearmouse.org\/schema\/0.7.3",
  "schemes" : [
    {
      "buttons" : {
        "universalBackForward" : false,
        "mappings" : [
          {
            "button" : 3,
            "action" : "missionControl.spaceLeft"
          },
          {
            "button" : 4,
            "action" : "missionControl.spaceRight"
          }
        ]
      },
      "if" : {
        "device" : {
          "productName" : "Wired Gaming Mouse",
          "productID" : "0x2e",
          "category" : "mouse",
          "vendorID" : "0x258a"
        }
      },
      "pointer" : {
        "disableAcceleration" : true
      },
      "scrolling" : {
        "reverse" : {
          "vertical" : true
        },
        "distance" : "36px"
      }
    }
  ]
}

@lujjjh
Copy link
Collaborator

lujjjh commented Aug 13, 2022

"command" : true 代表需要按下 command

看日志是没有匹配到 mapping,因为输出的 button 是对的,所以应该是没有识别到 command 按下,或者同时按下了其他修饰键(我应该在日志中打印按下了哪些修饰键……)

但是改成 missionControl 又有效,这就比较奇怪了,missionControl 也是配置了 "command": true 的吗?

@Moexin
Copy link
Author

Moexin commented Aug 13, 2022

"command" : true 代表需要按下 command。

看日志是没有匹配到 mapping,因为输出的 button 是对的,所以应该是没有识别到 command 按下,或者同时按下了其他修饰键(我应该在日志中打印按下了哪些修饰键……)

但是改成 missionControl 又有效,这就比较奇怪了,missionControl 也是配置了 "command": true 的吗?

我又测试了以下配置也能正确生效,并且加上 "command" : true 也会失效。。。

{
  "$schema" : "https:\/\/app.linearmouse.org\/schema\/0.7.3",
  "schemes" : [
    {
      "buttons" : {
        "universalBackForward" : false,
        "mappings" : [
          {
            "button" : 3,
            "action" : "spaceRight"
          },
          {
            "button" : 4,
            "action" : "spaceLeft"
          }
        ]
      },
      "if" : {
        "device" : {
          "productName" : "Wired Gaming Mouse",
          "productID" : "0x2e",
          "category" : "mouse",
          "vendorID" : "0x258a"
        }
      },
      "pointer" : {
        "disableAcceleration" : true
      },
      "scrolling" : {
        "reverse" : {
          "vertical" : true
        },
        "distance" : "36px"
      }
    }
  ]
}

@Moexin
Copy link
Author

Moexin commented Aug 13, 2022

但是改成 missionControl 又有效,这就比较奇怪了,missionControl 也是配置了 "command": true 的吗?

missionControl 没有配置 "command": true

@lujjjh
Copy link
Collaborator

lujjjh commented Aug 13, 2022

挺奇怪的……其他修饰键能否正常工作呢?比如配置 "shift": true"option": true 或者 "control": true

LinearMouse 偏好设置里修饰键的功能(比如按下 command 加速滚动)又能否正常工作呢?

@Moexin
Copy link
Author

Moexin commented Aug 13, 2022

挺奇怪的……其他修饰键能否正常工作呢?比如配置 "shift": true"option": true 或者 "control": true

LinearMouse 偏好设置里修饰键的功能(比如按下 command 加速滚动)又能否正常工作呢?

偏好设置里修饰键的功能按下 command 改变方向是有效的

{
  "$schema" : "https:\/\/app.linearmouse.org\/schema\/0.7.3",
  "schemes" : [
    {
      "buttons" : {
        "universalBackForward" : false,
        "mappings" : [
          {
            "button" : 3,
            "action" : "missionControl.spaceRight"
          },
          {
            "button" : 4,
            "action" : "missionControl.spaceLeft"
          }
        ]
      },
      "if" : {
        "device" : {
          "productName" : "Wired Gaming Mouse",
          "productID" : "0x2e",
          "category" : "mouse",
          "vendorID" : "0x258a"
        }
      },
      "pointer" : {
        "disableAcceleration" : true
      },
      "scrolling" : {
        "reverse" : {
          "vertical" : true
        },
        "distance" : "36px",
        "modifiers" : {
          "command" : {
            "type" : "alterOrientation"
          }
        }
      }
    }
  ]
}

@lujjjh
Copy link
Collaborator

lujjjh commented Aug 13, 2022

感谢你提供的信息,结合目前的信息,在你的环境里:

  1. command + 前进/后退被识别成了 ? + 前进/后退,但是 command + 滚动可以正常识别
  2. command + 其他按键(比如右键)或者其他修饰键 + 前进/后退能否正常工作未知

目前没什么排查思路,看你的截图似乎也没有安装任何可能与 LinearMouse 产生冲突的 app。下个版本我会在日志中输出按下的修饰键,方便进一步排查问题。

@Moexin
Copy link
Author

Moexin commented Aug 13, 2022

感谢你提供的信息,结合目前的信息,在你的环境里:

  1. command + 前进/后退被识别成了 ? + 前进/后退,但是 command + 滚动可以正常识别
  2. command + 其他按键(比如右键)或者其他修饰键 + 前进/后退能否正常工作未知

目前没什么排查思路,看你的截图似乎也没有安装任何可能与 LinearMouse 产生冲突的 app。下个版本我会在日志中输出按下的修饰键,方便进一步排查问题。

好的,辛苦作者了。刚重装的系统,还没装其他软件,所以可以排除其他app影响了。

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Oct 13, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants