{"id":20342329,"url":"https://github.com/spacether/keyboardlayout","last_synced_at":"2025-04-11T23:41:59.742Z","repository":{"id":55546649,"uuid":"316536005","full_name":"spacether/keyboardlayout","owner":"spacether","description":"A python library to display different keyboards","archived":false,"fork":false,"pushed_at":"2021-12-11T00:54:18.000Z","size":711,"stargazers_count":10,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T19:38:00.241Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/spacether.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["spacether"]}},"created_at":"2020-11-27T15:23:11.000Z","updated_at":"2024-11-03T13:03:27.000Z","dependencies_parsed_at":"2022-08-15T03:00:22.387Z","dependency_job_id":null,"html_url":"https://github.com/spacether/keyboardlayout","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/spacether%2Fkeyboardlayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacether%2Fkeyboardlayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacether%2Fkeyboardlayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacether%2Fkeyboardlayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacether","download_url":"https://codeload.github.com/spacether/keyboardlayout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497902,"owners_count":21113982,"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":[],"created_at":"2024-11-14T21:33:07.659Z","updated_at":"2025-04-11T23:41:59.720Z","avatar_url":"https://github.com/spacether.png","language":"Python","funding_links":["https://github.com/sponsors/spacether"],"categories":[],"sub_categories":[],"readme":"# keyboardlayout\nA python library to display different keyboards.\nWorks with pygame or tkinter.\n\nIf you need to show your users a graphic that shows a specific keyboard layout or a portion of a keyboard, this is the library for you.\n\n## Features:\n- shows a keyboard to the user\n- keyboard layouts\n  - qwerty\n  - azerty laptop\n- graphics backends\n  - pygame (uses sprite groups)\n  - tkinter (uses frames + labels)\n- customize the keyboard with sizes, colors, key margin, padding, font, location, etc\n- update a specific key with `update_key`\n- can update key images when keys are pressed\n\n## Changelog\nhttps://github.com/spacether/keyboardlayout/tree/master/CHANGELOG.md\n\n## Documentation\nhttps://spacether.github.io/keyboardlayout/\n\n## Examples\n#### qwerty with colors\n![qwerty colored](https://raw.githubusercontent.com/spacether/keyboardlayout/master/samples/images/qwerty_colored.jpg)\n\n#### qwerty\n![qwerty](https://raw.githubusercontent.com/spacether/keyboardlayout/master/samples/images/qwerty.jpg)\n\n#### azerty laptop\n![azerty_laptop](https://raw.githubusercontent.com/spacether/keyboardlayout/master/samples/images/azerty_laptop.jpg)\n\n## Installation\nMake sure that you are using Python3\n```\npip install keyboardlayout\n```\n\n## Samples\n- [pygame, qwerty](https://github.com/spacether/keyboardlayout/tree/master/samples/pygame_qwerty.py)\n- [pygame, pressed keys](https://github.com/spacether/keyboardlayout/tree/master/samples/pygame_pressed_keys.py)\n- [tkinter, qwerty](https://github.com/spacether/keyboardlayout/tree/master/samples/tkinter_qwerty.py)\n- [tkinter, pressed keys](https://github.com/spacether/keyboardlayout/tree/master/samples/tkinter_pressed_keys.py)\n\n## Usage\n### tkinter example\n```\nimport tkinter as tk\nimport tkinter.font as tkf\n\nimport keyboardlayout as kl\nimport keyboardlayout.tkinter as klt\n\nlayout_name = kl.LayoutName.QWERTY\nkey_size = 60\ngrey = '#bebebe'\ndark_grey = '#414141'\nkeyboard_info = kl.KeyboardInfo(\n    position=(0, 0),\n    padding=2,\n    color=dark_grey\n)\nwindow = tk.Tk()\nwindow.resizable(False, False)\nkey_info = kl.KeyInfo(\n    margin=10,\n    color=grey,\n    txt_color=dark_grey,\n    txt_font=tkf.Font(family='Arial', size=key_size//4),\n    txt_padding=(key_size//6, key_size//10)\n)\nletter_key_size = (key_size, key_size)  # width, height\nkeyboard_layout = klt.KeyboardLayout(\n    layout_name,\n    keyboard_info,\n    letter_key_size,\n    key_info,\n    master=window\n)\nwindow.mainloop()\n```\n\n## Local Installation\n```\n# make and activate virtual env\npython3 -m venv venv\nsource venv/bin/activate\n\n# if you want to edit the program and have the library use your edits\nmake develop\n\n# to install separately in your virtual environment\nmake install\n```\n\n## Test\n```\nmake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacether%2Fkeyboardlayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacether%2Fkeyboardlayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacether%2Fkeyboardlayout/lists"}