             let charactersAreInCorrectState = { () -> Bool in
                 let previousContext = (self.textDocumentProxy as? UITextDocumentProxy)?.documentContextBeforeInput
                 
-                if previousContext == nil || countElements(previousContext!) < 2 {
+                if previousContext == nil || countElements(previousContext!) < 3 {
                     return false
                 }
                 

        if !constraintsAdded {
            self.layout = self.dynamicType.layoutClass(model: self.keyboard, superview: self.forwardingView, layoutConstants: self.dynamicType.layoutConstants, globalColors: self.dynamicType.globalColors, darkMode: self.darkMode(), solidColorMode: self.solidColorMode())
            
            self.layout.initialize()
            self.setupKeys()
            self.setMode(0)
            

    }
    
    func updateKeyCaps(lowercase: Bool) {
        if self.layout != nil {
            for (model, key) in self.layout!.modelToView {
                key.text = model.keyCapForCase(!lowercase)
            }
        }
    }
    
    func modeChangeTapped(sender: KeyboardKey) {
        if let toMode = self.layout?.viewToModel[sender]?.toMode {
            self.currentMode = toMode
        }
    }
