LampArray.SetColorsForKeys(Color[], VirtualKey[]) Method

Definition

Sets the color of multiple lamps, corresponding to mapped keys. Position within each array maps keys to desired color.

public:
 virtual void SetColorsForKeys(Platform::Array <Color> ^ desiredColors, Platform::Array <VirtualKey> ^ keys) = SetColorsForKeys;
void SetColorsForKeys(winrt::array_view <Color> const& desiredColors, winrt::array_view <VirtualKey> const& keys);
public void SetColorsForKeys(Color[] desiredColors, VirtualKey[] keys);
function setColorsForKeys(desiredColors, keys)
Public Sub SetColorsForKeys (desiredColors As Color(), keys As VirtualKey())

Parameters

desiredColors
Color[]

Array of desired colors.

keys
VirtualKey[]

Array of corresponding VirtualKeys to modify.

Examples

LampArray sample

Demonstrates how to control RGB lighting of peripheral devices using the Windows.Devices.Lights and Windows.Devices.Lights.Effects APIs.

AutoRGB Sample

Demonstrates how to extract a single, representative color from a desktop screen and use it to illuminate LED lamps on a connected RGB device.

Remarks

If the lamp index doesn't support the desired color, it is set to the NearestSupportedColor

If a VirtualKey is not bound to any lamp on the device, it is ignored and the remaining are still applied.

Black is equivalent to a lamp being 'off'.

Applies to

See also