{"id":19495439,"url":"https://github.com/guilhe/keyboardstateevents","last_synced_at":"2026-03-04T16:01:39.387Z","repository":{"id":53983882,"uuid":"252266418","full_name":"GuilhE/KeyboardStateEvents","owner":"GuilhE","description":"LiveData notification when keyboard opens or closes, plus some handy extension functions","archived":false,"fork":false,"pushed_at":"2022-08-29T17:15:57.000Z","size":924,"stargazers_count":150,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-14T22:17:49.492Z","etag":null,"topics":["android","androidx","keyboard","kotlin","lifecycle","livedata"],"latest_commit_sha":null,"homepage":"https://guilhe.github.io/KeyboardStateEvents/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GuilhE.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://www.buymeacoffee.com/GuilhE"}},"created_at":"2020-04-01T19:19:55.000Z","updated_at":"2025-09-06T20:58:30.000Z","dependencies_parsed_at":"2022-08-13T05:40:51.949Z","dependency_job_id":null,"html_url":"https://github.com/GuilhE/KeyboardStateEvents","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/GuilhE/KeyboardStateEvents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhE%2FKeyboardStateEvents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhE%2FKeyboardStateEvents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhE%2FKeyboardStateEvents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhE%2FKeyboardStateEvents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuilhE","download_url":"https://codeload.github.com/GuilhE/KeyboardStateEvents/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhE%2FKeyboardStateEvents/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30085805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["android","androidx","keyboard","kotlin","lifecycle","livedata"],"created_at":"2024-11-10T21:37:44.737Z","updated_at":"2026-03-04T16:01:39.331Z","avatar_url":"https://github.com/GuilhE.png","language":"Kotlin","funding_links":["https://www.buymeacoffee.com/GuilhE"],"categories":[],"sub_categories":[],"readme":"# KeyboardStateEvents\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-KeyboardStateEvents-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/8092)\n\nGet notified through LiveData when Keyboard is open or closed\n\n## Installation\n\nKeyboardStateEvents is distributed through [Maven Central](https://search.maven.org/artifact/com.github.guilhe/keyboard-state-events) and [Jitpack](https://jitpack.io/#GuilhE/KeyboardStateEvents).\n\n```groovy\nimplementation 'com.github.guilhe:keyboard-state-events:${LATEST_VERSION}'\n```\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.guilhe/keyboard-state-events.svg)](https://search.maven.org/search?q=g:com.github.guilhe%20AND%20keyboard-state-events)\n## Usage\n\nCall `bindKeyboardStateEvents()` in you `AppCompatActivity` or `FragmentActivity` and observe `KeyboardStateLiveData.state` to get notified:\n```java\nclass MainActivity : AppCompatActivity() {\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        ...\n        KeyboardStateLiveData.state.observe(this, Observer {...})\n        bindKeyboardStateEvents()\n    }\n}\n```\nJust that and you're done! 😎\n\nAlso, some handy extension functions:  \n```java\nComponentActivity.toggleKeyboard()\nComponentActivity.dismissKeyboard()\nComponentActivity.isKeyboardOpen()\nViewGroup.isKeyboardOpen()\n```\n\n\u003cimg src=\"media/sample.gif\" alt=\"Sample\"/\u003e\n    \n## Dependencies\n- [androidx.lifecycle:lifecycle-livedata-ktx](https://developer.android.com/jetpack/androidx/releases/lifecycle)\n- [androidx.activity:activity-ktx](https://developer.android.com/jetpack/androidx/releases/activity)\n\n\n## Bugs and Feedback\n\nFor bugs, questions and discussions please use the [Github Issues](https://github.com/GuilhE/KeyboardStateEvents/issues).\n\n## LICENSE\n\nCopyright (c) 2020-present GuilhE\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilhe%2Fkeyboardstateevents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguilhe%2Fkeyboardstateevents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilhe%2Fkeyboardstateevents/lists"}