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

# GetScanCode

> Returns the keyboard scan code associated with a Lamp on a LampArray keyboard, letting titles map lighting to specific physical keys on the device.

Returns the keyboard scan code associated with this Lamp.

## Syntax

```cpp theme={null}
uint32_t GetScanCode(
)
```

### Parameters

This method has no parameters.

### Return value

Type: uint32\_t

The keyboard scan code associated with this Lamp. Returns 0 if this Lamp is not addressable by a keyboard scan code.

## Remarks

This method will return 0 if the LampArray does not support scan codes (see [ILampArray::SupportsScanCodes](https://docs.xbox.com/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_supportsscancodes.md)).

## Requirements

**Header:** LampArray.h

**Library:** xgameplatform.lib

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[Lighting API Overview](https://docs.xbox.com/build/core-features/common/lighting/gc-lighting-toc.md)\
[Windows Keyboard Input Reference - Scan Codes](https://learn.microsoft.com/windows/win32/inputdev/about-keyboard-input#scan-codes)\
[ILampInfo](https://docs.xbox.com/reference/lighting/lamparray/interfaces/ilampinfo/ilampinfo.md)


## Related topics

- [ILampInfo (Interface contents)](https://docs.xbox.com/reference/lighting/lamparray/interfaces/ilampinfo/ilampinfo.md)
- [SupportsScanCodes](https://docs.xbox.com/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_supportsscancodes.md)
- [SetColorsForScanCodes](https://docs.xbox.com/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforscancodes.md)
- [GetLampInfo](https://docs.xbox.com/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampinfo.md)
- [ILampArray (Interface contents)](https://docs.xbox.com/reference/lighting/lamparray/interfaces/ilamparray/ilamparray.md)
