{"id":17520593,"url":"https://github.com/oxzi/go-xinput","last_synced_at":"2025-03-28T23:25:08.061Z","repository":{"id":57531889,"uuid":"277824836","full_name":"oxzi/go-xinput","owner":"oxzi","description":"Go library for limited X.Org XInput interaction","archived":false,"fork":false,"pushed_at":"2020-10-31T17:02:09.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T18:06:08.702Z","etag":null,"topics":["golang","xinput","xorg"],"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/oxzi.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}},"created_at":"2020-07-07T13:31:08.000Z","updated_at":"2024-06-21T18:06:08.702Z","dependencies_parsed_at":"2022-09-06T23:11:44.269Z","dependency_job_id":null,"html_url":"https://github.com/oxzi/go-xinput","commit_stats":null,"previous_names":["geistesk/go-xinput"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxzi%2Fgo-xinput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxzi%2Fgo-xinput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxzi%2Fgo-xinput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxzi%2Fgo-xinput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxzi","download_url":"https://codeload.github.com/oxzi/go-xinput/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246113882,"owners_count":20725539,"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","xinput","xorg"],"created_at":"2024-10-20T11:24:00.265Z","updated_at":"2025-03-28T23:25:08.041Z","avatar_url":"https://github.com/oxzi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-xinput\n\n[![GoDoc](https://godoc.org/github.com/oxzi/go-xinput?status.svg)](https://godoc.org/github.com/oxzi/go-xinput) ![CI](https://github.com/oxzi/go-xinput/workflows/CI/badge.svg)\n\nSmall [Go][golang] library for limited interaction with the [X Input Device Extension Library][xorg-xinput] (`\u003cX11/extensions/XInput.h\u003e`).\nThis allows listing input devices and listening for events, e.g., pressing keys.\n\n\n## Examples\n\n### xinput-list\n\nReimplementation of [`xinput list`][xinput].\n\n```\n$ go run examples/xinput-list/main.go\nVirtual core pointer                            id=2    [master pointer]\nVirtual core keyboard                           id=3    [master keyboard]\nVirtual core XTEST pointer                      id=4    [slave pointer]\nVirtual core XTEST keyboard                     id=5    [slave keyboard]\nPower Button                                    id=6    [slave keyboard]\nVideo Bus                                       id=7    [slave keyboard]\nSleep Button                                    id=8    [slave keyboard]\nIntegrated Camera: Integrated C                 id=10   [slave keyboard]\nAT Translated Set 2 keyboard                    id=11   [slave keyboard]\nTPPS/2 IBM TrackPoint                           id=13   [slave pointer]\nThinkPad Extra Buttons                          id=14   [slave keyboard]\nFiiO DigiHug USB Audio                          id=9    [slave keyboard]\nSynPS/2 Synaptics TouchPad                      id=12   [slave pointer]\n```\n\n\n### keylogger\n\nShow key, button, or motion events from an input device.\nCompared to other Go-based Linux _keyloggers_ this does not require extended permissions.\n\n```\n# Keyboard from the list above\n$ go run examples/keylogger/main.go 11\n{key press 37 map[]}\n{key release 37 map[]}\n{key press 37 map[]}\n{key press 56 map[]}\n{key release 37 map[]}\n{key release 56 map[]}\n{key press 45 map[]}\n\n# Mouse from the list above\n$ go run examples/keylogger/main.go 13\n{motion 0 map[0:2299 1:866]}\n{motion 0 map[0:2300 1:865]}\n{motion 0 map[0:2300 1:864]}\n{motion 0 map[0:2304 1:861]}\n{motion 0 map[0:2305 1:859]}\n{motion 0 map[1:857]}\n{motion 0 map[1:856]}\n{button press 1 map[]}\n{button release 1 map[]}\n{motion 0 map[1:856]}\n```\n\n\n[golang]: https://golang.org/\n[xinput]: https://gitlab.freedesktop.org/xorg/app/xinput/\n[xorg-xinput]: https://www.x.org/releases/X11R7.7/doc/libXi/inputlib.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxzi%2Fgo-xinput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxzi%2Fgo-xinput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxzi%2Fgo-xinput/lists"}