             self.setupKludge()
             
             self.updateKeyCaps(self.shiftState.uppercase())
-            self.setCapsIfNeeded()
+            var capsWasSet = self.setCapsIfNeeded()
             
             self.updateAppearances(self.darkMode())
             self.addInputTraitsObservers()

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

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