Keylogger Notes:

🧠 Key Concepts Used


📦 1. Library Imports

from pynput.mouse import Listener as MouseListener, Controller as MouseController
from pynput.keyboard import Key, Listener as KeyboardListener, Controller as KeyboardController

✍️ Explanation:


📂 2. File Handling in Python

Examples in the comments demonstrate basic file operations:

Mode Purpose Example
"r" Read-only open("log.txt", "r")
"w" Write (overwrites file) open("log.txt", "w")
"a" Append (adds to end) open("log.txt", "a")

🔁 Using with:

with open("log.txt", "a") as f:
    f.write("Hello World\\n")