Type Function Library system.* Return value none Revision Release 2024.3703 Keywords multitouch See also system.activate()
Deactivates a system-level feature such as "multitouch"
.
Multitouch is disabled by default, so there will be no effect unless it was previously activated via system.activate().
system.deactivate( feature )
String. The system feature to be deactivated. Currently, the only supported values include:
"multitouch"
— See the Tap/Touch/Multitouch guide for more information."controllerUserInteraction"
— See the Apple TV / tvOS guide for more information.-- The following sample activates multitouch and creates a touch listener for a graphic -- This displays the location, phase, and touch ID of each touch event -- After 8 seconds, multitouch is then deactivated system.activate( "multitouch" ) local bg = display.newRect( 0, 0, 320, 480 ) local output = native.newTextBox( 0, 20, 320, 240 ) output.size = 12 function showTouch( event ) -- Display the event info on the screen output.text = output.text .. "\nPhase: " .. event.phase output.text = output.text .. "\n(" .. event.x .. "," .. event.y .. ")" output.text = output.text .. "\nId: " .. tostring( event.id ) end bg:addEventListener( "touch", showTouch ) -- Deactivate multitouch after 8 seconds timer.performWithDelay( 8000, function() system.deactivate( "multitouch" ); end )