Here is the part of the code: 

```
extra_btn_fd = open("/dev/input/by-id/usb-Razer_Razer_Naga_2014-event-mouse", O_RDONLY); 

ioctl(extra_btn_fd, EVIOCGRAB, 1);

```

The problem is that it gets control of not only the 2 extra buttons (forward and backward) but also of the click buttons (and scroll I think).

I'm trying to get exclusively the control of the 2 forward and backward buttons and not the clicks.