mirror of
https://github.com/Clipy/Clipy.git
synced 2026-04-26 01:25:58 +03:00
[PR #289] [MERGED] Support input source selection when pasting (including Dvorak) #507
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Clipy#507
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
develop← Head:feature/support-dvorak📝 Commits (1)
aba4614Support 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.