FreeBSD Manual Pages
toggle_mouse_grab(3) Arcan Lua API toggle_mouse_grab(3) NAME toggle_mouse_grab - Switch the lock state of the mouse device. SYNOPSIS grabstate toggle_mouse_grab( optmode ) DESCRIPTION For some control schemes, it's important to prevent mouse input from being dropped due to window managers in the underlying OS . This func- tion allows you to toggle this state (or explicitly set it to MOUSE_GRABON or MOUSE_GRABOFF ). Calling this function always return the current active state. NOTES 1 always provide escape options for the user to disable grab in order to allow poor desktop environments to recover in the event of a live-lock. EXAMPLE function toggle_mouse_grab0() print( tostring( toggle_mouse_grab() ) ); print( tostring( toggle_mouse_grab() ) ); print( tostring( toggle_mouse_grab(MOUSE_GRABON) ) ); print( tostring( toggle_mouse_grab(MOUSE_GRABOFF) ) ); end MISUSE function toggle_mouse_grab0() toggle_mouse_grab(100); end iodev December 2021 toggle_mouse_grab(3)
NAME | SYNOPSIS | DESCRIPTION | NOTES | EXAMPLE | MISUSE
Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=toggle_mouse_grab&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>