{"id":16188726,"url":"https://github.com/yurenchen000/keyevent","last_synced_at":"2025-06-12T04:07:20.122Z","repository":{"id":85338324,"uuid":"322718885","full_name":"yurenchen000/keyevent","owner":"yurenchen000","description":"a tool detect (at background, ubuntu) keyevent \u0026 run cmd //virtualbox switch workspace even in virtual machine, without host key","archived":false,"fork":false,"pushed_at":"2021-03-31T00:30:59.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T15:12:06.065Z","etag":null,"topics":["ubuntu","utils","virtualbox"],"latest_commit_sha":null,"homepage":"","language":"C","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/yurenchen000.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":"2020-12-18T22:32:21.000Z","updated_at":"2022-11-22T17:10:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"c34443b5-b8ae-46d3-a2fb-cab98557dc9f","html_url":"https://github.com/yurenchen000/keyevent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurenchen000%2Fkeyevent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurenchen000%2Fkeyevent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurenchen000%2Fkeyevent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurenchen000%2Fkeyevent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yurenchen000","download_url":"https://codeload.github.com/yurenchen000/keyevent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247665692,"owners_count":20975782,"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":["ubuntu","utils","virtualbox"],"created_at":"2024-10-10T07:30:21.658Z","updated_at":"2025-04-07T13:42:37.838Z","avatar_url":"https://github.com/yurenchen000.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keyevent @ubuntu\na tool detect (at background, ubuntu) keyevent \u0026amp; run cmd. \n\n\n\non ubuntu  \n when vbox get focus, can't use `Ctrl+Alt+Left` to switch workspace.\n\n\nthis daemon tool, as one workaround:\n\n- detect keyevent, then:\n  - run cmd to switch workspace // depend `xdotool`\n\nref:\nhttps://superuser.com/questions/108785/getting-host-to-capture-certain-key-presses-in-virtualbox/1611071\n\n## 1. choice eventX\nls -lh /dev/input/event*\n\n//a. use `evtest`\n```sh\nsudo evtest\n```\n\n~~//b. use `xinput`~~ // it has different device num , not need root (through x input)\n```sh\nxinput list \n# not need root\nxinput test 18\n```\n//b. use `scan.sh`\n\na script to scan all event*\n```sh\nsudo ./scan.sh\n```\n`Ctrl+C` or `Enter` to exit.\n\n// assume input device is `/dev/input/event18`\n\n## 2. run keyevent\n\n```sh\nsudo ./keyevent /dev/input/event18\n```\n\n## 3. run background\n```sh\n# start\nINPUT=/dev/input/event18 ./key-vbox.sh start\n\n# stop\nkey-vbox.sh stop\n```\n\n## X. use scan_run.sh\n\nthis script do step `1.` \u0026 `3.` works in one step automatically.\n\n\n----\n\n## note: get key event on ubuntu\n\n Get key event on host ubuntu at low-level  \n   // use tools such as `showkey`, `evtest`, or `getevent`\n\n - `evtest`, `getevent` (should specify input device),  \n    // depend on **/dev/input/eventX**, need root\n - `showkey` not depend on input device (all keyboard are same),  \n    // depend on **/dev/console**, need root\n - `xinput test` (should specify device, not same with /dev/input/eventX)  \n    // depend on **X system**, not need root\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurenchen000%2Fkeyevent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyurenchen000%2Fkeyevent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurenchen000%2Fkeyevent/lists"}