overwolf.logitech.led

Provides API for Logitech LED.

 

"LogitechLed" should be added under "permissions" in the manifest.json in order to use this API.

"permissions": [
		"LogitechLed"
	]

Methods

init(callback)

Version added: 0.93.1

Initializes the LED API.

  • Parameter: callback <function>

    A callback with the result of the request.

setTargetDevice(targetDevices, callback)

Version added: 0.93.1

Sets the target devices to use.

saveCurrentLighting(callback)

Version added: 0.93.1

Saves the current lighting.

  • Parameter: callback <function>

    A callback with the result of the request.

setLighting(redPercentage, greenPercentage, bluePercentage, callback)

Version added: 0.93.1

Sets the lighting for the entire device.

  • Parameter: redPercentage <int>

    Red percentage (0 – 100)
  • Parameter: greenPercentage <int>

    Green percentage (0 – 100)
  • Parameter: bluePercentage <int>

    Blue percentage (0 – 100)
  • Parameter: callback <function>

    A callback with the result of the request.

restoreLighting(callback)

Version added: 0.93.1

Restores the lightning to the last previously saved state.

  • Parameter: callback <function>

    A callback with the result of the request.

flashLighting(redPercentage, greenPercentage, bluePercentage, milliSecondsDuration, milliSecondsInterval, callback)

Version added: 0.93.1

Flashes the lighting on the device.

  • Parameter: redPercentage <int>

    Red percentage (0 – 100)
  • Parameter: greenPercentage <int>

    Green percentage (0 – 100)
  • Parameter: bluePercentage <int>

    Blue percentage (0 – 100)
  • Parameter: milliSecondsDuration <int>

    The duration to flash in milliseconds.
  • Parameter: milliSecondsInterval <int>

    The interval for flashes in milliseconds.
  • Parameter: callback <function>

    A callback with the result of the request.

pulseLighting(redPercentage, greenPercentage, bluePercentage, milliSecondsDuration, milliSecondsInterval, callback)

Version added: 0.93.1

Pulses the lighting on the device.

  • Parameter: redPercentage <int>

    Red percentage (0 – 100)
  • Parameter: greenPercentage <int>

    Green percentage (0 – 100)
  • Parameter: bluePercentage <int>

    Blue percentage (0 – 100)
  • Parameter: milliSecondsDuration <int>

    The duration to flash in milliseconds.
  • Parameter: milliSecondsInterval <int>

    The interval for flashes in milliseconds.
  • Parameter: callback <function>

    A callback with the result of the request.

stopEffects(callback)

Version added: 0.93.1

Stops ongoing pulse/flash effects.

  • Parameter: callback <function>

    A callback with the result of the request.

setLightingFromBitmap(bitmapUrl, callback)

Version added: 0.93.1

Sets the lighting from an overwolf-extension:// or overwolf-media:// url. The file must be 21×6.

  • Parameter: bitmapUrl <string>

    The Overwolf url to add.
  • Parameter: callback <function>

    A callback with the result of the request.

setLightingFromBitmap(bitmap, callback)

Version added: 0.93.1

Sets the lighting from a bitmap byte array.

  • Parameter: bitmap <Byte[]>

    A byte array representing a 21×6 bitmap.
  • Parameter: callback <function>

    A callback with the result of the request.

setLightingForKeyWithScanCode(keyCode, redPercentage, greenPercentage, bluePercentage, callback)

Version added: 0.93.1

Sets the lighting for a specific key by scan code.

  • Parameter: keyCode <int>

    The key scan code.
  • Parameter: redPercentage <int>

    Red percentage (0 – 100)
  • Parameter: greenPercentage <int>

    Green percentage (0 – 100)
  • Parameter: bluePercentage <int>

    Blue percentage (0 – 100)
  • Parameter: callback <function>

    A callback with the result of the request.

setLightingForKeyWithHidCode(keyCode, redPercentage, greenPercentage, bluePercentage , callback)

Version added: 0.93.1

Sets the lighting for a specific key by HID code.

  • Parameter: keyCode <int>

    The key HID code.
  • Parameter: redPercentage <int>

    Red percentage (0 – 100)
  • Parameter: greenPercentage <int>

    Green percentage (0 – 100)
  • Parameter: bluePercentage <int>

    Blue percentage (0 – 100)
  • Parameter: callback <function>

    A callback with the result of the request.

setLightingForKeyWithQuartzCode(keyCode, redPercentage, greenPercentage, bluePercentage, callback)

Version added: 0.93.1

Sets the lighting for a specific key by quartz code.

  • Parameter: keyCode <int>

    The key quartz code.
  • Parameter: redPercentage <int>

    Red percentage (0 – 100)
  • Parameter: greenPercentage <int>

    Green percentage (0 – 100)
  • Parameter: bluePercentage <int>

    Blue percentage (0 – 100)
  • Parameter: callback <int>

    A callback with the result of the request.

setLightingForKeyWithKeyName(keyName, redPercentage, greenPercentage, bluePercentage, callback)

