Skip to content

fix(keyboard): track media key press state - #60

Merged
esphynox merged 2 commits into
mainfrom
fix/media-key-pressed-state
Jul 31, 2026
Merged

fix(keyboard): track media key press state#60
esphynox merged 2 commits into
mainfrom
fix/media-key-pressed-state

Conversation

@esphynox

@esphynox esphynox commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix media keycaps so they render their pressed state from live media-key events and from settings previews.

Root cause: capture only forwarded media-key down events, and the keycap factory discarded MediaKeyEvent.isPressed by hardcoding media keycaps as unpressed. The keyboard visualizer now receives recognized media-key releases and tracks media-key groups so key-up updates the existing rendered group instead of creating a disconnected release.

Tests

  • tuist generate
  • xcodebuild test -project Keyty.xcodeproj -scheme Keyty -destination 'platform=macOS'
  • Other: xcodebuild test -project Keyty.xcodeproj -scheme Keyty -destination 'platform=macOS' -only-testing:KeytyTests/KeycapEventCoordinatorTests -only-testing:KeytyTests/KeycapItemFactoryTests -only-testing:KeytyTests/KeyboardSettingsPreviewTests

Run project commands from Apps/Keyty.

UI Changes

Media keycaps now show the pressed visual state while held, then update to unpressed on key-up. No screenshots attached.

Documentation

  • Updated relevant docs
  • No docs needed

Release Notes

Fixed media keycaps so playback, brightness, and volume keys visibly press and release in the keyboard overlay.

@esphynox esphynox added the bug Something isn't working label Jul 30, 2026
@esphynox esphynox self-assigned this Jul 30, 2026
@esphynox
esphynox marked this pull request as ready for review July 30, 2026 23:47
@esphynox
esphynox force-pushed the fix/media-key-pressed-state branch from 693d2ac to 9f5edb0 Compare July 30, 2026 23:49
@esphynox
esphynox force-pushed the fix/media-key-pressed-state branch from 9f5edb0 to 69d468a Compare July 30, 2026 23:57
@esphynox
esphynox merged commit 847ac1b into main Jul 31, 2026
1 check passed
@esphynox
esphynox deleted the fix/media-key-pressed-state branch August 1, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant