Skip to content

Conversation

@wellingtoncosta
Copy link
Collaborator

@wellingtoncosta wellingtoncosta commented Jan 6, 2026

Summary

Implements cursor hiding behavior on macOS when typing in text fields, matching the native IDE behavior. The cursor automatically hides when the user types and reappears when the mouse moves.

Evidence

Screen.Recording.2026-01-06.at.6.37.57.PM.mov

Implementation Details

Architecture

Added a platform-specific cursor controller abstraction using Compose composition locals:

  • PlatformCursorController - Interface for platform-specific cursor control
  • StandalonePlatformCursorController - macOS implementation using JNA to call [NSCursor setHiddenUntilMouseMoves:YES]
  • BridgePlatformCursorController - Bridge implementation using MacUIUtil.hideCursor()
  • NoOpPlatformCursorController - Fallback for unsupported platforms

Integration

  • Applied to all InputField components via .hideCursorOnTyping() modifier
  • Only active when field is enabled and not read-only
  • Provided via LocalPlatformCursorController composition local:
    • IntUiThemeStandalonePlatformCursorController
    • SwingBridgeThemeBridgePlatformCursorController

Release notes

New features

  • Input Fields: Added automatic cursor hiding on macOS when typing. The cursor hides while typing and reappears when the mouse moves, matching the native macOS behavior seen in IntelliJ Platform text fields (JEWEL-992).

Copy link
Collaborator

@faogustavo faogustavo left a comment

Choose a reason for hiding this comment

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

No blockers :)

@wellingtoncosta wellingtoncosta force-pushed the wp/hide-cursor-while-typing-macos branch from 3c1838d to 8f771d3 Compare January 7, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants