{"id":18258133,"url":"https://github.com/sidneys/specialkey-emulator","last_synced_at":"2025-07-28T11:02:52.495Z","repository":{"id":76816918,"uuid":"43794812","full_name":"sidneys/specialkey-emulator","owner":"sidneys","description":"Emulate special keys (e.g. brightness, play/pause, increase volume) by emitting low-level global keyboard events - using NodeJS.","archived":false,"fork":false,"pushed_at":"2018-07-28T20:47:45.000Z","size":47,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T22:47:17.799Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/sidneys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2015-10-07T04:20:05.000Z","updated_at":"2018-07-28T20:47:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"014c102b-1580-4fb2-8c40-e4aeb3ea159b","html_url":"https://github.com/sidneys/specialkey-emulator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sidneys/specialkey-emulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Fspecialkey-emulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Fspecialkey-emulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Fspecialkey-emulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Fspecialkey-emulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sidneys","download_url":"https://codeload.github.com/sidneys/specialkey-emulator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Fspecialkey-emulator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267505099,"owners_count":24098346,"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-07-28T02:00:09.689Z","response_time":68,"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":[],"created_at":"2024-11-05T10:29:09.902Z","updated_at":"2025-07-28T11:02:52.468Z","avatar_url":"https://github.com/sidneys.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# specialkey-emulator\n___\n\n**Emulate special keys (e.g. brightness, play/pause, increase volume) by emitting low-level global keyboard events - using NodeJS.**\n\nContents\n----\n1. [Supported Platforms](#supported-platforms)\n1. [Requirements](#requirements)\n1. [Roadmap](#roadmap) \n1. [Installation](#installation)\n1. [Usage](#usage)\n1. [API](#api) \n1. [List of Special Key Names](#list-of-special-key-names)\n1. [Author](#author)\n1. [License](#license)\n\n\u003ca name=\"supported-platforms\"\u003e\u003c/a\u003eSupported Platforms\n----\n\nCurrently OSX only (see [Roadmap](#roadmap)).  \nTested on OSX 10.13 and 10.14.\n\n\n\u003ca name=\"requirements\"\u003e\u003c/a\u003eRequirements\n----\n\nNode 10.0.0+\n\n\n\u003ca name=\"roadmap\"\u003e\u003c/a\u003eRoadmap\n----\n - Windows version, see \u0010[Virtual Keycodes (Microsoft Developer Network)](https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731.aspx)\n\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003eInstallation\n----\n\n```sh\nnpm install specialkey-emulator --save\n```\n\n\n\u003ca name=\"usage\"\u003e\u003c/a\u003eUsage\n----\n\nTo trigger a key, simply require the module and directly call it with the name of the key to be triggered. See \u0010[List of Special Key Names](#list-of-special-key-names) for a list of currently supported keys.\n\n\n### Simple usage\n\n```javascript\nspecialkey = require('specialkey-emulator');\n\nspecialkey('NX_KEYTYPE_ILLUMINATION_DOWN')\n```\n\n### Callback usage\n\n```javascript\nspecialkey = require('specialkey-emulator');\n\nspecialkey('NX_KEYTYPE_ILLUMINATION_DOWN', function (err, result) {\n    if (err) {\n        return console.log('Error', err);\n    }\n    console.log('Key triggered', result);\n})\n```\n\n\u003ca name=\"api\"\u003e\u003c/a\u003eAPI\n----\n\n### Overview\nThis module directly exports itself as a function:\n\n```javascript\nrequire('specialkey-emulator')(keyName, callback)\n```\n\n### Parameters\nIt takes the following parameters:\n\n- **keyName** (String) - Name of the key to be triggered. See [List of Special Key Names\u0010](#list-of-special-key-names).\n- **callback** (Function) - Called after trying to trigger the special key.\n  - error (Error) - Error\n  - result (Number) - Internal code of the key which was called.\n\n\u003ca name=\"list-of-special-key-names\"\u003e\u003c/a\u003eList of Special Key Names\n----\n\n### OSX\n- Reference: [Darwin Keyboard Events \u0010@ opensource.apple.com](http://www.opensource.apple.com/source/IOHIDFamily/IOHIDFamily-86.1/IOHIDSystem/IOKit/hidsystem/ev_keymap.h)\n- Names\t\n\t- NX\\_KEYTYPE\\_SOUND\\_UP \n\t- NX\\_KEYTYPE\\_SOUND\\_DOWN \n\t- NX\\_KEYTYPE\\_BRIGHTNESS\\_UP \n\t- NX\\_KEYTYPE\\_BRIGHTNESS\\_DOWN \n\t- NX\\_KEYTYPE\\_CAPS\\_LOCK \n\t- NX\\_KEYTYPE\\_HELP \n\t- NX\\_KEYTYPE\\_POWER\\_KEY \n\t- NX\\_KEYTYPE\\_MUTE \n\t- NX\\_KEYTYPE\\_UP\\_ARROW\\_KEY \n\t- NX\\_KEYTYPE\\_DOWN\\_ARROW\\_KEY \n\t- NX\\_KEYTYPE\\_NUM\\_LOCK \n\t- NX\\_KEYTYPE\\_CONTRAST\\_UP \n\t- NX\\_KEYTYPE\\_CONTRAST\\_DOWN \n\t- NX\\_KEYTYPE\\_LAUNCH\\_PANEL \n\t- NX\\_KEYTYPE\\_EJECT \n\t- NX\\_KEYTYPE\\_VIDMIRROR \n\t- NX\\_KEYTYPE\\_PLAY \n\t- NX\\_KEYTYPE\\_NEXT \n\t- NX\\_KEYTYPE\\_PREVIOUS \n\t- NX\\_KEYTYPE\\_FAST \n\t- NX\\_KEYTYPE\\_REWIND \n\t- NX\\_KEYTYPE\\_ILLUMINATION\\_UP \n\t- NX\\_KEYTYPE\\_ILLUMINATION\\_DOWN \n\t- NX\\_KEYTYPE\\_ILLUMINATION\\_TOGGLE\n\n\n\u003ca name=\"author\"\u003e\u003c/a\u003eAuthor\n----\n[sidneys.github.io](http://sidneys.github.io) 2018\n\n\n\u003ca name=\"license\"\u003e\u003c/a\u003eLicense\n----\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidneys%2Fspecialkey-emulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidneys%2Fspecialkey-emulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidneys%2Fspecialkey-emulator/lists"}