set-cursor-to-mouse - Move the cursor to the current mouse position
set-cursor-to-mouse sets the current window and cursor position to the location of the mouse on it's last event (button press or release). This command may change the current window. If the line on which the mouse was located was the message line then the no action is taken, if the line was a window mode line the that window is made the current window but the cursor location within the window remains the same. This is usually used in user defined macros that control the functionality of the mouse.
Invocation of this command sets the variable $mouse-pos(5) which determines where the mouse is within the window. Interrogation of the variable following the command may be used to determine if the mouse is located on one of the more specialized window or screen regions.
An argument n determines if the command is permitted to change windows and cursor position, where the bits are defined as follows:
The default argument when omitted is 3, allowing the changing of both.
When writing macros to cut and paste using the mouse, care should be taken to ensure that the window at the button release is the same is at the button press. If this is not undertaken, undesired effects could result. The use of set-position(2) and goto-position(2) are most usefully used with this command to restore existing window context.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2004/03/23
Generated On: 2006/10/07