             syncUI()
         }
     }
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        textField.preferredMaxLayoutWidth = 270
+        syncUI()
+        configureEventMonitor()
+    }
+}
+extension ViewController {
     private func syncUI() {
         textField.stringValue = lgtm.description
         textField.selectText(nil)

            imageView.image = NSImage(contentsOfURL: nsurl)
        }
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        textField.preferredMaxLayoutWidth = 270
        syncUI()
        monitor = NSEvent.addLocalMonitorForEventsMatchingMask(NSEventMask.KeyDownMask) {[unowned self] e in
            guard !self.loading else { return e }
            let str:String = e.characters ?? ""
            print(e.keyCode)

                break
            }
            return e
        }       
    }
    private func copyAction() {
        let gp = NSPasteboard.generalPasteboard()
        gp.declareTypes([NSStringPboardType], owner: nil)
