inputDeviceStatus

类型 事件
修订 版本 2024.3703
关键词 inputDeviceStatus

概述

此事件指示输入设备的状态已更改,例如当输入设备已连接到系统或从系统断开连接时,或者当设备的配置已更改时。

此事件可用于以下场景

属性

event.connectionStateChanged

event.device

event.name

event.reconfigured

示例

-- Called when one input device's status has been changed
local function onInputDeviceStatusChanged( event )
    -- handle the input device change
end

-- Add the input device status event listener
Runtime:addEventListener( "inputDeviceStatus", onInputDeviceStatusChanged )