マウスのボタン 2 のプレスとリリースを別々にキャプチャしたいと思います。xbindkeys を使用したかったのですが、そのような機能は提供されません。(そうですか?)
これ: http://developers-blog.org/blog/default/2010/08/10/XServer-Event-Handling-C-Exampleは、多かれ少なかれ、自分で書いたときにこのようなものがどのように機能するかを説明しています。ただし、ButtonPressMask を追加すると、次のようになります。
func: attach_to_focuswin
func: handle_event
X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Serial number of failed request: 8
Current serial number in output stream: 8