{"id":18964735,"url":"https://github.com/clipy/sauce","last_synced_at":"2025-10-16T06:22:28.492Z","repository":{"id":33083805,"uuid":"142701903","full_name":"Clipy/Sauce","owner":"Clipy","description":"Mapping various keyboard layout sources and key codes in macOS. (e.g.: QWERTY, Dvorak) ","archived":false,"fork":false,"pushed_at":"2025-09-17T18:47:24.000Z","size":159,"stargazers_count":89,"open_issues_count":7,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-30T19:08:11.035Z","etag":null,"topics":["dvorak","keycode","macos","qwerty","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Clipy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-28T18:46:25.000Z","updated_at":"2025-09-27T13:58:34.000Z","dependencies_parsed_at":"2024-01-23T17:39:46.957Z","dependency_job_id":"22701c8b-5831-4774-9bed-aa3a54bcf005","html_url":"https://github.com/Clipy/Sauce","commit_stats":{"total_commits":77,"total_committers":6,"mean_commits":"12.833333333333334","dds":"0.23376623376623373","last_synced_commit":"71ff8de6292653a27fa98e901e447e47041e6fad"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/Clipy/Sauce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clipy%2FSauce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clipy%2FSauce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clipy%2FSauce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clipy%2FSauce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Clipy","download_url":"https://codeload.github.com/Clipy/Sauce/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clipy%2FSauce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279162202,"owners_count":26117130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dvorak","keycode","macos","qwerty","swift"],"created_at":"2024-11-08T14:25:49.594Z","updated_at":"2025-10-16T06:22:28.458Z","avatar_url":"https://github.com/Clipy.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sauce\n![CI](https://github.com/Clipy/Sauce/workflows/Xcode-Build/badge.svg)\n[![Release version](https://img.shields.io/github/release/Clipy/Sauce.svg)](https://github.com/Clipy/Sauce/releases/latest)\n[![License: MIT](https://img.shields.io/github/license/Clipy/Sauce.svg)](https://github.com/Clipy/Sauce/blob/master/LICENSE)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Version](https://img.shields.io/cocoapods/v/Sauce.svg)](https://cocoapods.org/pods/Sauce)\n[![Platform](https://img.shields.io/cocoapods/p/Sauce.svg)](https://cocoapods.org/pods/Sauce)\n[![SPM supported](https://img.shields.io/badge/SPM-supported-DE5C43.svg?style=flat)](https://swift.org/package-manager)\n\nMapping various keyboard layout sources and key codes in macOS. (e.g.: QWERTY, Dvorak)\n\n## Motivation\nOnly the ANSI-standard US keyboard is defined for the key code defined in Carbon.framework. Therefore, we can obtain only the key code of the QWERTY keyboard layout. (e.g.: `kVK_ANSI_V`)  \nIn layout other than QWERTY, (e.g. Dvorak) the virtual key code is different.\n\n|  Keyboard Layout  |  Key  |  Key Code  |\n| :---------------: | :---: | :--------: |\n|      QWERTY       |   v   |      9     |\n|      Dvorak       |   v   |     47     |\n\nThis library is created with the purpose of mapping the key code of the input sources and making it possible to obtain the correct key code in various keyboard layouts.\n\n## Usage\n### CocoaPods\n```\npod 'Sauce'\n```\n\n### Carthage\n```\ngithub \"Clipy/Sauce\"\n```\n\n## Example\n### Key codes\nGet the key code of the current input source.\n\n```swift\nlet keyCode = Sauce.shared.keyCode(for: .v)\n```\n\n### Key\nGet the `Key` of the current input source.\n\n```swift\nlet key = Sauce.shared.key(for: keyCode)\n```\n\n### Character\nGet the character of the current input source.\n\n```swift\nlet character = Sauce.shared.character(for: keyCode, carbonModifiers: shiftKey)\nlet character = Sauce.shared.character(for: keyCode, cocoaModifiers: [.shift])\n```\n\n## Notification\n### `NSNotification.Name.SauceEnabledKeyboardInputSourcesChanged`\n`SauceEnabledKeyboardInputSourcesChanged` is the same as `kTISNotifyEnabledKeyboardInputSourcesChanged` in Carbon.framework  \n\n### `NSNotification.Name.SauceSelectedKeyboardInputSourceChanged`\n`SauceSelectedKeyboardInputSourceChanged` is different from `kTISNotifySelectedKeyboardInputSourceChanged` and is notified only when the input source id has changed.  \nSince it is filtered and notified, please do not use it for the same purpose as normal `kTISNotifySelectedKeyboardInputSourceChanged`.\n\n### `NSNotification.Name.SauceSelectedKeyboardKeyCodesChanged`\nBy using this Notification, can detect when the setting changes with the same keyboard layout, when the input source changes from QWERTY to Dvorak, and so on.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclipy%2Fsauce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclipy%2Fsauce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclipy%2Fsauce/lists"}