     let tisInputSource: TISInputSource
     let id: String
     let name: String
+    let isCJK: Bool
 
     var icon: NSImage? = nil
 

    }

    func select() {
        let langs = InputSource.getProperty(tisInputSource, kTISPropertyInputSourceLanguages)! as Array<String>

        if langs.contains(where: { $0 == "ko" || $0 == "ja" || $0.hasPrefix("zh") }) {
            // Workaround for TIS CJK layout bug:
            // FIXME: when it's CJK, select English first and then return
            print("CJK")
        } else {
            TISSelectInputSource(tisInputSource)
        }
    }


            }
    }
    
    static func nonCJKSource() -> InputSource? {
        return inputSources.first(where: { !$0.isCJK })
    }

    static func selectPrevious() {
        let src = CGEventSource(stateID: CGEventSourceStateID.hidSystemState)!

        let down = CGEvent(keyboardEventSource: src, virtualKey: CGKeyCode(kVK_Space), keyDown: true)!
        let up = CGEvent(keyboardEventSource: src, virtualKey: CGKeyCode(kVK_Space), keyDown: false)!

        let flag = CGEventFlags(rawValue: CGEventFlags.maskAlternate.rawValue | CGEventFlags.maskCommand.rawValue)
        down.flags = flag;
        up.flags = flag;

