{"id":48048207,"url":"https://github.com/nhmkdev/keycap","last_synced_at":"2026-04-20T02:01:13.279Z","repository":{"id":59869824,"uuid":"62103858","full_name":"nhmkdev/KeyCap","owner":"nhmkdev","description":"A Windows application for remapping keyboard input.","archived":false,"fork":false,"pushed_at":"2026-04-20T00:03:04.000Z","size":822,"stargazers_count":53,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-04-20T01:32:40.131Z","etag":null,"topics":["accessibility","capture-keyboard","keyboard","keyboard-shortcuts","keycaps","keystrokes","mouse","mouse-emulation","mouse-events","remap","remapping","remapping-keyboards","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","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/nhmkdev.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":"Support/IO/INIManager.cs","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":"2016-06-28T02:35:14.000Z","updated_at":"2026-04-19T23:54:35.000Z","dependencies_parsed_at":"2024-02-03T22:27:11.428Z","dependency_job_id":"7d243d8b-2737-4e69-b71f-ff113ec27660","html_url":"https://github.com/nhmkdev/KeyCap","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/nhmkdev/KeyCap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhmkdev%2FKeyCap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhmkdev%2FKeyCap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhmkdev%2FKeyCap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhmkdev%2FKeyCap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nhmkdev","download_url":"https://codeload.github.com/nhmkdev/KeyCap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhmkdev%2FKeyCap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32029857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["accessibility","capture-keyboard","keyboard","keyboard-shortcuts","keycaps","keystrokes","mouse","mouse-emulation","mouse-events","remap","remapping","remapping-keyboards","windows"],"created_at":"2026-04-04T14:19:23.281Z","updated_at":"2026-04-20T02:01:13.273Z","avatar_url":"https://github.com/nhmkdev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KeyCap\n\nDownload the [Latest Release](https://github.com/nhmkdev/KeyCap/releases/latest)\n\n## Description\n*Windows only* application for capturing keyboard input and remapping it to:\n* another key or sequence of keys\n* mouse input\n* nothing at all\n* on/off toggles for keys and inputs (this allows a single keystroke to initiate a hold and a second keystroke to end the hold)\n* Repetition (with custom delay)\n\n## Example Uses\n* (original inspiration) Shortcutting a sequence of shortcuts. I originally created the application long ago to help with a sequence of keyboard shortcuts necessary to perform file merges when integrating a branch with [Perforce](https://www.perforce.com/) + [Araxis Merge](https://www.araxis.com/)\n* [Starbound](http://playstarbound.com/) Keyboard shortcuts to toggle off/on mouse buttons. This makes extensive mining in the game a lot less painful. [Mass Effect 2](http://masseffect.bioware.com/me2/) planet scanning also can be a lot easier...\n* [Dreamfall Chapters](http://redthreadgames.com/games/chapters/) has a run button though it can be nice to have a button that toggles whether you are running or not instead of holding one down.\n* [Citadel: Forged With Fire](https://www.citadelthegame.com/) has a number of long mouse hold actions. Toggling this off/on instead of holding the button for long periods of time is extremely nice.\n\n## Run on Startup\n\nWith Registry Editor, add a new StringValue to `HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run` with the full path to `KeyCap.exe` followed by the full path to your `.kfg` file.  KeyCap will load the config file, start it and then minimize to the tray.\n\nAlternatively, copy the following to a text file named `KeyCap.reg` and then edit it to match your setup.  Save it, right click-it and selct **Merge**.  Follow the prompts and then the next time you reboot, KeyCap will start automatically.\n\n```regedit\nWindows Registry Editor Version 5.00\n\n[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run]\n\"KeyCap\"=\"D:\\\\Util\\\\KeyCap\\\\KeyCap.exe -f D:\\\\Util\\\\KeyCap\\\\Config.kfg\"\n```\n\nYou can also include the `-autostart` argument if you wish to immediately start capturing keys with the loaded config.\n\n## Warning\nThis program does perform keyboard capture and is essentially the first component of a key logger. I humbly request you NOT use the information included in the source code to create a malicious application.\n\n## Visual Studio Notes\n* If you attempt to run from Visual Studio you will need to make sure the C# project is configured with *Enable Native Code Debugging*. If this is not enabled the dll will not create the necessary keyboard hook (works fine outside of Visual Studio). This was observed in every Visual Studio version up-to and including 2015.\n\n## Technical Documentation\n\n### Library File Naming and Organization\n\n* configfile - files related to reading the .kfg file format\n* inputproc - files related to interpreting key inputs\n* inputsender - files related to sending key inputs (remapped from those cpatured in inputproc)\n* keycap - entry point and general functionality\n\n### .kfg File Format\n\nThe file is prefixed with two 32-bit ints:\n\n| File Data Prefix | File Format Version |\n| --- | --- |\n| 0x0E0CA000 | 0x1\n\nThe remainder of the file is a repeated sequence of the following information. One input may be associated with numerous outputs.\n\nByte array representation of each input/output(s) pair:\n\n`(#)` is the number of bytes the given information is alloted.\n\n**Input Bytes**\n| Input Flags (4) | Input VirtualKey (1) | Padding (3) | Parameter (4) | Outputs Count (1) | Padding (3) | (all outputs for input) |\n| --- | --- | --- | --- | --- | --- | --- |\n\n**Output Bytes**\n| Output Flags (4) | Output VirtualKey (1) | Padding (3) | Output Parameter (4) |\n| --- | --- | --- | --- |\n\nThere is no count for the number of inputs. Instead the file is read until no further input/output(s) pairings can be read.\n\n#### Flags\n\nThe flags indicate information that modifies the value (alt/shift/ctrl and special functionality when mapping to another output)\n\n#### VirtualKey\n\nA [VirtualKey](https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) value.\n\n#### Parameter\n\nA special value associated with the input/output (as necessary based on the function).\n\n#### Output Count\n\nThis is limited to a single byte despite the use of an int, so 255 maximum.\n\n## History\n\nUsed to be called Key2Key but then I added mouse support so that name needed to change.\n\n## Disclaimer\n\nI am providing code in the repository to you under an open source license. Because this is my personal repository, the license you receive to my code is from me and not my employer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhmkdev%2Fkeycap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhmkdev%2Fkeycap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhmkdev%2Fkeycap/lists"}