1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Ubuntu 20.04でMx Master3のキーバインドを変更する

Posted at

はじめに

ubuntu ではlogicool optionが提供されていないので、以前はeasy strokeを使ってマウスのキーバインドを変更していた
ubuntu20.04にUpdateしたら、easy strokeでマウスボタンにキーバインドを設定する機能がうまく動かなかったので、別の方法をさがした

結論 logiopsを入れる

sudo apt install cmake libevdev-dev libudev-dev libconfig++-dev
git clone git@github.com:PixlOne/logiops.git
cd logiops
mkdir build
cd build
cmake ..
make
sudo make install

これでインストールできる

設定ファイルの書き方

サンプルはgitのリポジトリにある
https://github.com/PixlOne/logiops/blob/master/logid.example.cfg

今回はマウスホイールのクリックにF3キーを割当たかったので以下の感じ

/etc/logid.cfg
devices: (
{
    name: "Wireless Mouse MX Master 3";
    buttons: (
        {
            # Wheel press
            cid: 0x52;
            action =
            {
                type: "Keypress";
                keys: ["KEY_F3"];
            };
        }
    );
}
);

その他

cid は以下のコマンドで調べられる(どのボタンがどのcidかは分からなかったので、実際に設定してみて動きを見た)

$ sudo logid -v DEBUG

[DEBUG] Unsupported device /dev/hidraw0 ignored
[INFO] Device found: Wireless Mouse MX Master 3 on /dev/hidraw1:255
[DEBUG] /dev/hidraw1:255 remappable buttons:
[DEBUG] CID  | reprog? | fn key? | mouse key? | gesture support?
[DEBUG] 0x50 |         |         | YES        | 
[DEBUG] 0x51 |         |         | YES        | 
[DEBUG] 0x52 | YES     |         | YES        | YES
[DEBUG] 0x53 | YES     |         | YES        | YES
[DEBUG] 0x56 | YES     |         | YES        | YES
[DEBUG] 0xc3 | YES     |         | YES        | YES
[DEBUG] 0xc4 | YES     |         | YES        | YES
[DEBUG] 0xd7 | YES     |         |            | YES
[DEBUG] Thumb wheel detected (0x2150), capabilities:
[DEBUG] timestamp | touch | proximity | single tap
[DEBUG] YES       | YES   | YES       | YES       
[DEBUG] Thumb wheel resolution: native (18), diverted (120)

ちなみにMX Master3のcidは以下

wheel Press: 0x52;
Back Button: 0x53;
Forward Button: 0x56;
Gesture Button: 0xc3;
Toggle SmartShift: 0xc4;
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?