KeyboardAndMouseControl library

I am trying the KeyboardAndMouseControl library with Arduino Leonardo.

I am connecting four buttons to pins 2,3,4 and 5.

I tested the library with Microsoft Word open it as I pressed the buttons it typed the characters u, d, l and r but there is no mouse control. Please advice.

Thanks.

pinMode(allbutton, INPUT); and what is your button wire? pull up or pull down?