how to detect conected hardware.i mean (same as music key) detection.i need to connect a optical mouse.is it possible.idont know more about mouse voltage.

Micro usbwe have d+,d-,
Can we use these as input.

or headphone volume +,- keys can we used as x,y of mouse