{"id":13993798,"url":"https://github.com/makerdiary/python-keyboard","last_synced_at":"2025-04-05T13:08:02.509Z","repository":{"id":43166750,"uuid":"260608222","full_name":"makerdiary/python-keyboard","owner":"makerdiary","description":"A hand-wired USB \u0026 Bluetooth keyboard powered by Python and more","archived":false,"fork":false,"pushed_at":"2021-03-09T07:09:06.000Z","size":43065,"stargazers_count":494,"open_issues_count":23,"forks_count":62,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-03-29T12:08:00.326Z","etag":null,"topics":["bluetooth","circuitpython","keyboard","mechanical-keyboard","python","usb-keyboard"],"latest_commit_sha":null,"homepage":"https://makerdiary.com/m60","language":"Python","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/makerdiary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-02T03:44:37.000Z","updated_at":"2025-03-08T18:56:07.000Z","dependencies_parsed_at":"2022-08-30T11:01:35.589Z","dependency_job_id":null,"html_url":"https://github.com/makerdiary/python-keyboard","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdiary%2Fpython-keyboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdiary%2Fpython-keyboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdiary%2Fpython-keyboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdiary%2Fpython-keyboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makerdiary","download_url":"https://codeload.github.com/makerdiary/python-keyboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339158,"owners_count":20923014,"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","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":["bluetooth","circuitpython","keyboard","mechanical-keyboard","python","usb-keyboard"],"created_at":"2024-08-09T14:02:33.818Z","updated_at":"2025-04-05T13:08:02.468Z","avatar_url":"https://github.com/makerdiary.png","language":"Python","readme":"PYKB - Python Keyboard\n======================\n\n English | [中文][1]\n---------|----------\n\nCreate a hand-wired keyboard, run Python on it, turn it into production.\n\n![](img/python-inside-keyboard.png)\n\n## Hand-wiring a keyboard\nFollow [the guide - hand-wiring-a-keyboard.md](hand-wiring-a-keyboard.md) to rapidly make a keyboard with 100 lines of Python code.\n\n![](img/colorful-keycaps.jpg)\n\n## From prototype to production \u003csup\u003e\u003ckbd\u003ein progress\u003c/kbd\u003e\u003c/sup\u003e\nWith putting more time into the Python keyboard, we find it more and more interesting. We think a Python keyboard can make a big difference, so we decide to design a new keyboard for everyone. Check out [the M60 mechanical keyboard](https://makerdiary.com/m60).\n\n[![](img/m60.jpg)](https://makerdiary.com/m60)\n\n## To be a productive keyboard\nAs the 60% keyboard lacks a lot of keys (F1~F12, arrow keys and etc). We can use\n[features like TMK's layers and composite keys](https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/keymap.md) to make the small keyboard much more powerful.\nWith the idea from [Toward a more useful keyboard](https://github.com/jasonrudolph/keyboard) to keep our fingers at the home row, we can optimize the keyboard to make us more productive.\n\nAdding the Tap-key feature, which is holding a key down to activate an alternate function, can make a big difference.\n\n### Using \u003ckbd\u003eD\u003c/kbd\u003e for Navigation\n\nTaping \u003ckbd\u003ed\u003c/kbd\u003e outputs \u003ckbd\u003ed\u003c/kbd\u003e (press \u0026 release quickly), holding \u003ckbd\u003ed\u003c/kbd\u003e down activates navigation functions.\n\n![](img/d-for-navigation.png)\n\n+ \u003ckbd\u003ed\u003c/kbd\u003e + \u003ckbd\u003eh\u003c/kbd\u003e as \u003ckbd\u003e←\u003c/kbd\u003e\n+ \u003ckbd\u003ed\u003c/kbd\u003e + \u003ckbd\u003ej\u003c/kbd\u003e as \u003ckbd\u003e↓\u003c/kbd\u003e\n+ \u003ckbd\u003ed\u003c/kbd\u003e + \u003ckbd\u003ek\u003c/kbd\u003e as \u003ckbd\u003e↑\u003c/kbd\u003e\n+ \u003ckbd\u003ed\u003c/kbd\u003e + \u003ckbd\u003el\u003c/kbd\u003e as \u003ckbd\u003e→\u003c/kbd\u003e\n+ \u003ckbd\u003ed\u003c/kbd\u003e + \u003ckbd\u003eu\u003c/kbd\u003e as \u003ckbd\u003ePageUp\u003c/kbd\u003e\n+ \u003ckbd\u003ed\u003c/kbd\u003e + \u003ckbd\u003en\u003c/kbd\u003e as \u003ckbd\u003ePageDown\u003c/kbd\u003e\n\n\n### Using \u003ckbd\u003e;\u003c/kbd\u003e as \u003ckbd\u003eCtrl\u003c/kbd\u003e\nUse \u003ckbd\u003e;\u003c/kbd\u003e as a MODS_TAP key, taping \u003ckbd\u003e;\u003c/kbd\u003e outputs \u003ckbd\u003e;\u003c/kbd\u003e, holding \u003ckbd\u003e;\u003c/kbd\u003e down outputs \u003ckbd\u003eCtrl\u003c/kbd\u003e.\n\n![](https://github.com/xiongyihui/keyboard/raw/master/img/semicolon_as_ctrl.png)\n\n\n### Using Pair-keys\nSimultaneously pressing two keys (interval less than 10ms) activates an alternate function.\n\n### Optimizing with C modules\u003csup\u003e\u003ckbd\u003ein progress\u003c/kbd\u003e\u003c/sup\u003e\n\nA C module `matrix` of keyboard matrix is written to reduce latency and power consumption. The module has the same function as [`keyboard/matrix.py`](keyboard/matrix.py).\n\n\n## Todo\n- [ ] add system keys\n- [ ] add mouse keys\n\n\n## Credits\n+ [MicroPython](https://github.com/micropython/micropython)\n+ [CircuitPython](https://github.com/adafruit/circuitpython)\n+ [TMK](https://github.com/tmk/tmk_keyboard)\n+ [Toward a more useful keyboard](https://github.com/jasonrudolph/keyboard)\n\n\n[1]: https://gitee.com/makerdiary/python-keyboard\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerdiary%2Fpython-keyboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakerdiary%2Fpython-keyboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerdiary%2Fpython-keyboard/lists"}