 	case Enabled
 	/// Shift is locked-- continue to type capitals.
 	case Locked
+	
+	mutating func enableIfDisabled() {
+		if self == .Disabled {
+			self = .Enabled
+		}
+	}
 }
 
 class KeyboardViewController: UIInputViewController {

	func deleteCharacter() {
		let proxy = self.textDocumentProxy as UITextDocumentProxy
		proxy.deleteBackward()
	}
	
	func deleteWord() {

		let swipeLeft = UISwipeGestureRecognizer(target: self, action: "didSwipeLeft:")
		swipeLeft.direction = .Left
		self.inputView.addGestureRecognizer(swipeLeft)
		
		let swipeRight = UISwipeGestureRecognizer(target: self, action: "didSwipeRight:")
		swipeRight.direction = .Right
		self.inputView.addGestureRecognizer(swipeRight)
		
		let press = UILongPressGestureRecognizer(target: self, action: "didPress:")
		press.minimumPressDuration = 0
