 					let subviewPoint = sender.locationInView(subview)
 					if subview.pointInside(subviewPoint, withEvent: nil) {
 						if let key = subview as? KeyboardKey {
-							let proxy = self.textDocumentProxy as UITextDocumentProxy
-							proxy.insertText(key.letter)
+							typeLetter(key.letter)
 						}
 					}
 				}

	/// TODO: Fix this once `documentContextBeforeInput` stops always returning nil.
	/// Did a left swipe gesture. Delete until previous chunk of whitespace.
	func didSwipeLeft(sender: UIGestureRecognizer) {
		let proxy = self.textDocumentProxy as UITextDocumentProxy
		if let precedingContext = proxy.documentContextBeforeInput {
			let numTimesToDelete = precedingContext.numberOfElementsToDeleteToDeleteLastWord()
			for i in 0...numTimesToDelete {
				proxy.deleteBackward()
			}
		}
	}
	
	func shiftKeyPressed(sender: UIButton) {
		
	}
	
	func deleteKeyPressed(sender: UIButton) {
		let proxy = self.textDocumentProxy as UITextDocumentProxy
		proxy.deleteBackward()
	}
}

	let row2Letters = ["A","S","D","F","G","H","J","K","L"]
	let row3Letters = ["Z","X","C","V","B","N","M"]
	
	var shiftState: KeyboardShiftState = .Disabled {
		didSet {
			
		}
	}

	let shiftButton : UIButton = {
		let button = UIButton.buttonWithType(.System) as UIButton
		button.setTranslatesAutoresizingMaskIntoConstraints(false)
