Skip to content

⌨️ A simple web app that shows the key, key code, and code value when you press any key on the keyboard. Built with HTML, CSS, and JavaScript.

License

Notifications You must be signed in to change notification settings

nirdhum/keylogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⌨️ Keyboard Key Code Detector

This mini project allows users to press any key on their keyboard and instantly see the key, key code, and code value displayed on the screen.

It's a great beginner project for understanding keyboard events, event objects, and DOM manipulation using HTML, CSS, and JavaScript.

🌟 Features

  • 🔍 Displays the key pressed by the user
  • 🔢 Shows event.key, event.keyCode, and event.code
  • ⚡ Instant response to keypresses
  • 🎨 Simple and responsive design
  • 🧠 Great for learning about keyboard events and event objects
  • 🔌 Pure HTML/CSS/JS – no libraries or frameworks

🚀 Live Demo

👉 Try it Live

🛠️ Technologies Used

  • HTML5 – Basic layout structure
  • CSS3 – Styling and responsive design
  • JavaScript (ES6) – Event handling and DOM manipulation

📁 Project Structure

keylogger/
├── index.html # HTML structure
├── style.css # Styling and layout
├── script.js # JavaScript logic
└── README.md # Project documentation

⚙️ How It Works

  1. Listens for the keydown event on the entire document.
  2. Extracts key data using the event object properties:
    • event.key
    • event.code
    • event.keyCode (deprecated but commonly used)
  3. Dynamically updates the content on the page to display the results.

🧩 Educational Value

This project helps you learn:

  • JavaScript event handling (keydown)
  • Working with the KeyboardEvent object
  • Real-time DOM updates
  • Keyboard accessibility and key identifiers

🔧 Setup & Installation

To run this project locally:

🙌 Contributing

Contributions and improvements are welcome!

  • Fork the repo
  • Create a new branch
  • Make your changes
  • Submit a pull request

📄 License

This project is licensed under the MIT License.

👨‍💻 Author

Nirdhum

⭐️ Show Your Support

If you found this project helpful or interesting, please consider giving it a ⭐️ on GitHub!

About

⌨️ A simple web app that shows the key, key code, and code value when you press any key on the keyboard. Built with HTML, CSS, and JavaScript.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published