{"id":15067234,"url":"https://github.com/hire-hoffee/keyboard-lang-switcher","last_synced_at":"2025-03-16T03:41:30.281Z","repository":{"id":257443716,"uuid":"857441545","full_name":"Hire-Hoffee/Keyboard-Lang-Switcher","owner":"Hire-Hoffee","description":"This Python script allows you to quickly convert the keyboard layout of selected text by double-pressing the certain key.","archived":false,"fork":false,"pushed_at":"2024-09-18T16:18:52.000Z","size":8911,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T16:23:04.424Z","etag":null,"topics":["caramba-switcher","gnome","keyboard","language","linux","puntoswitcher","shortcut","switcher","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hire-Hoffee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-14T17:06:06.000Z","updated_at":"2024-09-18T16:18:55.000Z","dependencies_parsed_at":"2024-09-16T20:14:15.215Z","dependency_job_id":"cf95526f-48b1-474f-8952-cd058b975168","html_url":"https://github.com/Hire-Hoffee/Keyboard-Lang-Switcher","commit_stats":null,"previous_names":["hire-hoffee/keyboard-lang-switcher"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hire-Hoffee%2FKeyboard-Lang-Switcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hire-Hoffee%2FKeyboard-Lang-Switcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hire-Hoffee%2FKeyboard-Lang-Switcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hire-Hoffee%2FKeyboard-Lang-Switcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hire-Hoffee","download_url":"https://codeload.github.com/Hire-Hoffee/Keyboard-Lang-Switcher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822308,"owners_count":20353499,"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":["caramba-switcher","gnome","keyboard","language","linux","puntoswitcher","shortcut","switcher","ubuntu"],"created_at":"2024-09-25T01:18:24.274Z","updated_at":"2025-03-16T03:41:30.261Z","avatar_url":"https://github.com/Hire-Hoffee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keyboard Layout Text Converter for Linux\n\nThis Python script allows you to quickly convert the keyboard layout of selected text by double-pressing the Shift key. For example, if you have text typed in Russian and you need to quickly convert it to English, you can select the text and double-press Shift.\n\n(You need to use GNOME environment for this script to work)\n\n## Features\n\n- Converts text between two specified keyboard layouts.\n- Uses a customizable dictionary for accurate character mapping.\n- Supports customizable double press interval and hotkey.\n- Clears the clipboard after pasting the converted text.\n\n## Installation\n\n1. Clone the repository or download the source code.\n2. (Optional: Create and activate virtual environment with `python3 -m venv venv` and `source venv/bin/activate` commands)\n3. Install the required libraries using pip `pip install -r requirements.txt`.\n4. Optional: update the `src/settings/settings.py` file with your desired settings.\n5. Optional: update a file `src/settings/dictionary.py` with your language. This file should contain a dictionary mapping characters between the two keyboard layouts.\n\n## Usage\n\n1. Run the `python3 src/index.py` command (you can run the script on the background by `nohup python3 src/index.py \u0026`).\n2. Select the text you want to convert (if not selected, the last typed word will be converted).\n3. Double-press the `Shift` key (or your configured hotkey).\n4. The converted text will be pasted in place of the selected text.\n\n## How it Works\n\nThe script uses the `pynput` library to listen for keyboard events. When a double press of the specified key is detected, it copies the selected text to the clipboard, converts it using the character mapping dictionary, and pastes the converted text back. The `pyperclip` library is used for clipboard operations.\n\n## Additionally\n\n- If you use virtual environment and script do not run, you can try this command `./venv/bin/python src/index.py`.\n- Maybe you need to install additional apt packages (check your terminal).\n- You can create standalone executable with `pyinstaller -F -n=KeyboardLangSwitcher src/index.py` command. File will be located on dist directory.\n- You can add script or standalone binary as a startup application\n\n  1. Open Startup Applications app\n  2. Add name, command to start and description of the application\n  3. Restart the system\n\n  ![Example](https://i.imgur.com/YX9Mntg.png \"Example of filling in the settings\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhire-hoffee%2Fkeyboard-lang-switcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhire-hoffee%2Fkeyboard-lang-switcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhire-hoffee%2Fkeyboard-lang-switcher/lists"}