Please Help - Getting messages when mouse button down

Is it possible to handle mousemove or key stroke messages when a mouse
button is down? For example, a context senstive pop-up menu ignores
any shortcut key as long as the right button is down.