Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

claude-mouse

Mouse support for Claude Code's terminal UI.

Claude Code has no native mouse support — this tool adds it by wrapping Claude Code in a PTY and translating mouse events into keyboard navigation.

Features

  • Click to select options in approval prompts (Yes/No, file edits, bash commands)
  • Click checkboxes in multi-select questions
  • Click the Submit button
  • Hover to move the focus pointer across options
  • Scroll works normally when no interactive options are visible
  • Text selection works normally when no options are visible

How it works

claude-mouse spawns Claude Code inside a pseudo-terminal and tracks the screen buffer with pyte. When interactive options appear on screen, it enables SGR mouse mode to capture clicks and hover events, translating them into the arrow keys and Enter/Space that Claude Code expects. When options disappear, mouse mode is disabled so terminal-native scrollback and text selection work normally.

Install

pip install git+https://github.com/Ofear/claude-mouse.git

Usage

claude-mouse            # instead of 'claude'
claude-mouse --help     # passes args through to claude

Debug mode

CLAUDE_MOUSE_DEBUG=1 claude-mouse
# logs to /tmp/claude_mouse_debug.txt

Requirements

  • Python 3.10+
  • Claude Code CLI (claude) installed and in PATH
  • A terminal with SGR mouse support (most modern terminals: kitty, iTerm2, gnome-terminal, etc.)

License

MIT

About

Mouse support for Claude Code — click, hover, and scroll in the terminal UI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages