0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Sway で ThinkPad の TrackPoint の中クリックだけ無効

0
Posted at

目的

LinuxだとTrackPointの中ボタンでリンクを開いてしまったり,クリップボードの中身を貼り付けてしまうことがあります.これを止めることが目的です.しかし,ミドルボタンは同時にスクロール機能も担っているので単にlibinputから無効化はできません.そこで,swayの設定で解決しました.

変更したファイル

~/.config/sway/config.d/65-disable-middle-click.conf

設定内容

input "2:10:TPPS/2_Elan_TrackPoint" {
    scroll_method on_button_down
    scroll_button button2
    scroll_button_lock disabled
    middle_emulation disabled
}

bindsym --input-device="2:10:TPPS/2_Elan_TrackPoint" --whole-window button2 nop
bindsym --input-device="2:10:TPPS/2_Elan_TrackPoint" --whole-window --release button2 

各行の意味

scroll_method on_button_down

指定したボタンを押している間だけTrackPoint の動きをスクロールとして扱います.

scroll_button button2

スクロールに使うボタンを中ボタンにします.

scroll_button_lock disabled

スクロール状態をロックしないようにします.
中ボタンを押している間だけスクロールになります.

middle_emulation disabled

左右ボタンの同時押しを中クリック扱いにする機能を無効にします.

bindsym ... button2 nop

TrackPoint の中ボタン押下を Sway 側で受け取り,何もしないようにします.
これによりアプリへ通常の中クリックとして渡らなくなります.

bindsym ... --release button2 nop

中ボタンを離したイベントも同じように受け取り何もしないようにします.

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?