Interface IKeyboard
Interface for keyboard functionality.
Inherited Members
Namespace: Colore
Assembly: Colore.dll
Syntax
public interface IKeyboard : IDevice
Properties
IsDeathstalkerConnected
Gets a value indicating whether a Razer Deathstalker Chroma is connected to the system.
Declaration
bool IsDeathstalkerConnected { get; }
Property Value
Type | Description |
---|---|
Boolean |
Item[Key]
Gets or sets the Color for a specific Key on the keyboard. The SDK will translate this appropriately depending on user configuration.
Declaration
Color this[Key key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Key | key | The key to access. |
Property Value
Type | Description |
---|---|
Color | The color currently set for the specified key. |
Item[Int32]
Gets or sets the Color for a specific Deathstalker zone.
Declaration
Color this[int zoneIndex] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | zoneIndex | Zone to query, between 0 and MaxDeathstalkerZones (exclusive upper bound). |
Property Value
Type | Description |
---|---|
Color | The color currently set for the specified zone. |
Item[Int32, Int32]
Gets or sets the Color for a specific row and column on the keyboard grid.
Declaration
Color this[int row, int column] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | row | Row to query, between 0 and MaxRows (exclusive upper-bound). |
Int32 | column | Column to query, between 0 and MaxColumns (exclusive upper-bound). |
Property Value
Type | Description |
---|---|
Color | The color currently set on the specified position. |
Methods
IsSet(Key)
Returns whether a certain key has had a custom color set.
Declaration
bool IsSet(Key key)
Parameters
Type | Name | Description |
---|---|---|
Key | key | Key to check. |
Returns
Type | Description |
---|---|
Boolean |
|
SetCustomAsync(CustomKeyboardEffect)
Sets a custom grid effect on the keyboard.
Declaration
Task<Guid> SetCustomAsync(CustomKeyboardEffect effect)
Parameters
Type | Name | Description |
---|---|---|
CustomKeyboardEffect | effect | Effect options. |
Returns
Type | Description |
---|---|
Task<Guid> | A Guid for the effect that was set. |
Remarks
This will overwrite the current internal CustomKeyboardEffect struct in the Colore.Implementations.KeyboardImplementation class.
SetDeathstalkerAsync(DeathstalkerGridEffect)
Sets a Deathstalker grid effect.
Declaration
Task<Guid> SetDeathstalkerAsync(DeathstalkerGridEffect effect)
Parameters
Type | Name | Description |
---|---|---|
DeathstalkerGridEffect | effect | The Deathstalker grid effect to set. |
Returns
Type | Description |
---|---|
Task<Guid> | A Guid for the effect that was set. |
SetDeathstalkerZoneAsync(Int32, Color, Boolean)
Sets the specified Deathstalker zone to a color.
Declaration
Task<Guid> SetDeathstalkerZoneAsync(int zoneIndex, Color color, bool clear = false)
Parameters
Type | Name | Description |
---|---|---|
Int32 | zoneIndex | The index of the Deathstalker zone to set. |
Color | color | The color to set. |
Boolean | clear | Whether to clear all colors before setting the new one. |
Returns
Type | Description |
---|---|
Task<Guid> | A Guid for the effect that was set. |
SetEffectAsync(KeyboardEffectType)
Sets an effect without any parameters. Currently, this only works for the None effect.
Declaration
Task<Guid> SetEffectAsync(KeyboardEffectType effectType)
Parameters
Type | Name | Description |
---|---|---|
KeyboardEffectType | effectType | Effect options. |
Returns
Type | Description |
---|---|
Task<Guid> | A Guid for the effect that was set. |
SetExtendedCustomAsync(ExtendedCustomKeyboardEffect)
Sets an extended custom grid effect on the keyboard.
Declaration
Task<Guid> SetExtendedCustomAsync(ExtendedCustomKeyboardEffect effect)
Parameters
Type | Name | Description |
---|---|---|
ExtendedCustomKeyboardEffect | effect | Effect options. |
Returns
Type | Description |
---|---|
Task<Guid> | A Guid for the effect that was set. |
SetKeyAsync(Key, Color, Boolean)
Sets the color of a specific key on the keyboard.
Declaration
Task<Guid> SetKeyAsync(Key key, Color color, bool clear = false)
Parameters
Type | Name | Description |
---|---|---|
Key | key | Key to modify. |
Color | color | Color to set. |
Boolean | clear | If |
Returns
Type | Description |
---|---|
Task<Guid> | A Guid for the effect that was set. |
SetKeysAsync(Color, Key, Key[])
Sets the specified color on a set of keys.
Declaration
Task<Guid> SetKeysAsync(Color color, Key key, params Key[] keys)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The Color to apply. |
Key | key | First key to change. |
Key[] | keys | Additional keys that should also have the color applied. |
Returns
Type | Description |
---|---|
Task<Guid> | A Guid for the effect that was set. |
SetKeysAsync(IEnumerable<Key>, Color, Boolean)
Sets a color on a collection of keys.
Declaration
Task<Guid> SetKeysAsync(IEnumerable<Key> keys, Color color, bool clear = false)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Key> | keys | The keys which should have their color changed. |
Color | color | The Color to apply. |
Boolean | clear | If |
Returns
Type | Description |
---|---|
Task<Guid> | A Guid for the effect that was set. |
SetPositionAsync(Int32, Int32, Color, Boolean)
Sets the color on a specific row and column on the keyboard grid.
Declaration
Task<Guid> SetPositionAsync(int row, int column, Color color, bool clear = false)
Parameters
Type | Name | Description |
---|---|---|
Int32 | row | Row to set, between 1 and MaxRows. |
Int32 | column | Column to set, between 1 and MaxColumns. |
Color | color | Color to set. |
Boolean | clear | Whether or not to clear the existing colors before setting this one. |
Returns
Type | Description |
---|---|
Task<Guid> | A Guid for the effect that was set. |
SetStaticAsync(StaticKeyboardEffect)
Sets a static color on the keyboard.
Declaration
Task<Guid> SetStaticAsync(StaticKeyboardEffect effect)
Parameters
Type | Name | Description |
---|---|---|
StaticKeyboardEffect | effect | Effect options. |
Returns
Type | Description |
---|---|
Task<Guid> | A Guid for the effect that was set. |