Version added: 0.93.1

Sets the lighting for a specific key by key name.

saveLightingForKey(keyName, callback)

Version added: 0.93.1

Saves the current lighting of a specific key.

restoreLightingForKey(keyName, callback)

Version added: 0.93.1

Restores a previously saved lighting for a specific key.

flashSingleKey(keyName, redPercentage, greenPercentage, bluePercentage, milliSecondsDuration, milliSecondsInterval, callback)

Version added: 0.93.1

Flashes a single key.

  • Parameter: keyName <overwolf.logitech.led.enums.KeyboardNames>

    The key name. For a list of key names see overwolf.logitech.led.enums.KeyboardNames.

  • Parameter: redPercentage <int>

    Red percentage (0 – 100)

  • Parameter: greenPercentage <int>

    Green percentage (0 – 100)
  • Parameter: bluePercentage <int>

    Blue percentage (0 – 100)
  • Parameter: milliSecondsDuration <int>

    The duration to flash in milliseconds.
  • Parameter: milliSecondsInterval <int>

    The interval for flashes in milliseconds.
  • Parameter: callback <callback>

    A callback with the result of the request.

pulseSingleKey(keyName, startRedPercentage, startGreenPercentage, startBluePercentage, finishRedPercentage, finishGreenPercentage, finishBluePercentage, milliSecondsDuration, isInfinite, callback)

Version added: 0.93.1

Pulses a single key.

  • Parameter: keyName <overwolf.logitech.led.enums.KeyboardNames>

    The key name. For a list of key names see overwolf.logitech.led.enums.KeyboardNames.

  • Parameter: startRedPercentage <int>

    Red start percentage (0 – 100)
  • Parameter: startGreenPercentage <int>

    Green start percentage (0 – 100)
  • Parameter: startBluePercentage <int>

    Blue start percentage (0 – 100)
  • Parameter: finishRedPercentage <int>

    Red finish percentage (0 – 100)
  • Parameter: finishGreenPercentage <int>

    Green finish percentage (0 – 100)
  • Parameter: finishBluePercentage <int>

    Blue finish percentage (0 – 100)
  • Parameter: milliSecondsDuration <int>

    The duration to pulse in milliseconds.
  • Parameter: isInfinite <bool>

    States whether the effect is infinite or not.
  • Parameter: callback <function>

    A callback with the result of the request.

stopEffectsOnKey(keyName, callback)

Version added: 0.93.1

Stops ongoing pulse/flash effects on a specific key.

shutdown()

Version added: 0.93.1

Shuts down the API.

Events How to use events

onError

Version added: 0.93.1

Triggered when an error occurs, sent with an error code.

Types

overwolf.logitech.led.enums.KeyboardNames

The names of the keys.

Options

ESC

F1

F2

F3

F4

F5

F6

F7

F8

F9

F10

F11

F12

SCROLL_LOCK

PAUSE_BREAK

TILDE

ONE

TWO

THREE

FOUR

FIVE

SIX

SEVEN

EIGHT

NINE

ZERO

MINUS

EQUALS

BACKSPACE

INSERT

HOME

PAGE_UP

NUM_LOCK

NUM_SLASH

NUM_ASTERISK

NUM_MINUS

TAB

Q

W

E

R

T

Y

U

I

O

P

OPEN_BRACKET

CLOSE_BRACKET

BACKSLASH

KEYBOARD_DELETE

END

PAGE_DOWN

NUM_SEVEN

NUM_EIGHT

NUM_NINE

NUM_PLUS

CAPS_LOCK

A

S

D

F

G

H

J

K

K

L

SEMICOLON

APOSTROPHE

ENTER

NUM_FOUR

NUM_FIVE

NUM_SIX

LEFT_SHIFT

Z

X

C

V

B

N

M

COMMA

PERIOD

FORWARD_SLASH

RIGHT_SHIFT

ARROW_UP

NUM_ONE

NUM_TWO

NUM_THREE

NUM_ENTER

LEFT_CONTROL

LEFT_WINDOWS

LEFT_ALT

SPACE

RIGHT_ALT

RIGHT_WINDOWS

APPLICATION_SELECT

RIGHT_CONTROL

ARROW_LEFT

ARROW_DOWN

ARROW_RIGHT

NUM_ZERO

NUM_PERIOD

overwolf.logitech.led.enums.LogitechDeviceLightingType

Options

Mono

RGB

PerkeyRGB

All

overwolf.logitech.led.LogitechArxData

The Arx API data.

Properties

app_folder

An optional folder to use when publishing a website.

Type: string

overwolf.logitech.led.LogitechLedData

Properties

required_devices

A list of required devices. See Logitech Device

Type: Logitech Device

required_devices_details

Read only. The list of required devices with additional details.

Type: string

required_lighting_types

A list of required lighting types. See overwolf.logitech.led.enums.LogitechDeviceLightingType

Type: overwolf.logitech.led.enums.LogitechDeviceLightingType

required_lighting_details

Read only. The list of required lighting types with additional details.

Type: string