我一直在尝试使用 xbindkeys,不知怎么的,我成功让主按钮复制,中间按钮粘贴。当我突出显示文本时,它会被添加到我的剪贴板中。
这种行为对我没有吸引力,我希望我的按钮再次恢复正常。
$HOME/.xbindkeysrc
:
# For the benefit of emacs users: -*- shell-script -*-
###########################
# xbindkeys configuration #
###########################
#
# Version: 1.8.7
#
# If you edit this file, do not forget to uncomment any lines
# that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# To specify a key, you can use 'xbindkeys --key' or
# 'xbindkeys --multikey' and put one of the two lines in this file.
#
# The format of a command line is:
# "command to start"
# associated key
#
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier:
# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# The release modifier is not a standard X modifier, but you can
# use it if you want to catch release events instead of press events
# By defaults, xbindkeys does not pay attention with the modifiers
# NumLock, CapsLock and ScrollLock.
# Uncomment the lines above if you want to pay attention to them.
#keystate_numlock = enable
#keystate_capslock = enable
#keystate_scrolllock= enable
# Examples of commands:
"xbindkeys_show"
control+shift + q
# set directly keycode (here control + f with my keyboard)
#"xterm"
# c:41 + m:0x4
# specify a mouse button
#"xterm"
# control + b:2
#"xterm -geom 50x20+20+20"
# Shift+Mod2+alt + s
#
## set directly keycode (here control+alt+mod2 + f with my keyboard)
#"xterm"
# alt + c:0x29 + m:4 + mod2
#
## Control+Shift+a release event starts rxvt
#"rxvt"
# release+control+shift + a
#
## Control + mouse button 2 release event starts rxvt
#"rxvt"
# Control + b:2 + Release
# Back changed to Copy
"xte 'keydown Control_L' 'key C' 'keyup Control_L'"
b:9
# Front changed to Paste
"xte 'keydown Control_L' 'key V' 'keyup Control_L'"
b:8
##################################
# End of xbindkeys configuration #
##################################
xev
按下主按钮时的输出:
ButtonPress event, serial 25, synthetic NO, window 0x5200001,
root 0x582, subw 0x5200002, time 8362463, (36,45), root:(1736,214),
state 0x10, button 1, same_screen YES
--
ButtonRelease event, serial 25, synthetic NO, window 0x5200001,
root 0x582, subw 0x5200002, time 8362545, (36,45), root:(1736,214),
state 0x110, button 1, same_screen YES
xev
中间按钮的输出:
ButtonPress event, serial 25, synthetic NO, window 0x5400001,
root 0x582, subw 0x0, time 9840391, (63,69), root:(1763,238),
state 0x10, button 2, same_screen YES
ButtonRelease event, serial 25, synthetic NO, window 0x5400001,
root 0x582, subw 0x0, time 9840487, (63,69), root:(1763,238),
state 0x210, button 2, same_screen YES