MInecraft not working with xbindkeys
you can just use an autoclick program and set it up to activate and stop when you press the 9 key... https://www.opautoclicker.com/ this is an easy to use autoclicker, which I use (not in pvp servers...). You can also set it up to click how many times you want, how fast you want, left click/right click, single or double click... Really useful
You can set the side mouse button to the attack/destroy button in minecraft