summaryrefslogtreecommitdiffstats
path: root/keyboards/crkbd/keymaps/colemad/process_records.c
blob: 549dec24644a6234b4cfd840d65041dfab467a32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2022 Álvaro Cortés (@ACortesDev)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "layers.h"
#include "keycodes.h"

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
    /* Macros */
    switch (keycode) {
        case VSCTERM:
            if (record->event.pressed) {
                SEND_STRING(SS_LCTL("`")); // Ctrl + ` (to toggle vscode terminal)
            }
            return false;
        case CHNLANG:
            if (record->event.pressed) {
                SEND_STRING(SS_LCTL(SS_LSFT("n"))); // Ctrl + Shift + N (to change keyboard layout)
            }
            return false;
    }
    return true;
}