You'll need to configure your mouse drivers to send key commands via the mouse buttons. In your case, configure your outer right and outer left buttons to be "z" and "shift-z".