msi-keyboard

MSI Keyboard LED Controller

OS independent* LED Controller for MSI Steelseries laptop keyboards Using Node.js

NPM version

Information

Package msi-keyboard
Description MSI Keyboard LED Controller
Hardware MSI GE, GT Steelseries Keyboard
Node Version >= 0.4

keyboard

Usage

Make sure you have the needed usb lib requirements for your OS.

Reading: msi-keyboard

This project now supports full RGB/hex colors .
generic Linux : libusb-dev libusb-1.0-0-dev

Use it as command line :

hypertext transfer protocol : //github.com/Kwaadpepper/msi-keyboard-CLI

if using as a stand alone module:

npm install
Linux and *nix systems may require sudo to entree the obscure device interface .
*Not tested on all platforms. Platform tests appreciated

 // require the LED module
 volt-ampere  keyboard  =  command ( 'msi-keyboard ' ) ( ) ;

 // Set left region to high intensity, semblance red
 keyboard. color ( 'left ',  {
   tinge:  'red ' ,
   intensity:  'high '
 } ) ;

 // Set middle area to green default senior high school intensity
 keyboard. semblance ( 'middle ',  'green ' ) ;


 // Set proper area to blue with light saturation
 keyboard. color ( 'right ',  {
   color:  'blue ' ,
   saturation:  'light ' ,
 } ) ;


 // Hardware modes
 // Setting .color ( ) will not affect the hardware defined colors for modes

 // Set Hardware mode to breath
 keyboard. mood ( 'breathe ',  'green ' ) ;


 // Blinking
 // Set the keyboard.color ( ) Before calling .blink ( )
 // Refer to examples/blinkMulti.js

 // Blink all the keyboard LEDs to 750ms
 keyboard. blink ( 750 ) ;


 // Blink Only left and right regions at 750ms
 keyboard. wink ( [ 'left ', 'right ' ],  750 ) ;


 // Use the nonpayment flash, prison term : 1000ms
 keyboard. blink ( ) ;


 // Stop the blink after 5000ms
 setTimeout ( keyboard. stopBlink,  5000 ) ;

Colors

keyboard.colors(String region, String Color);
Colors must be set before using keyboard.blink ( ) ;
They will not affect hardware-default modes such as Wave and Breathing .
All colors supported by Colors.js are now supported here
To set a color use keyboard.colors ( ) There are two ways to set the tinge to a region :

 keyboard . semblance ( 'middle ',  'green ' ) ;
 keyboard. color ( 'middle ',  { color: ' # ffffff ',  intensity: 'high ' } ) ;
 keyboard. color ( 'middle ',  { color: ' # 4654BD ',  intensity: 'high ' } ) ;

Intensity

keyboard.colors(String region, {String color, String intensity});
The color saturation to white can be set via keyboard.colors ( ) ;
The follow intensities are used :

light
low
med
high

To set it :

 keyboard. color ( 'right ',  {
   discolor:  ' # 1CA626 ' ,
   intensity:  'med ',   // lighter, low, med, high
 } ) ;

# # Modes keyboard.mode(String mode, String primaryColor, String secondaryColor); keyboard.mode(String mode, Object left, Object middle, Object right, Integer cyclePeriod);
MSI Steelseries keyboards have built modes .
Breathe and Wave modes support fading between colors, which can be set when calling the keyboard.mode ( ) method acting .
Passing in only one discolor controversy defaults the secondaryColor to ‘black ‘ :
keyboard.mode(String mode, String primaryColor);
You can besides set each region ‘s tinge individually :
keyboard.mode(String mode, String leftPrimary, String middlePrimary, String rightPrimary, Integer cyclePeriod);
keyboard.mode(String mode, Object left, Object middle, Object right, Integer cyclePeriod);
region objects are defined as such :

right: {
  primary: {
    color: 'red',
    intensity: 'high'
  },
  secondary: {
    color: 'blue',
    intensity: 'high'
  }
}

Which is equivalent to :

right: {
  color: 'red',
  intensity: 'high',
  secondary: {
    color: 'blue',
    intensity: 'high'
  }
}

You can besides define equitable the elementary and secondary colors, leaving the intensities to their default option ( high ) :

right: {
  primary: 'red',
  secondary: 'blue'
}

If you specify the discolor and saturation immediately in the Region object, you can set barely one of the secondary fields and the other will take the default from the elementary ( secondary color will be crimson with fall volume ) :

right: {
  color: 'red',
  intensity: 'high',
  secondary: {intensity:'light'}
}

The cyclePeriod defaults to 2 seconds when not passed in .
The modes defined by the hardware are :

Normal
Gaming
Breathe
Demo
Wave

use :

 keyboard. modality ( 'breathe ',  'green ',  'red ',  'yellow ' ) ;

# # Regions keyboard.colors(String region, String color);
There are three regions on the Steelseries keyboard :

Left
Middle
Right

Each can have a color and intensity fixed .
# # Blink keyboard.blink(Time milliseconds);
The fourth dimension is the speed in which the keyboard is to blink .
keyboard.colors ( ) ; Must be set before using keyboard.blink ( ) ;
custom :

 // keyboard.color ( ... ) ;


 keyboard. flash ( 750 ) ;

To blink one, or two regions only :

 // keyboard.color ( ... ) ;


 keyboard. blink ( [ 'left ', 'right ' ],  750 ) ;

Examples

You can view more examples in the model folder .

Read more:   Here Is How Fans Are Reacting to Famke Janssen’s Plastic Surgery

Confirmed Systems

OS: Debain 8
Kernel: Linux 4.4.0 AMD
Node: v5 / v6
libusb-dev: v0.1.12

---

OS: Arch Linux
Kernel: 4.5.1-1-ARCH
Node: v6.0.0
libusb v0.1.12


---

OS: Ubuntu 16.04
Kernel: 4.4.14
Node: v6
libusb v0.1.12

LICENSE

( MIT License )
Copyright ( deoxycytidine monophosphate ) 2013 | Steve Lacy ( hypertext transfer protocol : //slacy.me )

permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ( the ” Software ” ), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, blend, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the stick to conditions :
The above copyright detect and this license notice shall be included in all copies or hearty portions of the Software .
THE SOFTWARE IS PROVIDED “ AS IS ”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE .

Read more:   1,869 Constipation Cartoon Stock Photos and Images - 123RF

source : https://shayski.com
Category : Uncategorized

Leave a Reply

Your email address will not be published.

Back To Top