Skip to content

vishalquantana/secondcursor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecondCursor

An Electron application that displays a second cursor on your screen and includes keystroke logging capabilities.

Features

  • Displays a customizable gradient cursor moving in a circular pattern
  • Click-through transparent window that doesn't interfere with normal computer use
  • Periodic screen capture and analysis using Gemini AI
  • Secure keystroke logging with permission handling
  • Automatic cleanup of old logs

Requirements

  • Node.js and npm
  • For macOS: Input Monitoring and Screen Recording permissions

Installation

  1. Clone the repository
  2. Install dependencies:
npm install

Running the App

Start the application with:

npm start

On first run, the app will:

  1. Request necessary permissions (macOS)
    • Input Monitoring permission for keystroke logging
    • Screen Recording permission for screen capture
  2. Create a transparent window with the second cursor
  3. Begin periodic screen captures and analysis
  4. Start logging keystrokes (if permissions granted)

How It Works

Second Cursor

  • Creates a transparent, click-through Electron window covering the entire screen
  • Displays a div element styled as a cursor moving in a circular pattern
  • Window doesn't capture mouse events, allowing normal computer use

Keystroke Logging

  • Securely captures keystrokes using Electron's IPC system
  • Stores logs in the user data directory with daily rotation
  • Automatically cleans up logs older than 7 days
  • Includes modifier keys (Ctrl, Alt, Shift, Meta) in logged keystrokes

Screen Capture

  • Takes periodic screenshots every 15 seconds
  • Analyzes screenshots using Gemini AI
  • Displays analysis results in the application window

Project Structure

secondcursor/
├── main.js             # Main process & IPC handlers
├── index.html          # Renderer process UI
├── preload.js          # Secure IPC bridge
├── styles.css          # Cursor styling
├── cursor2.svg         # Cursor image
├── package.json        # Project configuration
└── forge.config.js     # Electron Forge configuration

Customization

Cursor Appearance

  • Modify gradient colors in styles.css
  • Adjust circle radius and animation speed in index.html
  • Change cursor size in styles.css

Keystroke Logging

  • Adjust log retention period in main.js
  • Modify log format in saveKeystroke function
  • Configure keystroke filtering in index.html

Screen Capture

  • Change capture interval in index.html
  • Modify analysis parameters in main.js
  • Adjust screenshot resolution in screen capture code

Security Notes

  • Keystroke logging requires explicit user permission
  • Logs are stored locally in the user data directory
  • Screen captures are processed locally before AI analysis
  • All permissions are verified before features are enabled

Development

Building from Source

  1. Clone the repository
  2. Install dependencies: npm install
  3. Start the application: npm start
  4. Package the application: npm run make

Debugging

  • Use Chrome DevTools for renderer process (View > Toggle Developer Tools)
  • Check console logs for detailed operation information
  • Monitor IPC communication in the DevTools console

License

Second Cursor is source-available, not open source in the OSI sense — it is free for noncommercial use but commercial use is paid.

  • Noncommercial use is free under the PolyForm Noncommercial License 1.0.0 (personal, research, education, nonprofit, government, hobby projects).
  • Commercial use requires a paid license from Quantana — this includes selling, whitelabeling, or using Second Cursor to provide a paid product or service.

To obtain a commercial license, contact Quantana (https://quantana.com.au).

See LICENSE.md for full terms.

Contributing

[Your Contributing Guidelines Here]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors