{"id":19965918,"url":"https://github.com/stephen-fox/user32util","last_synced_at":"2025-06-22T22:39:14.846Z","repository":{"id":57551287,"uuid":"189499746","full_name":"stephen-fox/user32util","owner":"stephen-fox","description":"Package user32util provides helper functionality for working with Windows' user32 library.","archived":false,"fork":false,"pushed_at":"2024-03-02T20:04:51.000Z","size":58,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-19T19:59:25.330Z","etag":null,"topics":["golang","user-input","user32-dll","win32api","windows"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephen-fox.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}},"created_at":"2019-05-31T00:19:23.000Z","updated_at":"2025-03-02T21:09:17.000Z","dependencies_parsed_at":"2024-06-20T01:29:31.233Z","dependency_job_id":"61db5b78-c2d5-4367-931c-5a5b247c0fbf","html_url":"https://github.com/stephen-fox/user32util","commit_stats":null,"previous_names":["stephen-fox/winuserio"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/stephen-fox/user32util","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephen-fox%2Fuser32util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephen-fox%2Fuser32util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephen-fox%2Fuser32util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephen-fox%2Fuser32util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephen-fox","download_url":"https://codeload.github.com/stephen-fox/user32util/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephen-fox%2Fuser32util/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261380419,"owners_count":23149934,"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":["golang","user-input","user32-dll","win32api","windows"],"created_at":"2024-11-13T02:32:16.581Z","updated_at":"2025-06-22T22:39:09.813Z","avatar_url":"https://github.com/stephen-fox.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# user32util\n\n[![GoDoc][godoc-badge]][godoc]\n\n[godoc-badge]: https://pkg.go.dev/badge/github.com/stephen-fox/user32util\n[godoc]: https://pkg.go.dev/github.com/stephen-fox/user32util\n\nPackage user32util provides helper functionality for working with Windows'\nuser32 library.\n\n## APIs\nThe library offers several helper functions for working with user32.\n\nMany of these functions require that you first load the user32 DLL:\n```go\nuser32, err := user32util.LoadUser32DLL()\nif err != nil {\n\t// Error handling.\n}\n```\n\n#### Input listeners\n\n- `NewLowLevelMouseListener()` - Starts a listener that reports on mouse input\n- `NewLowLevelKeyboardListener()` - Starts a listener that reports on\nkeyboard input\n\n#### Send input\n\n- `SendKeydbInput()` - Sends a single keyboard input\n- `SendMouseInput()` - Sends a single mouse input\n- `SendInput()` - Send input implements the `SendInput()` Windows system call\n- `SendHardwareInput()` - Sends a single hardware input\n\n## Examples\nThe following examples can be found in the [examples/ directory](examples/):\n\n- [moveandclickmouse](examples/moveandclickmouse/main.go) - Moves the mouse\nand then left clicks on the new position. Takes inputs as command line\narguments in `x,y` format. E.g., `example 1221,244 460,892`. Coordinates\ncan be printed by running: `example print`\n- [readkeyboard](examples/readkeyboard/main.go) - Reads keyboard presses and\nprints them to stderr\n- [readmouse](examples/readmouse/main.go) - Reads mouse inputs and prints them\nto stderr\n- [sendinput](examples/sendinput/main.go) - Sends keyboard or mouse inputs\nto Windows\n\n## Special thanks\nThis library is influenced by jimmycliff obonyo's work in this GitHub gist:\nhttps://gist.github.com/obonyojimmy/52d836a1b31e2fc914d19a81bd2e0a1b\n\nThank you for documenting your work, jimmycliff.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephen-fox%2Fuser32util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephen-fox%2Fuser32util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephen-fox%2Fuser32util/lists"}