Interesting code. It reminds me of a customized "notepad.exe" that for whatever the person types, it displays something clever instead of what is being typed.

You'll get a handle on those listeners. The thing that got me in the past was, "Which listener or method should I use?".