
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
native-keymap
Advanced tools
Returns what characters are produced by pressing keys with different modifiers on the current system keyboard layout.
sudo apt-get install libx11-dev libxkbfile-dev
sudo yum install libx11-devel.x86_64 libxkbfile-devel.x86_64 # or .i686
sudo zypper install libX11-devel libxkbfile-devel
sudo pkg install libX11
npm install native-keymap
var keymap = require('native-keymap');
console.log(keymap.getKeyMap());
Example output when using standard US keyboard layout (on Windows):
[
...
Space: { vkey: 'VK_SPACE', value: ' ', withShift: ' ', withAltGr: '', withShiftAltGr: '' },
Minus: { vkey: 'VK_OEM_MINUS', value: '-', withShift: '_', withAltGr: '', withShiftAltGr: '' },
Equal: { vkey: 'VK_OEM_PLUS', value: '=', withShift: '+', withAltGr: '', withShiftAltGr: '' },
BracketLeft: { vkey: 'VK_OEM_4', value: '[', withShift: '{', withAltGr: '', withShiftAltGr: '' },
BracketRight: { vkey: 'VK_OEM_6', value: ']', withShift: '}', withAltGr: '', withShiftAltGr: '' },
Backslash: { vkey: 'VK_OEM_5', value: '\\', withShift: '|', withAltGr: '', withShiftAltGr: '' },
Semicolon: { vkey: 'VK_OEM_1', value: ';', withShift: ':', withAltGr: '', withShiftAltGr: '' },
Quote: { vkey: 'VK_OEM_7', value: '\'', withShift: '"', withAltGr: '', withShiftAltGr: '' },
Backquote: { vkey: 'VK_OEM_3', value: '`', withShift: '~', withAltGr: '', withShiftAltGr: '' },
Comma: { vkey: 'VK_OEM_COMMA', value: ',', withShift: '<', withAltGr: '', withShiftAltGr: '' },
Period: { vkey: 'VK_OEM_PERIOD', value: '.', withShift: '>', withAltGr: '', withShiftAltGr: '' },
Slash: { vkey: 'VK_OEM_2', value: '/', withShift: '?', withAltGr: '', withShiftAltGr: '' },
...
]
Example output when using German (Swiss) keyboard layout (on Windows):
[
...
Space: { vkey: 'VK_SPACE', value: ' ', withShift: ' ', withAltGr: '', withShiftAltGr: '' },
Minus: { vkey: 'VK_OEM_4', value: '\'', withShift: '?', withAltGr: '´', withShiftAltGr: '' },
Equal: { vkey: 'VK_OEM_6', value: '^', withShift: '`', withAltGr: '~', withShiftAltGr: '' },
BracketLeft: { vkey: 'VK_OEM_1', value: 'ü', withShift: 'è', withAltGr: '[', withShiftAltGr: '' },
BracketRight: { vkey: 'VK_OEM_3', value: '¨', withShift: '!', withAltGr: ']', withShiftAltGr: '' },
Backslash: { vkey: 'VK_OEM_8', value: '$', withShift: '£', withAltGr: '}', withShiftAltGr: '' },
Semicolon: { vkey: 'VK_OEM_7', value: 'ö', withShift: 'é', withAltGr: '', withShiftAltGr: '' },
Quote: { vkey: 'VK_OEM_5', value: 'ä', withShift: 'à', withAltGr: '{', withShiftAltGr: '' },
Backquote: { vkey: 'VK_OEM_2', value: '§', withShift: '°', withAltGr: '', withShiftAltGr: '' },
Comma: { vkey: 'VK_OEM_COMMA', value: ',', withShift: ';', withAltGr: '', withShiftAltGr: '' },
Period: { vkey: 'VK_OEM_PERIOD', value: '.', withShift: ':', withAltGr: '', withShiftAltGr: '' },
Slash: { vkey: 'VK_OEM_MINUS', value: '-', withShift: '_', withAltGr: '', withShiftAltGr: '' },
...
]
npm install -g node-gyp
node-gyp configure
(for debugging use node-gyp configure -d
)node-gyp build
npm test
(for debugging change index.js
to load the node module from the Debug
folder and press F5
)FAQs
Get OS key mapping
The npm package native-keymap receives a total of 18,041 weekly downloads. As such, native-keymap popularity was classified as popular.
We found that native-keymap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.