How windows OS processes input events?

The way i understand it right now is that whenever you move the mouse or hit a keyboard, that event passes through a raw input thread, then gets stored in a system message queue (where all messages, like WM_PAINT are stored), then passes through a message-specific chain of hook procedures before finally arriving at the window-specific message queue that winforms gets messages from.

Am i correct in this and where could i find more info on it?
Was this page helpful?