Input state assumptions / reliability

Can I use Input.GetAxis(“someAxis”) as a boolean to see if any input events have occurred or not? Won’t it return 0 (or would 0.0 be more apropriate?) if no input events have occurred on this axis? If not, is there some other way to check if anything has happened to this Input axis since last frame (be it a button click/press/release or a mouse/joystick/touch movement etc)?

Furthermore; is it ok to assume that if Input.GetAxis(“someMouseEvent”) returns 0, that definitely guarantees the mouse is in the same spot (and click-state) as last frame? Or does it make sense to suspect maybe some popup program or alt-tabbing or program hang/hiccup has interrupted us and the mouse may be positioned/clicked otherwise than assumed? How does Unity handle losing input focus?

You might find it easier to use GetAxisRaw for keyboard input, but you can use GetAxis with a bit of extra code to see if it is greater than zero, etc.

I don’t think Unity caters for the situation where focus is lost, the mouse moves and then focus returns. It might be better to store the mouse position yourself if you need to detect things like this.