The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

Binding mouse buttons

asked 2012-09-19 20:14:22 +0000

b_garcia gravatar image

What's the best way to react to mouse events? I'd like to be able to $mod + middle click to close a window for example.

edit retag flag offensive close merge delete


I also want this..

diablo465 gravatar imagediablo465 ( 2013-10-24 11:07:04 +0000 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2012-09-19 20:27:45 +0000

Michael gravatar image

updated 2015-10-11 10:34:43 +0000

This is not possible yet, the relevant feature request ticket is at

edit flag offensive delete link more

answered 2013-08-14 11:51:18 +0000

tab3 gravatar image

Some workaround I use. I have mouse with additional buttons, so I've found out with xev the button code (6). And changed ~/.xbindkeysrc to:

"xdotool key alt+F4"

(alt+F4 is my combination to close window)

edit flag offensive delete link more


Works like a charm. Thanks!!!

dang2327 gravatar imagedang2327 ( 2014-04-17 06:56:23 +0000 )edit

answered 2013-08-21 14:06:37 +0000

scotths gravatar image

You could also consider a program such as easy stroke. You can map various mouse gestures including combinations of buttons with or without pauses to any key combination. I've used it for years with openbox to essentially move windows into various tiling manager type arrangements. Experimenting now with it in combination with i3.

edit flag offensive delete link more

Question Tools


Asked: 2012-09-19 20:14:22 +0000

Seen: 1,724 times

Last updated: Oct 11