Skip to content

fix: Improve long press tap command with proper duration handling - #6

Closed
conorluddy wants to merge 1 commit into
mainfrom
fix/tap-duration-parameter
Closed

fix: Improve long press tap command with proper duration handling#6
conorluddy wants to merge 1 commit into
mainfrom
fix/tap-duration-parameter

Conversation

@conorluddy

Copy link
Copy Markdown
Owner

Summary

Improves the long press gesture command by properly utilizing IDB's built-in duration parameter instead of simulating with delays.

Changes

  • Add --duration parameter to tap_and_hold() method in gesture.py
  • Convert duration from seconds to milliseconds for IDB compatibility
  • Remove unnecessary time.sleep() since IDB handles duration natively
  • Maintains backward compatibility with existing long press calls

Testing

  • Long press commands now use IDB's native duration parameter
  • Conversion formula: int(duration * 1000) (e.g., 2.0 seconds = 2000ms)
  • Tested with various duration values

Technical Details

IDB's idb ui tap command supports --duration parameter in milliseconds:

  • Allows precise control over press duration
  • More reliable than simulating with delays
  • Integrates better with IDB's event handling

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

- Add --duration parameter to tap_and_hold method
- Convert duration from seconds to milliseconds for IDB compatibility
- Remove unnecessary time.sleep() since IDB handles duration natively
- Maintains backward compatibility with existing long press calls
@conorluddy conorluddy closed this Oct 28, 2025
@conorluddy
conorluddy deleted the fix/tap-duration-parameter branch October 28, 2025 19:51
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.

1 participant