Skip to content

Conversation

@parkour86
Copy link

Overview

This pull request introduces enhancements to the Speedtest plugin, improving its user interaction and UI feedback.


Key Changes

1. Long-Press (Hold) Support

  • Added an event_callback method to the Speedtest action class, mirroring the event handling style of other plugins (such as the Counter plugin).
  • Implemented an on_key_hold method that is triggered on long-press (HOLD_START event).
  • When the button is held, the plugin now:
    • Clears the top and center labels and resets the bottom label to "Start".
    • Restores the default speedtest image (speed.png) to the button, ensuring the UI resets after a test or error.

2. UI Consistency

  • Ensured that after a speed test or error, holding the button will always restore the original image and clear any test results or error messages from the labels.

3. Non-breaking Changes

  • The original short-press (on_key_down) behavior is preserved and now routed through the new event handling system for consistency with other plugins.

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