{"id":25986815,"url":"https://github.com/xz-dev/numlockw","last_synced_at":"2026-01-20T03:09:31.107Z","repository":{"id":249465816,"uuid":"831595736","full_name":"xz-dev/numlockw","owner":"xz-dev","description":"Control the state of NumLock","archived":false,"fork":false,"pushed_at":"2026-01-11T17:24:58.000Z","size":58,"stargazers_count":12,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T17:53:36.340Z","etag":null,"topics":["evdev","keyboard","tty","uinput","wayland"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/numlockw","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xz-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-21T03:29:41.000Z","updated_at":"2026-01-11T14:48:58.000Z","dependencies_parsed_at":"2024-08-20T17:54:46.145Z","dependency_job_id":"fbed2375-4e50-44b3-ad40-93223312f99f","html_url":"https://github.com/xz-dev/numlockw","commit_stats":null,"previous_names":["xz-dev/numlockw"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/xz-dev/numlockw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xz-dev%2Fnumlockw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xz-dev%2Fnumlockw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xz-dev%2Fnumlockw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xz-dev%2Fnumlockw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xz-dev","download_url":"https://codeload.github.com/xz-dev/numlockw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xz-dev%2Fnumlockw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28594958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"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":["evdev","keyboard","tty","uinput","wayland"],"created_at":"2025-03-05T12:33:20.888Z","updated_at":"2026-01-20T03:09:31.100Z","avatar_url":"https://github.com/xz-dev.png","language":"Python","readme":"# NumLockW\n\nA Wayland Clone of `numlockx`\n\n## Debug\n\nEnable debug mode via environment variable to see detailed logs for troubleshooting:\n\n```sh\nNUMLOCKW_DEBUG=1 numlockw on\n```\n\n## Install\n\nTo install `numlockw`, use the following commands:\n\n```sh\nsudo usermod -a -G plugdev $USER  # For Arch users: Refer to https://wiki.archlinux.org/title/Udev#Allowing_regular_users_to_use_devices\npipx install numlockw # or pipx install git+https://github.com/xz-dev/numlockw.git\n```\n\nYou can then check the available commands with:\n\n```sh\nnumlockw --help\n```\n\nAnd simply run:\n```sh\nnumlockw on\n```\n\nExample output:\n\n```\nusage: numlockw [-h] [--device-name DEVICE_NAME] [--no-fake-uinput]\n                [--pre-hook PRE_HOOK] [--force-led] [--wait-dev]\n                {on,off,toggle,status,list-devices} ...\n\nnumlockw is a program to control the NumLock key, designed for use with\nWayland and tty environments.\n\noptions:\n  -h, --help            show this help message and exit\n  --device-name, --dev DEVICE_NAME\n                        The name of the input device or \"*\" for each one. If\n                        not provided, will fake keyboard to enable NumLock,\n                        and enable LDE_NUML on all devices that support it.\n  --no-fake-uinput      Do not fake uinput device, use real devices\n  --pre-hook PRE_HOOK   A command to run when NumLock is toggled. The command\n                        will be run with the status of uinput device name\n                        ${{udevice}}.\n  --force-led           Force setting LED_NUML on all devices that support it,\n                        not dependent system to set it.\n  --wait-dev            Wait indefinitely for the device specified by\n                        --device-name to become available. Useful in init\n                        scripts where devices may not be ready yet.\n\nactions:\n  valid actions\n\n  {on,off,toggle,status,list-devices}\n                        action to perform on NumLock\n    on                  Turn NumLock on\n    off                 Turn NumLock off\n    toggle              Toggle NumLock\n    status              Display NumLock status\n    list-devices        List devices that support NumLock\n```\n\n## Use Notes\n\n1. Sometimes, you might need some operation before \"Click\" NumLock. You can try --pre-hook\n\n```sh\nnumlockw --pre-hook 'echo ${{udevice}}' on  # Print uinput (Fake keyboard) device name\n```\n\n2. Choice exist(real) keyboard to \"Click\" NumLock:\n```sh\nnumlockw --device-name 'AT Translated Set 2 keyboard' on\n```\n\n3. If you want to **Force** enable/disable LED with switch NumLock by some reason:\n\n```sh\nnumlockw list-devices\nnumlockw --device-name 'AT Translated Set 2 keyboard' --force-led on  # Only for 'AT Translated Set 2 keyboard'\n```\n\n## Background\n\n### Why create it?\n\n- **River**: Does not enable Num Lock at boot.\n- `numlockx` is not available for Wayland.\n\n### Why not use the wlroots protocol?\n\n- The functionality of the protocol depends on its implementation by the compositor.\n\n### Why should it work?\n\nRefer to the [Activating NumLock on Bootup - ArchWiki](https://wiki.archlinux.org/title/Activating_numlock_on_bootup) for background information.\n\n## Issues\n\n1. **Sync status on LED and actual state**:\n   - The method described [here](https://stackoverflow.com/questions/13129804/python-how-to-get-current-keylock-status) seems problematic, but no better solution was found.\n\n2. **Is it working?** (welcome add more):\n   - I have tested `NumLockW` on TTY, KDE (Wayland) and Hyprland, and everything is working fine.\n   - **Qtile**: Work. Confirmed by user ([issue #3](https://github.com/xz-dev/numlockw/issues/3)).\n   - However, there are some issues that require attention from the compositor developers:\n     - **River**: Work. Recommend select an exist devices. **[Issue](https://codeberg.org/river/river/issues/1120) of River**: Add all your keyboards to a keyboard group in `~/.config/river/init`, like:\n       ```sh\n       \u003e riverctl list-inputs\n\n        keyboard-13364-832-Keychron_Keychron_V4\n\t        configured: false\n\n        keyboard-1-1-AT_Translated_Set_2_keyboard\n\t        configured: false\n\n        keyboard-0-0-wlr_virtual_keyboard_v1\n\t        configured: false\n       \u003e riverctl keyboard-group-create default\n       \u003e riverctl keyboard-group-add default 'keyboard-1-1-AT_Translated_Set_2_keyboard'\n       \u003e riverctl keyboard-group-add default 'keyboard-13364-832-Keychron_Keychron_V4'\n       ```\n       Then:\n       ```sh\n       numlockw --device-name 'AT Translated Set 2 keyboard' on\n       ```\n     - **GNOME**: Work. But you must choice an exist keyboard, like: `numlockw --device-name 'AT Translated Set 2 keyboard' on`\n\n3. Set udev rules for Debian ([issues #2](https://github.com/xz-dev/numlockw/issues/2#issuecomment-3148567049)):\n   - Add file `/etc/udev/rules.d/10-uinput.rules`\n     ```\n     KERNEL==\"uinput\", SUBSYSTEM==\"misc\", OPTIONS+=\"static_node=uinput\", TAG+=\"uaccess\", GROUP=\"input\", MODE=\"0660\"\n     ```\n   - Then reboot\n\n## Contributing\n\nWe warmly welcome contributions from the community. If you find any bugs or have suggestions for improvements, please feel free to [open an issue](https://github.com/xz-dev/numlockw/issues/new/choose).\n\nYou're also encouraged to submit pull requests to help make this project better. If you find this project useful, please consider giving it a :star: to show your support!\n\nThank you for your interest and contributions! :heart:\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxz-dev%2Fnumlockw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxz-dev%2Fnumlockw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxz-dev%2Fnumlockw/lists"}