     func deselectButton(rowIndex: Int, buttonIndex: Int) {
         keyboardRows[rowIndex][buttonIndex].layer.borderWidth = 0
     }
-
+    
+    func addClickArea() {
+        // 1.create UIView programmetically
+        let clickView = UIView(frame: CGRect(x: 0, y: 40, width: 415, height: 155))
+        
+        clickView.backgroundColor = UIColor.lightGray
+        
+        // 2.add myView to UIView hierarchy
+        view.addSubview(clickView)
+        
+        // 3. add action to myView
+        let gesture = UITapGestureRecognizer(target: self, action: #selector(insertSelectedButton (_:)))
+        clickView.addGestureRecognizer(gesture)
+    }
+    
+    func insertSelectedButton(_ sender: UITapGestureRecognizer){
+        let selectedCharacter = keyboardRows[selectedRowIndex][selectedButtonIndex].title(for: .normal)
+        
+        // If it is the "delete" unicode character.
+        if selectedCharacter == "\u{232b}" {
+            (textDocumentProxy as UIKeyInput).deleteBackward()
+        }
+        else {
+            (textDocumentProxy as UIKeyInput).insertText(selectedCharacter!)
+        }
+    }
+    
     override func didReceiveMemoryWarning() {
         super.didReceiveMemoryWarning()
         // Dispose of any resources that can be recreated.

    // Called once in 'viewDidLoad()' to render all the keyboard buttons.
    func addKeyboardButtons() {
        addNextKeyboardButton()
        addAlphabetButtons()

        // Set the initially selected character.


    // Renders a button to switch to the next system keyboard.
    func addNextKeyboardButton() {
        nextKeyboardButton = UIButton(type: .system)
        nextKeyboardButton.setTitle("Next Keyboard", for: [])
        nextKeyboardButton.sizeToFit()
        nextKeyboardButton.translatesAutoresizingMaskIntoConstraints = false
        nextKeyboardButton.backgroundColor = UIColor(white: 0.9, alpha: 1)
        
        nextKeyboardButton.addTarget(self, action: #selector(handleInputModeList(from:with:)), for: .allTouchEvents)
        
        view.addSubview(self.nextKeyboardButton)
        
        nextKeyboardButton.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
        nextKeyboardButton.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
    }
    
    func addHideKeyboardButton() {
        hideKeyboardButton = UIButton(type: .system)
        
        hideKeyboardButton.setTitle("Hide Keyboard", for: .normal)
        hideKeyboardButton.sizeToFit()
        hideKeyboardButton.translatesAutoresizingMaskIntoConstraints = false
        hideKeyboardButton.backgroundColor = UIColor(white: 0.9, alpha: 1)
        
        hideKeyboardButton.addTarget(self, action: #selector(UIInputViewController.dismissKeyboard), for: .touchUpInside)
        
        view.addSubview(hideKeyboardButton)
        
        hideKeyboardButton.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true
        hideKeyboardButton.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
    }

    func addAlphabetButtons() {
