Skip to content

Conversation

@finnvoor
Copy link
Collaborator

@finnvoor finnvoor commented Feb 27, 2025

  • Rename KeyStrokeListener/KeyStroke to TerminalEventListener/TerminalEvent
  • add left/right mouse down/up/drag and mouseMoved events to KeyStrokeListener
  • add withMouseTracking to Terminal to enable mouse tracking / mouse motion tracking
  • add KeyStrokeListenerTests to test characters/special keys/mouse events are decoded properly
  • update the KeyStrokeListener docs describing how to listen for mouse events
  • add mouse-tracking to examples-cli with a demo showcasing mouse tracking (click and drag to draw). I wasn't sure if this should be included as an example since it does not showcase a specific component, but I think it's a good example demoing KeyStrokeListener. Happy to remove though.

A future PR can add mouse support to the existing components (click yes/no, select option from list with mouse)

CleanShot.2025-02-25.at.22.01.33.mp4

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This pull request adds mouse tracking support to the keystroke listener utility while updating related documentation and navigation examples. The key changes include:

  • Updating the keystroke listener docs to cover mouse events, including examples and a demo.
  • Modifying the VitePress navigation to reposition the "Text styling" link under the "Components" section.
  • Adjusting the image path in the text-styling documentation.

Reviewed Changes

File Description
docs/content/utilities/keystroke-listener.md Adds documentation for mouse events and examples for mouse tracking.
docs/.vitepress/config.mjs Updates navigation by moving the text styling link under Components.
docs/content/utilities/text-styling.md Fixes the image path for the text styling documentation.

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

docs/content/utilities/keystroke-listener.md:14

  • The PR description indicates a rename from KeyStrokeListener to TerminalEventListener. Please update the documentation references if the renaming is finalized.
You can listen for both printable characters and special keys using the `KeyStrokeListener`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants