{"id":19212386,"url":"https://github.com/leafo/lua-uinput","last_synced_at":"2025-11-14T12:02:11.677Z","repository":{"id":16893465,"uuid":"19654196","full_name":"leafo/lua-uinput","owner":"leafo","description":"A Lua library for creating a virtual keyboard on Linux with uinput","archived":false,"fork":false,"pushed_at":"2014-05-19T17:01:28.000Z","size":158,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-04T17:29:26.483Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MoonScript","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/leafo.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}},"created_at":"2014-05-10T23:14:58.000Z","updated_at":"2023-11-06T05:34:04.000Z","dependencies_parsed_at":"2022-08-25T15:02:46.365Z","dependency_job_id":null,"html_url":"https://github.com/leafo/lua-uinput","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafo%2Flua-uinput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafo%2Flua-uinput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafo%2Flua-uinput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafo%2Flua-uinput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafo","download_url":"https://codeload.github.com/leafo/lua-uinput/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240286520,"owners_count":19777353,"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-09T13:46:44.776Z","updated_at":"2025-11-14T12:02:06.632Z","avatar_url":"https://github.com/leafo.png","language":"MoonScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lua-uinput\n\nLua bindings for uinput on Linux.\n\n## Install\n\n```bash\n$ luarocks install https://raw.githubusercontent.com/leafo/lua-uinput/master/uinput-dev-1.rockspec\n```\n\n## Example\n\n```lua\nlocal uinput = require(\"uinput\")\n\n-- luasocket is used for a sleep function\nlocal socket = require(\"socket\")\n\n-- create a virtual keyboard\nlocal keyboard = uinput.create_keyboard()\n\n-- we sleep after creating a keyboard before sending a key press to give X a\n-- chance to discover the keyboard. This is not required if your program naturally\n-- has some delay before key events are sent or you arent in X\nsocket.sleep(0.1)\n\n-- press the a key\nkeyboard:press(uinput.KEY_A)\n\n-- release the a key\nkeyboard:release(uinput.KEY_A)\n```\n\nMake sure `uinput` is loaded before running the script:\n\n```bash\n$ modprobe uinput\n```\n\nWhen running your script you'll have to use `sudo` unless you've changed the\npermissions on `/dev/uinput`\n\n\n## Key constants\n\nCan be found by printing the contents of the module:\n\n\n```lua\nfor key in pairs(require(\"uinput\")) do\n  if key:match(\"^KEY_\") then\n    print(key)\n  end\nend\n\n```\n\n\n# Contact\n\nAuthor: Leaf Corcoran (leafo) ([@moonscript](http://twitter.com/moonscript))  \nEmail: leafot@gmail.com  \nHomepage: \u003chttp://leafo.net\u003e  \n\n## License (MIT)\n\nCopyright (C) 2014 by Leaf Corcoran\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafo%2Flua-uinput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafo%2Flua-uinput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafo%2Flua-uinput/lists"}