{"id":16654213,"url":"https://github.com/letmefly666/keyboarddistance","last_synced_at":"2026-04-28T02:32:02.980Z","repository":{"id":58123238,"uuid":"530100344","full_name":"LetMeFly666/KeyboardDistance","owner":"LetMeFly666","description":"Calculate the distance between two keys.","archived":false,"fork":false,"pushed_at":"2022-08-29T07:29:58.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-28T19:46:34.374Z","etag":null,"topics":["keyboard"],"latest_commit_sha":null,"homepage":"https://keyboarddistance.letmefly.xyz","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LetMeFly666.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":null,"security":null,"support":null}},"created_at":"2022-08-29T06:52:03.000Z","updated_at":"2022-09-29T13:08:45.000Z","dependencies_parsed_at":"2022-09-11T09:00:48.716Z","dependency_job_id":null,"html_url":"https://github.com/LetMeFly666/KeyboardDistance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LetMeFly666/KeyboardDistance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LetMeFly666%2FKeyboardDistance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LetMeFly666%2FKeyboardDistance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LetMeFly666%2FKeyboardDistance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LetMeFly666%2FKeyboardDistance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LetMeFly666","download_url":"https://codeload.github.com/LetMeFly666/KeyboardDistance/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LetMeFly666%2FKeyboardDistance/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32363627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"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":["keyboard"],"created_at":"2024-10-12T09:49:03.039Z","updated_at":"2026-04-28T02:32:02.958Z","avatar_url":"https://github.com/LetMeFly666.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KeyboardDistance\n\nCalculate the distance between two keys.（计算两个按键之间的距离。）\n\nProject URL:（项目地址：）  [https://github.com/LetMeFly666/KeyboardDistance](https://github.com/LetMeFly666/KeyboardDistance)\n\nOnline Address: （在线地址：）  [https://keyboarddistance.letmefly.xyz](https://keyboarddistance.letmefly.xyz)\n\n---\n\n## Introduction（介绍）\n\nThe keyboard looks like:（键盘形状如下：）\n\n```\n┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐\n│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │\n└┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┘\n │ A │ S │ D │ F │ G │ H │ J │ K │ L │\n └─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┘\n   │ Z │ X │ C │ V │ B │ N │ M │\n   └───┴───┴───┴───┴───┴───┴───┘\n```\n\nWe define that the minimum distance of two key which have the same border is 2.（我们定义：具有公共边的两个按键的最短距离为1）\n\nFor example, The keys with the shortest distance of 2 from F are R, T, G, V, C, and D.（例如，和F最短距离为2的按键有R、T、G、V、C和D）\n\n## Usage（用法）\n\nUse the ```keyboarddistance``` class in ```main.cpp``` directly.（直接使用```main.cpp```里的```KeyboardDistance```类即可。）\n\n```cpp\nKeyboardDistance kd;\nchar a, b;\nwhile (cin \u003e\u003e a \u003e\u003e b) {\n    cout \u003c\u003c kd.getDistance(a, b) \u003c\u003c endl;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletmefly666%2Fkeyboarddistance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletmefly666%2Fkeyboarddistance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletmefly666%2Fkeyboarddistance/lists"}