         delegate.dismiss(animated: true, completion: nil)
     }
 }
+
+
+// MARK: UITextFieldDelegate
+extension CountdownLengthController: UITextFieldDelegate {
+    // called when input is from an external keyboard and not the keypad buttons
+    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
+        validateInput(string, forTextField: textField)
+    }
+}

        }
    }
    
    #warning("FIXME: Only called manually on UIButton touch. Needs to be called for BT Keyboard")
    func validateInput(_ string: String, forTextField textField: UITextField) -> Bool {
        guard let text = textField.text else { return false }    // must have an existing string
        

    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        minutesTextField.delegate = self
        secondsTextField.delegate = self
        
        minutesTextField.inputView = UIView()
        secondsTextField.inputView = UIView()
