Site Tools
Sidebar
User's Manual
t2:mouse_set
mouse_set
mouse_set — Set the status of a mouse input
Description
void mouse_set(uint8 ident, int32 status);
Set the current status of the mouse input specified by ident.
Works only when the active output protocol is Multi Interface HID. |
Parameters
- ident: Identifier of a mouse input. Refer to mouse.gph for the mouse identifiers definitions.
- status: Value that represents the current status of the mouse input specified by ident.
Return Value
No value is returned.
Examples
Example #1 mouse_set() example
#include <mouse.gph> main { combo_run(Stick2Mouse); mouse_set(MBUTTON_1, (int)get_val(BUTTON_16)); mouse_set(MBUTTON_2, (int)get_val(BUTTON_15)); } combo Stick2Mouse { fix32 m = get_val(STICK_1_X); fix32 s = (m >= 0.0) ? 1.0 : -1.0; m = abs(m); m = (m >= 10.0) ? ((m - 10.0) * 0.08) : 0.0; mouse_set(MOUSE_X, (int)(m * s)); m = get_val(STICK_1_Y); s = (m >= 0.0) ? 1.0 : -1.0; m = abs(m); m = (m >= 10.0) ? ((m - 10.0) * 0.08) : 0.0; mouse_set(MOUSE_Y, (int)(m * s)); wait(0); wait(6); }
See Also
t2/mouse_set.txt · Last modified: 2018/02/20 07:02 by J2Kbr