Skip to content

A fun little project that listens for a specific sequence of keystrokes on your keyboard and triggers an Easter egg when the sequence is matched.

Notifications You must be signed in to change notification settings

tanzim-ikram/Key-Sequence-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Key-Sequence-Detection

A fun little project that listens for a specific sequence of keystrokes on your keyboard and triggers an Easter egg when the sequence is matched. This project uses JavaScript to detect a secret code and then runs a quirky animation using the Cornify library.

πŸš€ Demo

Type asad on your keyboard while the page is open, and enjoy the surprise! πŸŽ‰

πŸ“ Project Structure

Key-Sequence-Detection/
β”‚
β”œβ”€β”€ index.html        # Main HTML file containing the script
β”œβ”€β”€ cornify.js        # External script for adding fun effects (unicorns, rainbows, etc.)
└── README.md         # Project documentation

πŸ“¦ Features

  • Listens to key presses (keyup events)
  • Detects a custom secret code (asad)
  • Triggers a visual effect using cornify_add() from the Cornify library
  • Logs pressed keys to the console for debugging

πŸ›  How It Works

  • Each key press is stored in the pressed array.
  • The array maintains only the last N keys, where N is the length of the secretCode.
  • When the sequence of keys matches the secret code, an animation is triggered.

πŸ“¦ Requirements

Just a browser! No frameworks or external dependencies (other than cornify.js).

πŸ§™β€β™‚οΈ Customize

Want to change the secret code? Modify this line in the script:

const secretCode = 'your-secret-code';

You can also replace or customize the effect inside the if condition.

πŸ–Ό Preview

Key-Sequence-Detection

🧩 Credits

πŸ“œ License

MIT License

About

A fun little project that listens for a specific sequence of keystrokes on your keyboard and triggers an Easter egg when the sequence is matched.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published