{"id":30207629,"url":"https://github.com/nstechbytes/keycodeinfo","last_synced_at":"2025-08-24T15:16:24.254Z","repository":{"id":283817663,"uuid":"944353319","full_name":"NSTechBytes/KeyCodeInfo","owner":"NSTechBytes","description":"KeyCodeInfo is a Rainmeter plugin written in C# that captures keyboard events and displays key information in various formats.","archived":false,"fork":false,"pushed_at":"2025-03-22T10:57:16.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-13T16:26:33.570Z","etag":null,"topics":["csharp","dll","keycode-info","rainmeter-plugin","rainmeter-skin","skins"],"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/NSTechBytes.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":"2025-03-07T07:45:42.000Z","updated_at":"2025-04-23T11:43:44.000Z","dependencies_parsed_at":"2025-03-22T11:42:43.236Z","dependency_job_id":null,"html_url":"https://github.com/NSTechBytes/KeyCodeInfo","commit_stats":null,"previous_names":["nstechbytes/keycodeinfo"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/NSTechBytes/KeyCodeInfo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSTechBytes%2FKeyCodeInfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSTechBytes%2FKeyCodeInfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSTechBytes%2FKeyCodeInfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSTechBytes%2FKeyCodeInfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NSTechBytes","download_url":"https://codeload.github.com/NSTechBytes/KeyCodeInfo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSTechBytes%2FKeyCodeInfo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271895386,"owners_count":24840093,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"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":["csharp","dll","keycode-info","rainmeter-plugin","rainmeter-skin","skins"],"created_at":"2025-08-13T16:11:59.755Z","updated_at":"2025-08-24T15:16:24.245Z","avatar_url":"https://github.com/NSTechBytes.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KeyCodeInfo Plugin\n\n**KeyCodeInfo** is a Rainmeter plugin written in C# that captures keyboard events and displays key information in various formats. It supports multiple output modes such as:\n\n- **Decimal Mode (ShowCode=1):** Displays the key code as a decimal number.\n- **Hexadecimal Mode (ShowCode=3):** Displays the key code in hexadecimal format (e.g., \"0x4A\").\n- **Friendly Name Mode (ShowCode=0):** Displays a friendly key name (e.g., \"Space\", \"CapsLock\", \"Shift\").\n- **Key Combination Mode (ShowCode=4):** Detects and displays the currently pressed keys as a combination (e.g., \"Ctrl + Alt + A\") in the order the keys were pressed.\n\nThe plugin also supports a **HideForce** parameter to control when the key information is cleared and includes bang commands to **Start** and **Stop** the plugin (which also start or stop a timer to update the Rainmeter skin automatically).\n\n## Features\n\n- **Multiple Output Modes:** Choose between decimal, hexadecimal, friendly name, or key combination output.\n- **Key Combination Detection:** Displays keys in the order they are pressed (with modifiers retained if still physically pressed).\n- **Automatic Measure Updates:** A built-in timer forces the Rainmeter measure and meters to update and redraw.\n- **Bang Command Control:** Use Rainmeter bang commands (`!CommandMeasure`) to start and stop the plugin.\n- **Reset on Reload:** Clears stored key values when the skin is refreshed.\n\n## Prerequisites\n\n- **Rainmeter:** [Download Rainmeter](https://www.rainmeter.net/)\n- **C# Compiler / Visual Studio:** To compile the plugin.\n- **DllExporter Tool:** To export the C# methods as unmanaged DLL exports (for example, [UnmanagedExports](https://www.nuget.org/packages/UnmanagedExports/)).\n\n## Compilation Instructions\n\n1. Open the solution in Visual Studio.\n2. Ensure you have installed a DllExporter tool (such as UnmanagedExports) so that the plugin functions are properly exported.\n3. Build the project targeting the desired architecture (x86 or x64).\n4. The compiled `KeyCodeInfo.dll` will be created in your build output directory.\n\n## Installation\n\n1. **Copy the DLL:** Place the compiled `KeyCodeInfo.dll` into Rainmeter's Plugins folder. This is typically located at:\n   ```\n   Documents\\Rainmeter\\Plugins\n   ```\n2. **Refresh Rainmeter:** Right-click on the Rainmeter icon in the system tray and choose \"Refresh All\" to load the new plugin.\n\n## Usage\n\n### Adding the Measure to a Skin\n\nBelow is a sample Rainmeter skin snippet that demonstrates how to use the KeyCodeInfo plugin in key combination mode (ShowCode=4) with a background.\n\n```ini\n[Rainmeter]\nUpdate=50\nAccurateText=1\n\n[Metadata]\nName=KeyCodeInfo - Key Combination Skin\nAuthor=NS Tech Bytes\nInformation=This skin demonstrates the KeyCodeInfo plugin in combination mode with a background.\nVersion=1.1\nLICENSE=MIT LICENSE\n\n;-------------------------------------------------\n; Background\n;-------------------------------------------------\n[MeterBackground]\nMeter=Shape\nShape=Rectangle 0,0,400,200,10 | Fill Color 50,50,50,220 | StrokeWidth 0\nW=400\nH=200\n\n;-------------------------------------------------\n; Key Combination Measure\n;-------------------------------------------------\n[MeasureKeyCode]\nMeasure=Plugin\nPlugin=KeyCodeInfo\n; Use combination mode to display key combinations\nShowCode=4\n; Set HideForce=0 to retain the combination until keys are released\nHideForce=0\nOnReleaseKeyAction=[!Log \"Key Release\"]\n\n;-------------------------------------------------\n; Display the key combination\n;-------------------------------------------------\n[MeterKeyCombination]\nMeter=String\nMeasureName=MeasureKeyCode\nX=20\nY=20\nFontSize=28\nFontColor=255,255,255\nAntiAlias=1\nText=\"Keys: %1\"\nDynamicVariables=1\n\n;-------------------------------------------------\n; Start Plugin Button\n;-------------------------------------------------\n[MeterStart]\nMeter=String\nX=20\nY=100\nFontSize=16\nFontColor=0,255,0\nAntiAlias=1\nText=\"Start Plugin\"\nLeftMouseUpAction=!CommandMeasure MeasureKeyCode \"Start\"\nDynamicVariables=1\n\n;-------------------------------------------------\n; Stop Plugin Button\n;-------------------------------------------------\n[MeterStop]\nMeter=String\nX=200\nY=100\nFontSize=16\nFontColor=255,0,0\nAntiAlias=1\nText=\"Stop Plugin\"\nLeftMouseUpAction=!CommandMeasure MeasureKeyCode \"Stop\"\nDynamicVariables=1\n```\n\n### Bang Commands\n\n- **Start the Plugin:**\n\n  ```\n  !CommandMeasure MeasureKeyCode \"Start\"\n  ```\n\n  This command starts the keyboard hook, retrieves the measure name, and starts an update timer that forces the measure, all meters, and a redraw.\n- **Stop the Plugin:**\n\n  ```\n  !CommandMeasure MeasureKeyCode \"Stop\"\n  ```\n\n  This command stops the keyboard hook and the update timer.\n\n### Parameter Options\n\n- **ShowCode Parameter:**\n\n  - `0` - Friendly key names.\n  - `1` - Decimal key code.\n  - `3` - Hexadecimal key code.\n  - `4` - Key combination (displays keys in the order pressed).\n- **HideForce Parameter:**\n\n  - `1` (default) - Clears key data immediately after reading (for modes 0, 1, and 3).\n  - `0` - Retains the last key until a new key press occurs (useful for combination mode).\n\n## Troubleshooting\n\n- **Key Not Displaying:**Ensure that the DLL is placed in the correct plugins folder and that Rainmeter has been refreshed.\n- **Build Issues:**\n  Verify that you have installed the necessary DllExporter tool and that your project settings match your target platform (x86 or x64).\n\n## Contributing\n\nContributions are welcome! Feel free to fork the repository, make improvements, and submit pull requests.\n\n## License\n\nThis project is licensed under the MIT License – see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor questions or support, please open an issue on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnstechbytes%2Fkeycodeinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnstechbytes%2Fkeycodeinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnstechbytes%2Fkeycodeinfo/lists"}