Skip to content

Basic keystroke listener which listens to keys pushed and displays them to the screen, but with a cool KONAMI easter-egg.

Notifications You must be signed in to change notification settings

trrapp12/konami

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KONAMI



Button60


konami.mp4


HTML5

CSS3

JavaScript




DESCRIPTION:


“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?)

QUICKSTART GUIDE

To use the app simply click on the View Project button or visit https://trrapp12.github.io/konami.



THIS PROJECT DEMONSTRATES:


v1.0 demonstrated the following:

  • event listeners.

  • DOM manipulation with document.addEventListener() and window.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



CHALLENGES I OVERCAME

  • 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.


---

ATTRIBUTIONS:

MDN: keydown event

artwork was created by me using Dall-E open-source AI


YOU CAN FIND ME AT:

*For more information see my LinkedIn, or return to my Github

About

Basic keystroke listener which listens to keys pushed and displays them to the screen, but with a cool KONAMI easter-egg.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published