Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Code snippets for the Corona SDK Tutorial: Game controllers and axes (
local function onInputDeviceStatusChanged( event )
-- Handle the input device change
if ( event.connectionStateChanged ) then
print( event.device.displayName .. ": " .. event.device.connectionState, event.device.descriptor, event.device.type, event.device.canVibrate )
Runtime:addEventListener( "inputDeviceStatus", onInputDeviceStatusChanged )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.