KeyNaming.h
Includes: <CoreFoundation/CoreFoundation.h>
Version: 2.2
Copyright © 2001–2008 Jens Ayton
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Like UCKeyTranslate(), but much less scary.
Overview
The KeyNaming library converts virtual key codes (as provided by the various event systems) or HID usages codes (as provided by IOKit’s HID interface) to descriptive strings reflecting the current keyboard layout.
Two macros affect the availability of KeyNaming functions. Functions taking virtual key codes as parameters are disabled if KEYNAMING_ENABLE_VKC is defined as zero. Functions taking HID usage codes as parameters are disabled if KEYNAMING_ENABLE_HID is defined as zero. By default, both are set to 1 and dead code stripping is assumed to work.
Cocoa
Normal toll-free bridging rules apply: if calling from Cocoa, cast results to NSString * or NSArray *, and remember to release.
© 2001–2008 Jens Ayton
Last Updated: 2008-10-22
HTML documentation generated by HeaderDoc