Make keyboard delete entered text

So I have 3 objects: keyboard, text_entry, text_object, so whatever user types on keyboard that is saved in text_entry and then whatever text_entry has is written in text_object and displayed.
and at some points I want to make everything go blank so I set text_entry and text_object both to " ". But the keyboard itself retains that information so when user clicks another char for example “t”, text_object doesn’t display just “t”, it displays whatever string there was before I set it to " " and + “t”. So how do I make keyboard forget input as well.