             
             return true
         }
-        
-        return false
+        else {
+            switch self.shiftState {
+            case .Disabled:
+                self.shiftState = .Disabled
+            case .Enabled:
+                self.shiftState = .Disabled
+            case .Locked:
+                self.shiftState = .Locked
+            }
+            
+            return false
+        }
     }
     
     func characterIsPunctuation(character: Character) -> Bool {

            // TODO: reset context
        }
        
        var capsWasChanged = self.setCapsIfNeeded()
        
        if !capsWasChanged {
            if self.shiftState == ShiftState.Enabled {
                self.shiftState = ShiftState.Disabled
            }
        }
    }
    
    func handleAutoPeriod(key: Key) {

        }
    }
    
    func setCapsIfNeeded() -> Bool {
        if self.shouldAutoCapitalize() {
            switch self.shiftState {
