                 return
             }
             else {
-                switch self.shiftState {
-                case .Disabled:
-                    self.shiftState = .Enabled
-                case .Enabled:
-                    self.shiftState = .Disabled
-                case .Locked:
-                    self.shiftState = .Disabled
-                }
-                
+                self.shiftState = (self.shiftState == .Disabled) ? .Enabled : .Disabled
                 (sender.shape as? ShiftShape)?.withLock = false
             }
         }

	{
		if string.characters.count > 0
		{
			let firstChar = string[string.startIndex]
			return ("A"..."Z").contains(firstChar)
		}
		else
		{

				{
					var offsetY : CGFloat = 9
					
                    if self.currentInterfaceOrientation == UIInterfaceOrientation.LandscapeLeft || self.currentInterfaceOrientation == UIInterfaceOrientation.LandscapeRight {
                        offsetY = 3
                    }
                    else {
                        switch  KeyboardViewController.getDeviceType() {
                        case TTDeviceType.TTDeviceTypeIPhone4, TTDeviceType.TTDeviceTypeIPhone5:
                            offsetY = 9
                            
                        case TTDeviceType.TTDeviceTypeIPhone6:
                            offsetY = 13
                            
                        case TTDeviceType.TTDeviceTypeIPhone6p:
                            offsetY = 16
                        }
                    }
					
					self.button.removeFromSuperview()
					
