{"id":20863216,"url":"https://github.com/mysterypancake/gmod-binding","last_synced_at":"2025-06-26T12:31:36.851Z","repository":{"id":162571079,"uuid":"88481986","full_name":"MysteryPancake/GMod-Binding","owner":"MysteryPancake","description":"Button binding for Garry's Mod","archived":false,"fork":false,"pushed_at":"2019-03-07T04:59:20.000Z","size":21,"stargazers_count":18,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-13T00:39:38.281Z","etag":null,"topics":["addon","bind","binding","garry-mod","garrys-mod","garrysmod","garrysmod-addon","glua","gmod","gmod-lua","lua"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MysteryPancake.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":"2017-04-17T07:11:18.000Z","updated_at":"2025-01-04T11:08:45.000Z","dependencies_parsed_at":"2023-06-03T17:30:13.407Z","dependency_job_id":null,"html_url":"https://github.com/MysteryPancake/GMod-Binding","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MysteryPancake/GMod-Binding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysteryPancake%2FGMod-Binding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysteryPancake%2FGMod-Binding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysteryPancake%2FGMod-Binding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysteryPancake%2FGMod-Binding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MysteryPancake","download_url":"https://codeload.github.com/MysteryPancake/GMod-Binding/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysteryPancake%2FGMod-Binding/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262067889,"owners_count":23253692,"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":["addon","bind","binding","garry-mod","garrys-mod","garrysmod","garrysmod-addon","glua","gmod","gmod-lua","lua"],"created_at":"2024-11-18T05:28:06.289Z","updated_at":"2025-06-26T12:31:36.770Z","avatar_url":"https://github.com/MysteryPancake.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Garry's Mod Binding\nThis is a simple script that lets you create bindings for [keys](https://wiki.garrysmod.com/page/Enums/KEY), as well as [mouse](https://wiki.garrysmod.com/page/Enums/MOUSE) and [controller](https://wiki.garrysmod.com/page/Enums/JOYSTICK) buttons.  \nIt only works clientside, since on serverside you can use [the numpad library](http://wiki.garrysmod.com/page/Category:numpad).\n\nUse it for whatever you want, and have fun!\n\n## Example Usage\n### Adding a binding:\n```\nbind.Add( KEY_R, \"\u003cUNIQUE_NAME\u003e\", function()\n    notification.AddLegacy( \"This script works!\", NOTIFY_GENERIC, 2 )\nend )\n```\n### Adding a mouse binding:\n```\nbind.Add( MOUSE_LEFT, \"\u003cUNIQUE_NAME\u003e\", function()\n    notification.AddLegacy( \"Left clicked!\", NOTIFY_GENERIC, 2 )\nend )\n```\n### Removing a binding:\n```\nbind.Remove( KEY_R, \"\u003cUNIQUE_NAME\u003e\" )\n```\n### Printing all the bindings:\n```\nPrintTable( bind.GetTable() )\n```\n\n## Lite Version\nFor people who only want to bind a single key.\n```\nlocal FirstPressed = false\n\nhook.Add( \"Think\", \"CallBinding\", function()\n\tlocal cache = input.IsButtonDown( \u003cBUTTON\u003e )\n\tif cache and FirstPressed then\n\t\t\u003cCODE\u003e\n\tend\n\tFirstPressed = not cache\nend )\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysterypancake%2Fgmod-binding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmysterypancake%2Fgmod-binding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysterypancake%2Fgmod-binding/lists"}