Mouse

如何使 imwheel 將大多數修改器操作保留為預設值?

  • April 29, 2016

我正在嘗試shift使用+進行水平滾動scroll wheel。我試過使用imwheel,在~/.imwheelrc

".*"
Shift_L, Up, Left
Shift_L, Down, Right

然後我執行imwheel -b 45。這使得shift+scroll wheel按預期工作。

但是,它會阻止傳遞一些其他預設事件,例如ctrl+scroll wheelsuper+ scroll wheel。相反,這些似乎被解釋為正常的(未修改的)滾動。

我試著把東西放進Control_L, Up, Control_L|Up~/.imwheelrc,但這沒有用。

Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5

在您的 .imwheelrc 中應該可以解決問題。請務必重新啟動 imwheel 以使更改生效。請注意,多次啟​​動 imwheel 會導致未定義的行為。

編輯

根據 OP 的回饋,關鍵是映射到Button4/Button5而不是Up/ Down。因此,以下工作~/.imwheelrc,其次是執行imwheel -b 45。(為了完整起見,我還考慮了Alt,HyperMeta右側的鍵。)

".*"
Shift_L, Up, Left
Shift_L, Down, Right
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Super_L, Up, Super_L|Button4
Super_L, Down, Super_L|Button5
Alt_L, Up, Alt_L|Button4
Alt_L, Down, Alt_L|Button5
Hyper_L, Up, Hyper_L|Button4
Hyper_L, Down, Hyper_L|Button5
Meta_L, Up, Meta_L|Button4
Meta_L, Down, Meta_L|Button5
Shift_R, Up, Left
Shift_R, Down, Right
Control_R, Up,   Control_R|Button4
Control_R, Down, Control_R|Button5
Super_R, Up, Super_R|Button4
Super_R, Down, Super_R|Button5
Alt_R, Up, Alt_R|Button4
Alt_R, Down, Alt_R|Button5
Hyper_R, Up, Hyper_R|Button4
Hyper_R, Down, Hyper_R|Button5
Meta_R, Up, Meta_R|Button4
Meta_R, Down, Meta_R|Button5

引用自:https://unix.stackexchange.com/questions/151495