Input in editor scripts

Is it possible to detect user input in an editor script? The Input class isn't working at all. Input.GetKey never returns true, and Input.mousePosition is always zero.

Input does not work, but you can use Event.current.alt, Event.current.control, etc to see if alt or ctrl or any of the modifier keys are pressed.

And you can use Event.current.button to determine which mouse button is pressed!

It is not. The Input class is only running in playmode and runtime. For editor scripting you are limited to what GUI events offer you - meaning you would need your handler to live in either a custom inspector or an editor window.