类型 字符串 对象 InputDevice 修订版 发行版 2024.3703 关键字 设备、输入、类型
指定连接到系统的设备类型的字符串。可能的值为
"keyboard"
"mouse"
"stylus"
"trackball"
"touchpad"
"touchscreen"
"joystick"
"gamepad"
"directionalPad"
"steeringWheel"
"flightStick"
"guitar"
"drumSet"
"dancePad"
"unknown"
-- Called when a key event has been received. local function onKeyEvent( event ) if event.device then print( "Device Type: " .. event.device.type ) end end -- Set up the above function to receive key events. Runtime:addEventListener( "key", onKeyEvent )