qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

uncertainty.c (728B)


      1 // Copyright 2023 Vinh Le (@vinhcatba)
      2 // SPDX-License-Identifier: GPL-2.0-or-later
      3 
      4 #include "uncertainty.h"
      5 
      6 #ifdef OLED_ENABLE
      7 #include "bongo.h"
      8 // Used to draw on to the oled screen
      9 bool oled_minimal = true;
     10 bool oled_task_kb(void) {
     11     if(!oled_task_user()) { return false; }
     12     draw_bongo(oled_minimal);
     13     return false;
     14 }
     15 
     16 bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
     17      if (!process_record_user(keycode, record)) {
     18         return false;
     19     }
     20 
     21     switch (keycode) {
     22         case OLED_TOG:
     23             if (record->event.pressed) {
     24                 oled_minimal = !oled_minimal;
     25             }
     26             return false;
     27         default:
     28             return true;
     29     }
     30 }
     31 #endif // endif OLED_ENABLE