~ruther/qmk_firmware

ref: 2118bf655eb870b6d9740b7adb228e61308d9e35 qmk_firmware/keyboards/vinhcatba/uncertainty/uncertainty.c -rw-r--r-- 728 bytes
2118bf65 — Rutherther feat: add TTY layer 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2023 Vinh Le (@vinhcatba)
// SPDX-License-Identifier: GPL-2.0-or-later

#include "uncertainty.h"

#ifdef OLED_ENABLE
#include "bongo.h"
// Used to draw on to the oled screen
bool oled_minimal = true;
bool oled_task_kb(void) {
    if(!oled_task_user()) { return false; }
    draw_bongo(oled_minimal);
    return false;
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
     if (!process_record_user(keycode, record)) {
        return false;
    }

    switch (keycode) {
        case OLED_TOG:
            if (record->event.pressed) {
                oled_minimal = !oled_minimal;
            }
            return false;
        default:
            return true;
    }
}
#endif // endif OLED_ENABLE
Do not follow this link