implemented "inject" feature in input_char callback