         var outputCount = UInt32(1)
         var outputValues = UnsafeMutablePointer<UInt64>(malloc(1*sizeof(UInt64)))
         
-        let kr = IOConnectCallScalarMethod(dataPort, kSetLEDBrightnessID, inputValues, inputCount, outputValues, &outputCount)
+        let kr = IOConnectCallScalarMethod(dataPort, selector, inputValues, inputCount, outputValues, &outputCount)
         
         var outputs = [UInt64]()
         for i in 0..<outputCount {

import CoreGraphics

public class LMUController {
    var dataPort: io_connect_t = 0
    
    private let kGetSensorReadingID: UInt32 = 0 // getSensorReading(int *, int *)
    private let kGetLEDBrightnessID: UInt32 = 1 // getLEDBrightness(int, int *)
    private let kSetLEDBrightnessID: UInt32 = 2 // setLEDBrightness(int, int, int *)
    private let kSetLEDFadeID: UInt32 = 3 // setLEDFade(int, int, int, int *)
    
    public init?() {
        let serviceObject = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleLMUController").takeUnretainedValue())
        

        }
    }
    
    /**
    Get MacBook keyboard backlight brightness.
    
    :returns: A value between 0 and 1. Nil if it failed.
    */
    public var keyboardBrightness: Float? {
        get {
            let inputs = [UInt64(0)]
