How to detect between types input Vs pasted?

Given a text box people can type in character or do copy and paste too. “When TextBox Changes” does not distinguish between the two. Is there a way to detect the input source? Whether it was typed or pasted? Thanks

No.

I’m curious… why would you want to know that?

1 Like

Assume when you get the data you want to ensure the data is say only Alphabets or only numerals or say just a set of symbols.
Paste Operation: The entire data gets dumped into “TextBox” you take the whole data and validate character by character
Keyed data Operation: Validating is very easy. They come one after the other, the very first wrong character we error out.
It is funny thing now that I was writing out my thoughts it dawned upon me that the validating process for both is ~same. There is a slight procedural change that I can live with. Thanks for pushing me in the right direction!!

Still, before we close this, just for curiosity, I have a question. The two input processes are totally different the source of data are totally different, don’t you think it is good for the data receiver to know from the where the data came? I can’t come up with a scenario where it might be needed but I am sure it will matter in some other situation.

I’m glad I was able to help a little.

Unless you’re trying to prevent plagiarism or creating a typing test, no, I can’t think of a use for knowing the source of a text string.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.