How pmsosa/pylogger works
Pylogger is a Windows keylogger. Its runtime workflow captures keyboard events, adds foreground-window context and clipboard paste text, checks typed trigger commands, and writes captured text to rotating log files. The README also documents pause/resume, status, dump, quit, and log-deletion triggers. Source supports the main event and file paths; the dependency-driven Windows hook setup is shown without expanding packaging machinery.
Main entry points: pylogger.py Trigger checks
Components 17
Input capture
- Pylogger runtime
pylogger.py - Foreground context
pylogger.py - Clipboard text
pylogger.py
Trigger controls
- Trigger checks
pylogger.py - Pause and resume
pylogger.py - Status beep
pylogger.py - Quit command
pylogger.py - Log deletion
pylogger.py - Drive dump
pylogger.py
Log handling
- Log writer
pylogger.py - Log rotation
pylogger.py - Log files
pylogger.py
Other components
- Computer user
- Keyboard events
- Windows APIs
- Clipboard API
- Drive destination
Connections 22
- Computer user → Keyboard events: types keys
- Keyboard events → Pylogger runtime: delivers events
- Pylogger runtime → Foreground context: queries on change
- Foreground context → Windows APIs: queries process
- Pylogger runtime → Clipboard API: reads paste
- Clipboard API → Clipboard text: returns text
- Pylogger runtime → Trigger checks: checks characters
- Trigger checks → Pause and resume: dispatches
- Trigger checks → Status beep: dispatches
- Trigger checks → Quit command: dispatches
- Trigger checks → Log deletion: dispatches
- Trigger checks → Drive dump: dispatches
- Pylogger runtime → Log writer: writes captured text
- Foreground context → Log writer: writes context
- Clipboard text → Log writer: writes paste
- Pause and resume → Log writer: gates writes
- Log writer → Log rotation: checks size
- Log writer → Log files: writes
- Log rotation → Log files: archives oversized
- Log deletion → Log files: deletes
- Drive dump → Log files: copies
- Drive dump → Drive destination: copies to drive