     
     func setCapsIfNeeded() -> Bool {
         if self.shouldAutoCapitalize() {
-            switch self.shiftState {
-            case .Disabled:
-                self.shiftState = .Enabled
-            case .Enabled:
-                self.shiftState = .Enabled
-            case .Locked:
-                self.shiftState = .Locked
-            }
+            self.shiftState = (self.shiftState == .Locked) ? .Locked : .Enabled
             
             return true
         }
         else {
-            switch self.shiftState {
-            case .Disabled:
-                self.shiftState = .Disabled
-            case .Enabled:
-                self.shiftState = .Disabled
-            case .Locked:
-                self.shiftState = .Locked
-            }
+            self.shiftState = (self.shiftState == .Locked) ? .Locked : .Disabled
             
             return false
         }

    
    func shiftDoubleTapped(sender: KeyboardKey) {
        self.shiftWasMultitapped = true
        
        switch self.shiftState {
        case .Disabled:
            self.shiftState = .Locked
        case .Enabled:
            self.shiftState = .Locked
        case .Locked:
            self.shiftState = .Disabled
        }
    }
    
    func updateKeyCaps(uppercase: Bool) {

	func didTTouchExitDownSuggestionButton(sender: AnyObject?)
	{
		let button = sender as! UIButton
		button.backgroundColor = UIColor(red:0.68, green:0.71, blue:0.74, alpha:1)
		button.setTitleColor(UIColor.whiteColor(), forState: .Normal)
	}
	
	func didTTouchDownSuggestionButton(sender: AnyObject?)
