> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ILampArray::SupportsScanCodes

> ILampArray::SupportsScanCodes

# ILampArray::SupportsScanCodes

返回 ILampArray 是否支持使用键盘扫描代码来定位单个灯。这通常适用于 [LampArrayKind](/reference/lighting/lamparray/enums/lamparraykind) 为 Keyboard 的 ILampArrays。

## 语法

```cpp theme={null}
bool SupportsScanCodes(
)
```

### 参数

此方法没有参数。

### 返回值

类型：bool

如果至少有一个 Lamp 可通过键盘扫描代码寻址，则返回 true。

## 备注

如果某个 ILampArray 支持扫描代码，可以使用 [ILampArray::SetColorsForScanCodes](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforscancodes) 更改设备上的颜色。

## 要求

**头文件：** LampArray.h

**库：** xgameplatform.lib

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[光照 API 概览](/build/core-features/common/lighting/gc-lighting-toc)\
[ILampArray::SetColorsForScanCodes](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforscancodes)\
[ILampArray](/reference/lighting/lamparray/interfaces/ilamparray/ilamparray)


## Related topics

- [ILampInfo::GetScanCode](/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getscancode.md)
- [ILampArray::SetColorsForScanCodes](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforscancodes.md)
- [ILampArray](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/ilamparray.md)
- [ILampArray::SetColorsForIndices](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforindices.md)
- [ILampArray::SetColor](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolor.md)
