{"id":16399845,"url":"https://github.com/justinrubek/global-keybind","last_synced_at":"2026-04-16T18:40:31.418Z","repository":{"id":228128144,"uuid":"773211114","full_name":"justinrubek/global-keybind","owner":"justinrubek","description":"Use evdev to send a specific input event to X windows when using Wayland","archived":false,"fork":false,"pushed_at":"2024-03-17T21:23:02.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T01:41:54.533Z","etag":null,"topics":["evdev","flake","input","keybind","nix","nix-flake","rust","wayland","x11"],"latest_commit_sha":null,"homepage":"","language":"Nix","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/justinrubek.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-03-17T03:10:13.000Z","updated_at":"2024-03-25T23:01:49.000Z","dependencies_parsed_at":"2024-03-17T07:57:52.848Z","dependency_job_id":"bbe78b79-9667-4ac0-bc97-55df0d1621c1","html_url":"https://github.com/justinrubek/global-keybind","commit_stats":null,"previous_names":["justinrubek/global-keybind"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fglobal-keybind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fglobal-keybind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fglobal-keybind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fglobal-keybind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinrubek","download_url":"https://codeload.github.com/justinrubek/global-keybind/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240306528,"owners_count":19780639,"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":["evdev","flake","input","keybind","nix","nix-flake","rust","wayland","x11"],"created_at":"2024-10-11T05:25:56.021Z","updated_at":"2026-04-16T18:40:26.357Z","avatar_url":"https://github.com/justinrubek.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# global keybind\n\nThis can be useful when running a wayland compositor, as it allows you to send applications input without focusing them (or an xwayland window).\nFor example, you can use this to pass a push-to-talk keybind to a voice chat application.\n\n## usage\n\n### cli\n\nDetermine the event device for the input device you want to use.\nThis can be done by running `evtest` and looking for the device with the name of the input device you want to use.\nAlternatively, you can use `cat /proc/bus/input/devices` and look for the device with the name of the input device you want to use.\n\nYou will also need to determine the event code for the key you want to use.\nThis can be done by running `evtest`, selecting the device, then pressing the key you want to use.\nThe resulting code's value can be found from [the linux input-event-codes.h](https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h).\n\nHere is an example invocation of the program that will press F12 when the mouse side button is pressed: `global-keybind-cli --device /dev/input/event0 --key-to-press 275 --key-to-send F12`\n\n\n### home-manager\n\nA home-manager module is provided under the flake output `homeModules.global-keybind`.\nThis can be used to start a systemd user service that will run the program.\nHere is an example configuration that will press F12 when the mouse side button is pressed:\n\n```nix\nglobal-keybind = {\n  enable = true;\n  device = \"/dev/input/event5\";\n  display = \":1\";\n  key_to_press = 275;\n  key_to_send = \"F12\";\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinrubek%2Fglobal-keybind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinrubek%2Fglobal-keybind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinrubek%2Fglobal-keybind/lists"}