summaryrefslogtreecommitdiffstats
path: root/docs/keymap.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/keymap.md')
-rw-r--r--docs/keymap.md56
1 files changed, 0 insertions, 56 deletions
diff --git a/docs/keymap.md b/docs/keymap.md
index 49e6654a2..457dbf67e 100644
--- a/docs/keymap.md
+++ b/docs/keymap.md
@@ -161,62 +161,6 @@ Some interesting things to note:
* We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer.
* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer.
-### Custom Functions
-
-At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them.
-
-#### `fn_actions[]`
-
-We define the `fn_actions[]` array to point to custom functions. `F(N)` in a keymap will call element N of that array. For the Clueboard's that looks like this:
-
- const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(0), // Calls action_function()
- };
-
-In this case we've instructed QMK to call the `ACTION_FUNCTION` callback, which we will define in the next section.
-
-> This `fn_actions[]` interface is mostly for backward compatibility. In QMK, you don't need to use `fn_actions[]`. You can directly use `ACTION_FUNCTION(N)` or any other action code value itself normally generated by the macro in `keymaps[][MATRIX_ROWS][MATRIX_COLS]`. N in `F(N)` can only be 0 to 31. Use of the action code directly in `keymaps` unlocks this limitation.
-
-You can get a full list of Action Functions in [action_code.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_code.h).
-
-#### `action_function()`
-
-To actually handle the keypress event we define an `action_function()`. This function will be called when the key is pressed, and then again when the key is released. We have to handle both situations within our code, as well as determining whether to send/release `KC_ESC` or `KC_GRAVE`.
-
- void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t mods_pressed;
-
- switch (id) {
- case 0:
- /* Handle the combined Grave/Esc key
- */
- mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
-
- if (record->event.pressed) {
- /* The key is being pressed.
- */
- if (mods_pressed) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- /* The key is being released.
- */
- if (mods_pressed) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
- }
-
# Nitty Gritty Details
This should have given you a basic overview for creating your own keymap. For more details see the following resources: