[PR #289] [MERGED] Support input source selection when pasting (including Dvorak) #507

Closed
opened 2026-03-03 01:12:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Clipy/Clipy/pull/289
Author: @jcw-
Created: 7/5/2018
Status: Merged
Merged: 7/13/2018
Merged by: @Econa77

Base: developHead: feature/support-dvorak


📝 Commits (1)

  • aba4614 Support input source selection

📊 Changes

1 file changed (+13 additions, -2 deletions)

View changed files

📝 Clipy/Sources/Services/PasteService.swift (+13 -2)

📄 Description

Looks for the key that emits the letter "V" and then presses that key.

This fixes the issue where Clipy performs a Command + K when an item is selected with a Dvorak keyboard layout (the physical V key is actually the letter K on Dvorak).

I'm scanning each time because it is possible to switch keyboard layouts while Clipy is running. I considered trying to cache the scan results per input source, but that felt excessive to try and optimize a loop that runs 10's of times.

This code leverages functionality in the Magnet pod which already figures out the key translation as part of its keyboard shortcut support.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Clipy/Clipy/pull/289 **Author:** [@jcw-](https://github.com/jcw-) **Created:** 7/5/2018 **Status:** ✅ Merged **Merged:** 7/13/2018 **Merged by:** [@Econa77](https://github.com/Econa77) **Base:** `develop` ← **Head:** `feature/support-dvorak` --- ### 📝 Commits (1) - [`aba4614`](https://github.com/Clipy/Clipy/commit/aba461472b1f4e0a12148ca4a66fedf486cf75ce) Support input source selection ### 📊 Changes **1 file changed** (+13 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Clipy/Sources/Services/PasteService.swift` (+13 -2) </details> ### 📄 Description Looks for the key that emits the letter "V" and then presses that key. This fixes the issue where Clipy performs a Command + K when an item is selected with a Dvorak keyboard layout (the physical V key is actually the letter K on Dvorak). I'm scanning each time because it is possible to switch keyboard layouts while Clipy is running. I considered trying to cache the scan results per input source, but that felt excessive to try and optimize a loop that runs 10's of times. This code leverages functionality in the Magnet pod which already figures out the key translation as part of its keyboard shortcut support. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:12:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Clipy#507
No description provided.