How is Mouse Input Handled by Unity?

I'm thinking about writing a simple FPS in Unity. For the type of game I want to make I need to have really responsive mouse input. How does Unity provide mouse input on Windows (other platforms are less important)? I'm guessing Unity uses DirectInput. If so, is there any additional input lag created by Unity compared to using DirectInput directly?

Quake Live allow Windows users to either use DirectInput or raw USB device polling to read mouse input. Will Unity allow me to do my own input reading, e.g. link to DirectInput or poll the USB device?

You can get the raw input for a given axis using Input.GetAxisRaw:

new Vector3(Input.GetAxisRaw("Mouse X"), Input.GetAxisRaw("Mouse Y"), 0);

This is different from Input.GetAxis in that there is no smoothing applied to the input.

you can read input from USB with a DLL, it's not possible in unity API. but hey why you should do that. the API is fast enough and support all mouse types including but not limited to USB devices. in web player unity uses javascript to get keyboard and mouse input. in EXE builds and editor it might use or or any other library but the important factor is you can get the raw mouse input and also smooth input. for a FPS you should use the raw input. you can use any API you want in a DLL and then call your DLL functions in unity but you really don't need it.