     }
     
     // TODO: make this work if cursor position is shifted
-    func setCapsIfNeeded() {
+    func setCapsIfNeeded() -> Bool {
         if self.shouldAutoCapitalize() {
             switch self.shiftState {
             case .Disabled:

            // 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 {
