How to handle right joystick events in shield?

Hi folks,

I’m developing an android application on nvidia shield and have to handle joystick events of device.
I can handle left joystick (directions) events and display their keycode but the right joystick, which
behaves like mouse, events can’t be handled as a direction. Is there any solution to handle it?