Skip to content

Instantly share code, notes, and snippets.

@taikohub
Created September 19, 2022 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taikohub/1a0beb8892bf20db36ccbbff81747ba7 to your computer and use it in GitHub Desktop.
Save taikohub/1a0beb8892bf20db36ccbbff81747ba7 to your computer and use it in GitHub Desktop.
keymap.c example with Spanish module added
//This is an example of a keymap.c file where we include an extra module.
//Here we will use the keymap_spanish.h module, seen here: https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_extras/keymap_spanish.h.
#include QMK_KEYBOARD_H
//1. Include the keymap_spanish.h module after `#include QMK_KEYBOARD_H`
#include "keymap_spanish.h"
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
#define RAISE MO(_RAISE)
#define LOWER MO(_LOWER)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    [_QWERTY] = LAYOUT_5x6(
        ...
    ),
    [_LOWER] = LAYOUT_5x6(
        ...
    ),
    [_RAISE] = LAYOUT_5x6(
          //2. You can then add keycodes from the keymap_spanish.h module similar to below.
          //3. You can still use default QMK keycodes such as KC_F10 and KC_F11 seen below.
          ES_MORD, ES_1, ES_2, ES_3, ES_4, ES_5,                                ES_6, ES_7, ES_8, ES_9, ES_0, KC_F10, KC_F11,
          ...
    )
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment