{"id":20266348,"url":"https://github.com/prabdhal/onscreenkeyboard-for-unity","last_synced_at":"2025-03-03T22:09:07.900Z","repository":{"id":262725234,"uuid":"888157846","full_name":"prabdhal/OnScreenKeyboard-for-Unity","owner":"prabdhal","description":"This asset offers a complete on-screen keyboard solution for Unity, ideal for use with TextMesh Pro’s TMP_InputField. Users can type and interact with text fields through an on-screen keyboard, compatible with gamepad, VR, and touch inputs. Designed for platforms where a physical keyboard isn’t feasible, such as mobile or VR.","archived":false,"fork":false,"pushed_at":"2024-11-15T14:16:04.000Z","size":1393,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T22:09:04.202Z","etag":null,"topics":["gui","keyboard","tool","unity3d","unityasset"],"latest_commit_sha":null,"homepage":"https://assetstore.unity.com/packages/slug/302517","language":"ShaderLab","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/prabdhal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-11-13T23:07:11.000Z","updated_at":"2025-01-31T20:59:30.000Z","dependencies_parsed_at":"2024-11-14T00:18:55.211Z","dependency_job_id":"ed7e8bab-acd4-4329-99e1-7491c15b4586","html_url":"https://github.com/prabdhal/OnScreenKeyboard-for-Unity","commit_stats":null,"previous_names":["prabdhal/onscreenkeyboard-for-unity"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabdhal%2FOnScreenKeyboard-for-Unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabdhal%2FOnScreenKeyboard-for-Unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabdhal%2FOnScreenKeyboard-for-Unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabdhal%2FOnScreenKeyboard-for-Unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prabdhal","download_url":"https://codeload.github.com/prabdhal/OnScreenKeyboard-for-Unity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241746795,"owners_count":20013165,"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":["gui","keyboard","tool","unity3d","unityasset"],"created_at":"2024-11-14T12:08:48.690Z","updated_at":"2025-03-03T22:09:07.876Z","avatar_url":"https://github.com/prabdhal.png","language":"ShaderLab","readme":"# On-Screen Keyboard for Unity\n\n## Overview\nThis asset offers a complete on-screen keyboard solution for Unity, ideal for use with TextMesh Pro’s `TMP_InputField`. Users can type and interact with text fields through an on-screen keyboard, compatible with gamepad, VR, and touch inputs. Designed for platforms where a physical keyboard isn’t feasible, such as mobile or VR.\n\n## Features\n- **Gamepad Support**: Type and navigate the keyboard with a gamepad.\n- **Shift \u0026 Caps Lock**: Switch between upper and lowercase letters.\n- **Primary \u0026 Secondary Keys**: Keys support both primary (e.g., lowercase) and secondary (uppercase/symbol) characters.\n- **Simple Setup**: Drag-and-drop prefabs with easy-to-use components.\n- **Customizable Colors**: Adjust colors for selected keys and input fields.\n- **Responsive Input Fields**: Automatically displays the keyboard when an input field is selected.\n- **Direct Integration**: Designed specifically for `TMP_InputField`.\n- **Prefabs Included**: Ready-to-use keyboard, input field containers, and demo scenes.\n- **New Input System Compatible**: Utilizes Unity's Input System with custom actions for select and deselect.\n\n---\n\n## Asset Components\n\n### Scripts\n- **OnScreenKeyboard.cs**: Manages key presses, shift toggling, and keyboard visibility.\n- **ManagedInputField.cs**: Controls interaction between `TMP_InputField` and the keyboard.\n- **Key.cs**: Defines individual keys with primary and secondary character support.\n\n### Prefabs\n- **OnScreenKeyboard Prefab**: Keyboard UI to place within the Canvas, typically at the bottom.\n- **InputFieldContainer Prefab**: Test container for `TMP_InputField` interactions.\n- **TestPage Prefab**: A demo scene with the keyboard and input fields pre-configured for testing.\n\n### Demo Folder\nContains the `TestPage` scene, set up for quick testing of keyboard functionality.\n\n---\n\n## Setup Instructions\n\n### 1. Scene Setup\n1. **Add OnScreenKeyboard Prefab**: \n   - Drag into the Canvas and position at the bottom.\n   - Ensure it overlays other UI elements.\n2. **Add Input Fields**: \n   - Attach `ManagedInputField` to each `TMP_InputField`.\n3. **Use InputFieldContainer** (optional): \n   - Add this prefab to test keyboard and input field interactions.\n4. **TestPage Scene**: \n   - Open for a ready-to-use example setup.\n\n---\n\n### 2. Script Configuration\n\n- **OnScreenKeyboard.cs**: Configure key array and assign optional Shift/Caps Lock buttons.\n- **ManagedInputField.cs**: Handles keyboard visibility and input field interactions.\n- **Key.cs**: Set `primaryValue` and `secondaryValue` for each key to enable dynamic character swapping.\n\n---\n\n### 3. Input System Configuration\n**Unity’s Input System** is required. Install and configure if not already included.\n\n#### Option 1: Drag and Drop\n- Use the provided InputActions asset, located in the scripts folder, and assign it to the \"Actions Asset\" in the EventSystem GameObject.\n\n#### Option 2: Adding Custom Input Actions\n1. **Submit Action**:\n   - Binds gamepad Button South (A button).\n2. **Select Action**:\n   - Binds gamepad Button South (A button).\n3. **Deselect Action**:\n   - Binds gamepad Button East (B button).\n\n---\n\n## Additional Customization Options\n\n- **Button Customization**: Modify key values (`primaryValue` and `secondaryValue`) in `Key.cs`.\n- **Keyboard Position \u0026 Size**: Adjust the RectTransform of the `OnScreenKeyboard` prefab as needed.\n\n---\n\n## Example Scene Setup\n\n1. **Import Input System \u0026 TextMeshPro**:\n   - Install via Package Manager.\n2. **Create Canvas \u0026 Add EventSystem**:\n   - Ensure an EventSystem GameObject is present in the scene.\n3. **Position Keyboard**:\n   - Place `OnScreenKeyboard` prefab in the Canvas at the bottom of the UI hierarchy.\n4. **Add TMP_InputField**:\n   - Attach `ManagedInputField` to `TMP_InputField`.\n5. **Test in Scene**:\n   - Enter Play Mode and test with gamepad input.\n\n---\n\n## License\nThis asset is available on the Unity Asset Store. It’s free for use in personal and commercial projects. Modify freely to fit your project’s needs.\n\n---\n\n**Get Started Today!**  \nQuickly add a gamepad-friendly, customizable keyboard to your Unity project. Perfect for VR, mobile, and other keyboard-less platforms.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprabdhal%2Fonscreenkeyboard-for-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprabdhal%2Fonscreenkeyboard-for-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprabdhal%2Fonscreenkeyboard-for-unity/lists"}