I have a subclass of NSResponder that implements the NSTextInputClient protocol. One of the required functions is this one: Code: - (void)insertText:(id)aString replacementRange:(NSRange)replacementRange In whatever user input I give, I never seem to get a valid replacementRange. Code: NSLog(@"%@",NSStringFromRange(replacementRange)); Does anyone know under which circumstances a valid range is supposed to be given? My code works since I just use the selectedRange (also a required function), but I want to make sure I don't miss anything here. The "TextInputView" sample code implements this function as well, but overrides the replacementRange (in most cases?). Your insight into this function is appreciated!