Skip to content

feat(keyboard): drag the visible overlay to reposition it - #184

Closed
agilek wants to merge 1 commit into
keytyapp:mainfrom
agilek:feat/drag-keyboard-overlay
Closed

agilek wants to merge 1 commit into
keytyapp:mainfrom
agilek:feat/drag-keyboard-overlay

Conversation

@agilek

@agilek agilek commented Dec 3, 2026 •

Copy link
Copy Markdown

Summary

Lets you reposition the keyboard overlay by dragging it while it is visible, without opening Settings. The drop is stored as the existing custom placement, so it behaves the same as a position set from the Displays pane.

  • The overlay accepts mouse input only while groups are visible. When it is empty it stays click-through.
  • Dragging from a preset anchor switches to custom placement and carries over the preset's edges as the custom alignment. Movement under 3 pt counts as a click and changes nothing.
  • The drag updates the stored anchor live, so keystrokes that arrive mid-drag don't snap the overlay back. It can move across displays.
  • Groups don't fade while the overlay is held. The fade timer restarts on release.
  • The overlay window is now a non-activating NSPanel, so that grabbing it doesn't take focus from the current app.
  • Left clicks that grab the overlay are not shown as mouse events in the keyboard overlay.
  • The Displays pane picks up placement changes made outside it.

Behavior change to consider: while groups are visible, the overlay's frame now catches clicks that used to pass through to the app underneath, including transparent gaps between groups. There is no setting to turn this off. I'm happy to put it behind a toggle if you prefer.

No change to event capture, permissions or stored setting keys.

Tests

  • tuist generate
  • xcodebuild test -project Keyty.xcodeproj -scheme Keyty -destination 'platform=macOS' (353 tests, Xcode 26.3, macOS 15.7, signed with my own team)
  • Other: Release configuration builds

New tests in KeyboardVisualizerWindowDragTests: click-through state, drag and stored placement, click without movement, and fade hold and release. They call the drag methods directly, so real pointer input, multi-display dragging and the Displays pane sync are not covered by automated tests.

UI Changes

N/A. No new controls or visual changes; the existing overlay can now be dragged.

Documentation

  • Updated relevant docs (English README only; translated READMEs are unchanged)
  • No docs needed

Release Notes

Keyboard visualizer: drag the visible overlay to move it anywhere on screen.

🤖 Generated with Claude Code

Accept mouse input on the keyboard overlay while groups are visible and
store the dropped position as the custom placement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@esphynox

esphynox commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Hey there, @agilek! Thanks for the PR!

When I was doing this app I made conscious decision to anchor visualizer statically and not allow users to move it dynamically. While I'm not entirely against this feature and I'm generally in favour for customization - I want this feature to be behind customizable flag. And since default experience for the app is static position this flag should be off by default - at least for now. I guess a little bit tricky question where this setting belongs in Settings window.

Try to think it through where it belongs in settings window and I will try to use it in app as a whole experience.

@agilek

agilek commented Dec 3, 2026

Copy link
Copy Markdown
Author

Hey there, @agilek! Thanks for the PR!

When I was doing this app I made conscious decision to anchor visualizer statically and not allow users to move it dynamically. While I'm not entirely against this feature and I'm generally in favour for customization - I want this feature to be behind customizable flag. And since default experience for the app is static position this flag should be off by default - at least for now. I guess a little bit tricky question where this setting belongs in Settings window.

Try to think it through where it belongs in settings window and I will try to use it in app as a whole experience.

Thanks for your reply. Will think about it more.

@agilek agilek closed this Dec 3, 2026
@esphynox

esphynox commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Just to clarify, I think this is a valuable addition to Keyty, and I appreciate the work you’ve already put into the implementation. I’d be happy to discuss where the toggle could fit in Settings if you’re interested in continuing with this feature!

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