Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Activity Logger

A Python-based activity monitoring tool that logs keyboard inputs, mouse events, clipboard actions, and active window changes with timestamps.

Features

  • Keyboard Logging: Captures typed text buffer upon pressing Space, Enter, or Tab, as well as special key events.
  • Clipboard Monitoring: Records text copied (Ctrl+C) or pasted (Ctrl+V).
  • Mouse Tracking: Logs left/right clicks with screen coordinates and scroll directions.
  • Window Tracking: Detects the active window title and records window switching events.
  • Hourly Log Rotation: Automatically creates log files named by date and hour (activity_log_YYYYMMDD_HH.txt).

Requirements

  • Python 3.6 or higher
  • Required Python packages:
    • pynput
    • pygetwindow
    • pyperclip

Installation

Install all required dependencies via pip:

pip install pynput pygetwindow pyperclip

Usage

Run the script from your terminal or command prompt:

python main.py

To stop the logger, press Ctrl+C in the terminal. Any remaining text in the keyboard buffer will be written to the log file before exiting.

Log Format

Log entries are saved in the working directory. Each entry follows this structure:

Timestamp | Window Title | Action/Event Details | Time Since Last Event

Example Output

2026-05-12 14:30:00 | Window: Google Chrome | Text: hello world [SPACE] | Time Since Last: 0.45s
2026-05-12 14:30:02 | Window: Visual Studio Code | Clipboard Copy: sample code | Time Since Last: 2.10s
2026-05-12 14:30:05 | Window: Visual Studio Code | Mouse Left Click at (450, 320) | Time Since Last: 3.00s

Disclaimer

This software is developed strictly for personal, educational, or authorized activity tracking purposes. The author accepts no responsibility or liability for any illegal, unauthorized, or malicious use of this project.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages