GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
toggle_mouse_grab(3) Arcan Lua API toggle_mouse_grab(3)

toggle_mouse_grab - Switch the lock state of the mouse device.

grabstate
toggle_mouse_grab(

optmode )

For some control schemes, it's important to prevent mouse input from being dropped due to window managers in the underlying OS . This function 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.

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.

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

function toggle_mouse_grab0()
      toggle_mouse_grab(100);
end
June 2022 iodev

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.