# Frequently Asked Keymap Questions This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.html) first. ## What Keycodes Can I Use? See [Basic Keycodes](keycodes.html) and [Quantum Keycodes](quantum_keycodes.html) for most of the keys you can define. Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). ## `KC_SYSREQ` isn't working Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'. See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and - http://en.wikipedia.org/wiki/Magic_SysRq_key - http://en.wikipedia.org/wiki/System_request ## Power key doesn't work Use `KC_PWR` instead of `KC_POWER` or vice versa. - `KC_PWR` works with Windows and Linux, not with OSX. - `KC_POWER` works with OSX and Linux, not with Windows. More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264 ## Oneshot modifier Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'. Oneshot Shift mitgates this for me. https://github.com/tmk/tmk_keyboard/issues/67 ## Modifier/Layer stuck Modifier keys or layers can be stuck unless layer switching is configured properly. For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event. - https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching - http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 - https://github.com/tmk/tmk_keyboard/issues/248 ## Mechanical Lock Switch Support This feature is for *mechanical lock switch* like [this Alps one](http://deskthority.net/wiki/Alps_SKCL_Lock). You can enable it by adding this to your `config.h`: ``` #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE ``` After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in your keymap instead. Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.*** ## Input special charactors other than ASCII like Cédille 'Ç' NO UNIVERSAL METHOD TO INPUT THOSE WORKS OVER ALL SYSTEMS. You have to define **MACRO** in way specific to your OS or layout. See this post for example **MACRO** code. http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620 On **Windows** you can use `AltGr` key or **Alt code**. - http://en.wikipedia.org/wiki/AltGr_key - http://en.wikipedia.org/wiki/Alt_code On **Mac** OS defines `Option` key combinations. - http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input On **Xorg** you can use `compose` key, instead. - http://en.wikipedia.org/wiki/Compose_key And see this for **Unicode** input. - http://en.wikipedia.org/wiki/Unicode_input ## Apple/Mac keyboard Fn Not supported. Apple/Mac keyboard sends keycode for Fn unlike most of other keyboards. I think you can send Apple Fn key using Apple venter specific Page 0xff01 and usage 0x0003. But you have to change HID Report Descriptor for this, of course. https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/AppleHIDUsageTables.h ## Media control keys in Mac OSX #### KC_MNXT and KC_MPRV does not work on Mac Use `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) and `KC_MRWD`(`KC_MEDIA_REWIND`) instead of `KC_MNXT` and `KC_MPRV`. See https://github.com/tmk/tmk_keyboard/issues/195 ## Keys supported in Mac OSX? Y