used to record mouse and keyboard events to determine if a context menu is being opened with the keyboard or the mouse