|/ /" ( _ )
|\ E Y \_ O D E S <¨\_/ ´* *`
/¨¨¨¨¨¨¨\/¨¨¨¨¨¨¨¨¨¨¨¨¨\/\ 0x29!´ `` \o/
´ / ´ \_ (¨) ,
´ ´\ 0x29? /__\ I'm Satan!
"Because key code knowledge \ ,^----------||----------------------·
is crucial when danger arrives" `~~~~~~~~~~~~~~~~~~~~´
- BG
This package assists with creating platform-independent keyboard handling by providing key code mappings between different platforms.
Note: This package is published while being in its infancy. Structure will change. Rebase and force pushing will be done.
AppleKeyCodes maps between iOS and macOS key codes using USB keyboard codes.
TODO: Add modules for conversion between USB, evdev, XKB, Win and macOS.
Data sources and naive Python parsers are located at /generate/data_source. Parsed data is available at /generate/data.
Currently, these sources are available:
- dom_code_data from Chromium.
- Maps between
USB,evdev,XKB,WinandmacOS. - Parser output.
- Maps between
- UIKeyboardHIDUsage from UIKit
- Provides
UIKitkeyboard HID usage id namings. - Parser output.
- Provides
GYB (Generate Your Boilerplate) is Python script for generating Swift code using a templating system. It is used for generating the code in the modules.
- Swift GYB at NSHipster
- GYB at OpenCombine (This projects GYB things are based on this)
- Source code
- HID Usage Tables PDF (Keyboard/Keypad Page)
- Chromium key code table
- UIKeyboardHIDUsage
This library is released under the MIT license. See LICENSE for details.
How key code data source license is handled:
- If license is permissive:
- Include license and data source files.
- Example
- else
- Exclude license and data source file.
- Include only parser output.
- Mention why file is missing in parser.
- Only parse and share data that is "safe".
- Example
Contact repository owner if data source license is violated.