> ## 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 方法

> 傳回 LampArray 是否支援依鍵盤掃描碼定址個別 Lamp，通常對 LampArrayKind 為 Keyboard 的周邊裝置為 true。

# ILampArray::SupportsScanCodes

傳回 ILampArray 是否支援使用鍵盤掃描碼來指定個別 Lamp。這通常適用於 [LampArrayKind](/zh-TW/reference/lighting/lamparray/enums/lamparraykind) 為 Keyboard 的 ILampArray。

## 語法

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

### 參數

此方法沒有參數。

### 傳回值

類型：bool

如果至少有一個 Lamp 可透過鍵盤掃描碼定址，則傳回 true。

## 備註

如果 ILampArray 支援掃描碼，可以使用 [ILampArray::SetColorsForScanCodes](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforscancodes) 變更裝置上的色彩。

## 需求

**標頭：** LampArray.h

**程式庫：** xgameplatform.lib

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

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


## Related topics

- [ILampArray::SetColorsForScanCodes 方法](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforscancodes.md)
- [ILampInfo::GetScanCode 方法](/zh-TW/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getscancode.md)
- [ILampArray 介面參考](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/ilamparray.md)
- [ILampArray::SetColor 方法](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolor.md)
- [ILampArray::SetColorsForIndices 方法](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforindices.md)
