Lab #25 Key Sequence Detection
Lab #25 was titled, "Key Sequence Detection". In this lab, I used JavaScript to track every key that has been pressed on your keyboard with this webpage open. You can check it via console.
As you can see in the screenshot above, I attempt to type the entire alphabet which I end up doing but it goes all the way down in console. You can see how the progression and sequence of the keys is stored in the console as I start with "a" and move forward. In order to do this, I used JavaScript that stored all the keys pressed in an array and then logged it. That's pretty much it.
Web Designers could use this to track the user's response for interactive pages including games, etc. This could also be used to unlock some kind of secret on a page after doing a certain combination. Don't believe me? Try typing the word "lord" on my page and read what happens on the console.
As you can see in the screenshot above, I attempt to type the entire alphabet which I end up doing but it goes all the way down in console. You can see how the progression and sequence of the keys is stored in the console as I start with "a" and move forward. In order to do this, I used JavaScript that stored all the keys pressed in an array and then logged it. That's pretty much it.
Web Designers could use this to track the user's response for interactive pages including games, etc. This could also be used to unlock some kind of secret on a page after doing a certain combination. Don't believe me? Try typing the word "lord" on my page and read what happens on the console.

Comments
Post a Comment