Extracting input widget common functionality into NS_InputBaseWidget