Get gamepad device properties (:get_properties)
This method is available in versions after 20260805
Declaration
properties = pad:get_properties()
Returns
- properties Table. A copy of the configuration properties saved when the device was created
Description
- This returns the configuration saved when the gamepad was created, which may include system-managed properties
- The return value does not represent the values ultimately used by the system. Do not use it to determine whether the target app recognized the gamepad
- Scripts should rely only on fields they supplied or that are documented
Example
local pad = assert(gamepad.connect())
local properties = pad:get_properties()
print(properties.Product)
print(properties.Transport)
assert(pad:disconnect())