An argument could be made that this is essentially a keylogger. Fine, a _selective_ keylogger, but still.
Whilst this looks useful, it's questionable if it's ethical and furthermore it may even be illegal in certain juristrictions with strong privacy laws.