< GeeXLab Reference Guide />

> Back to Reference Guide Index


gh_logiled library

Description

gh_logiled is the module that allows to control RGB LED lighting of some Logitech products (gaming keyboard for example).


Number of functions: 6

  1. gh_logiled.set_flash_lighting (Lua - Python)
  2. gh_logiled.set_key_lighting (Lua - Python)
  3. gh_logiled.set_lighting (Lua - Python)
  4. gh_logiled.set_pulse_lighting (Lua - Python)
  5. gh_logiled.set_target (Lua - Python)
  6. gh_logiled.stop_effects (Lua - Python)



set_flash_lighting

Description

Sets a flash lighting effect.


Syntax

gh_logiled.set_flash_lighting(
 r,
 g,
 b,
 b,
 duration_ms,
 interval_ms
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample


gh_logiled.set_flash_lighting(255, 255, 0,   3.0, 2.0)
            


set_key_lighting

Description

Sets the color of a particular key.


Syntax

gh_logiled.set_key_lighting(
 keycode,
 r,
 g,
 b
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample


LOGILED_ESC                     = 0x01
LOGILED_F1                      = 0x3b
LOGILED_F2                      = 0x3c
LOGILED_F3                      = 0x3d
LOGILED_F4                      = 0x3e
LOGILED_F5                      = 0x3f
LOGILED_F6                      = 0x40
LOGILED_F7                      = 0x41
LOGILED_F8                      = 0x42
LOGILED_F9                      = 0x43
LOGILED_F10                     = 0x44
LOGILED_F11                     = 0x57
LOGILED_F12                     = 0x58
LOGILED_PRINT_SCREEN            = 0x137
LOGILED_SCROLL_LOCK             = 0x46
LOGILED_PAUSE_BREAK             = 0x145
LOGILED_TILDE                   = 0x29
LOGILED_ONE                     = 0x02
LOGILED_TWO                     = 0x03
LOGILED_THREE                   = 0x04
LOGILED_FOUR                    = 0x05
LOGILED_FIVE                    = 0x06
LOGILED_SIX                     = 0x07
LOGILED_SEVEN                   = 0x08
LOGILED_EIGHT                   = 0x09
LOGILED_NINE                    = 0x0A
LOGILED_ZERO                    = 0x0B
LOGILED_MINUS                   = 0x0C
LOGILED_EQUALS                  = 0x0D
LOGILED_BACKSPACE               = 0x0E
LOGILED_INSERT                  = 0x152
LOGILED_HOME                    = 0x147
LOGILED_PAGE_UP                 = 0x149
LOGILED_NUM_LOCK                = 0x45
LOGILED_NUM_SLASH               = 0x135
LOGILED_NUM_ASTERISK            = 0x37
LOGILED_NUM_MINUS               = 0x4A
LOGILED_TAB                     = 0x0F
LOGILED_Q                       = 0x10
LOGILED_W                       = 0x11
LOGILED_E                       = 0x12
LOGILED_R                       = 0x13
LOGILED_T                       = 0x14
LOGILED_Y                       = 0x15
LOGILED_U                       = 0x16
LOGILED_I                       = 0x17
LOGILED_O                       = 0x18
LOGILED_P                       = 0x19
LOGILED_OPEN_BRACKET            = 0x1A
LOGILED_CLOSE_BRACKET           = 0x1B
LOGILED_BACKSLASH               = 0x2B
LOGILED_KEYBOARD_DELETE         = 0x153
LOGILED_END                     = 0x14F
LOGILED_PAGE_DOWN               = 0x151
LOGILED_NUM_SEVEN               = 0x47
LOGILED_NUM_EIGHT               = 0x48
LOGILED_NUM_NINE                = 0x49
LOGILED_NUM_PLUS                = 0x4E
LOGILED_CAPS_LOCK               = 0x3A
LOGILED_A                       = 0x1E
LOGILED_S                       = 0x1F
LOGILED_D                       = 0x20
LOGILED_F                       = 0x21
LOGILED_G                       = 0x22
LOGILED_H                       = 0x23
LOGILED_J                       = 0x24
LOGILED_K                       = 0x25
LOGILED_L                       = 0x26
LOGILED_SEMICOLON               = 0x27
LOGILED_APOSTROPHE              = 0x28
LOGILED_ENTER                   = 0x1C
LOGILED_NUM_FOUR                = 0x4B
LOGILED_NUM_FIVE                = 0x4C
LOGILED_NUM_SIX                 = 0x4D
LOGILED_LEFT_SHIFT              = 0x2A
LOGILED_Z                       = 0x2C
LOGILED_X                       = 0x2D
LOGILED_C                       = 0x2E
LOGILED_V                       = 0x2F
LOGILED_B                       = 0x30
LOGILED_N                       = 0x31
LOGILED_M                       = 0x32
LOGILED_COMMA                   = 0x33
LOGILED_PERIOD                  = 0x34
LOGILED_FORWARD_SLASH           = 0x35
LOGILED_RIGHT_SHIFT             = 0x36
LOGILED_ARROW_UP                = 0x148
LOGILED_NUM_ONE                 = 0x4F
LOGILED_NUM_TWO                 = 0x50
LOGILED_NUM_THREE               = 0x51
LOGILED_NUM_ENTER               = 0x11C
LOGILED_LEFT_CONTROL            = 0x1D
LOGILED_LEFT_WINDOWS            = 0x15B
LOGILED_LEFT_ALT                = 0x38
LOGILED_SPACE                   = 0x39
LOGILED_RIGHT_ALT               = 0x138
LOGILED_RIGHT_WINDOWS           = 0x15C
LOGILED_APPLICATION_SELECT      = 0x15D
LOGILED_RIGHT_CONTROL           = 0x11D
LOGILED_ARROW_LEFT              = 0x14B
LOGILED_ARROW_DOWN              = 0x150
LOGILED_ARROW_RIGHT             = 0x14D
LOGILED_NUM_ZERO                = 0x52
LOGILED_NUM_PERIOD              = 0x53
LOGILED_G_1                     = 0xFFF1
LOGILED_G_2                     = 0xFFF2
LOGILED_G_3                     = 0xFFF3
LOGILED_G_4                     = 0xFFF4
LOGILED_G_5                     = 0xFFF5
LOGILED_G_6                     = 0xFFF6
LOGILED_G_7                     = 0xFFF7
LOGILED_G_8                     = 0xFFF8
LOGILED_G_9                     = 0xFFF9
LOGILED_G_LOGO                  = 0xFFFF1
LOGILED_G_BADGE                 = 0xFFFF2
gh_logiled.set_key_lighting(LOGILED_F1, 255, 255, 0)
            


set_lighting

Description

Sets the same color to all LEDs.


Syntax

gh_logiled.set_lighting(
 r,
 g,
 b
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample


gh_logiled.set_lighting(255, 255, 0)
            


set_pulse_lighting

Description

Sets a pluse lighting effect.


Syntax

gh_logiled.set_pulse_lighting(
 r,
 g,
 b,
 b,
 duration_ms,
 interval_ms
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample


gh_logiled.set_pulse_lighting(255, 255, 0,   3.0, 2.0)
            


set_target

Description

Sets the device target.


Syntax

gh_logiled.set_target(
 target
)

Languages

Lua - Python


Parameters


Return Values

This function has no return value(s).


Code sample


gh_logiled.set_target("perkey_rgb")
            


stop_effects

Description

Stops all effects.


Syntax

gh_logiled.stop_effects()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values

This function has no return value(s).


Code sample


gh_logiled.stop_effects()
            






GeeXLab Rootard Guide | Downloads | Contact | Newsletter