How to make floating widgets?

Okay i made it work, but the problem is (my event activator is the key “U”) so when i activate the event it prints the string(my widget) at my mouse location, it should work when i click on the object