konami.mp4
“Oh, that? I never thought it was eavesdropping, Aslan. Wasn't it magic?"
"Spying on people by magic is the same as spying on them in any other way.”
― C. S. Lewis
This is a personal passion project I started when I learned that there was such a thing as a keystroke listener (like the CIA kind). I thought it would be cool to make one.
To make one it had to:
- listen to keystrokes
- do some type of logical process to check for a pattern in the keystrokes
- create a fun result when that pattern is found
- do it without an html form or input element which already has most of this baked into it (what good is experimenting with a solution that is already solved for me?)
To use the app simply click on the View Project
button or visit https://trrapp12.github.io/konami.
v1.0 demonstrated the following:
-
event listeners.
-
DOM manipulation with
document.addEventListener()
andwindow.addEventListener
; -
.push()
-
.splice()
I later came back and revamped the project and included:
🆕 Using spread operators to split a string into an array of letters.
🆕 combining setInterval()
and clearInterval()
and a for loop to create a typing effect
🆕 use of new Promise()
and resolve
🆕 Use of mouseenter
event listeners to create a pop-up animation
🆕 Use of clear, reusable functional programming
-
figuring out how keystrokes were referred to so I could ignore unimportant ones
-
Creating a typing effect, but with multiple lines. I had to break the text up into sections and then time them correctly with setIntervals. Looking at it now I think I can find a better way, but I also have other, more pressing, projects.
---
artwork was created by me using Dall-E open-source AI
*For more information see my LinkedIn, or return to my Github