             //curWord = ""
             //nextWord = ""
             //dictStart = 0
-        }
+//        }
         (textDocumentProxy as UIKeyInput).insertText(" ")
         curWord = ""
         nextWord = ""

        swipeUp.direction = UISwipeGestureRecognizerDirection.up
        
        let swipeLeft = UISwipeGestureRecognizer(target: self, action: #selector(enterDelete))
        swipeLeft.direction = UISwipeGestureRecognizerDirection.left
        
        let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(enterSpace))
        swipeRight.direction = UISwipeGestureRecognizerDirection.right
        
        let tap = UITapGestureRecognizer(target: self, action: #selector(insertSelectedCharacter (_:)))

        enterDelete()
        (textDocumentProxy as UIKeyInput).insertText(keyboardRows[selectedRowIndex][selectedCharIndex])
        nextWord = getAutoCompleteWord()
        if (nextWord == "") {
            return
        }
//        if (nextWord != "") {
            let index = nextWord.index(nextWord.startIndex, offsetBy: curWord.characters.count + 1)
            (textDocumentProxy as UIKeyInput).insertText(nextWord.substring(from: index))
            stopSpeaking()
