Author: Eclipsemanic
A Python script that logs keystrokes and tracks active window changes. Data is saved to key_log.txt, including timestamps for application/window switches. Special keys are formatted for readability.
- Logs keystrokes to a text file.
- Tracks active window titles (e.g., "Chrome" or "Notepad").
- Maps special keys (e.g., [ENTER], [SHIFT], [CTRL]).
- Runs in the background until stopped with Ctrl+C.
-
Install Dependencies:
Run these commands in your terminal:
pip install pynput pygetwindow -
Download Script:
Save the script askeylogger.py.
-
Start the Keylogger:
Run the script:
python keylogger.py -
Stop the Keylogger:
Press Ctrl+C in the terminal. -
View Logs:
Openkey_log.txtto see keystrokes and window changes.
-------- Switched to: Document1 - Notepad --------
H e l l o [SPACE][ENTER]
-------- Switched to: Chrome --------
h t t p s : / / g i t h u b . c o m [ENTER]
- Educational use only.
- Use only with explicit permission on systems you own.
- The author is not responsible for misuse.
Free and open-source. Modify and redistribute freely.
Author: eclipsemanic
GitHub: https://github.com/EclipseManic