 
     func recordView(_ recordView: RecordView, didChangeKeyCombo keyCombo: KeyCombo) {
         HotKeyCenter.shared.unregisterHotKey(with: "KeyHolderExample")
+        storeKeyCombo(with: keyCombo)
         let hotKey = HotKey(identifier: "KeyHolderExample", keyCombo: keyCombo, target: self, action: #selector(AppDelegate.hotkeyCalled))
         hotKey.register()
     }


    func applicationDidFinishLaunching(_ aNotification: Notification) {
        recordView.tintColor = NSColor(red: 0.164, green: 0.517, blue: 0.823, alpha: 1)
        let keyCombo = KeyCombo(doubledCocoaModifiers: .command)
        recordView.keyCombo = keyCombo
        recordView.delegate = self
        recordView.clearButtonMode = .whenRecorded

        let hotKey = HotKey(identifier: "KeyHolderExample", keyCombo: keyCombo!, target: self, action: #selector(AppDelegate.hotkeyCalled))
        hotKey.register()
    }

    func applicationWillTerminate(_ aNotification: Notification) {


    @objc func hotkeyCalled() {
        print("HotKey called!!!!")
    }

    private func restoreKeyCombo() {
        guard let data = UserDefaults.standard.data(forKey: "keyCombo") else { return }
        guard let keyCombo = try? JSONDecoder().decode(KeyCombo.self, from: data) else { return }
        recordView.keyCombo = keyCombo
        let hotKey = HotKey(identifier: "KeyHolderExample", keyCombo: keyCombo, target: self, action: #selector(AppDelegate.hotkeyCalled))
        hotKey.register()
    }

    private func storeKeyCombo(with keyCombo: KeyCombo?) {
        let data = try? JSONEncoder().encode(keyCombo)
        UserDefaults.standard.set(data, forKey: "keyCombo")
    }

}
