logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

uncertainty.c (728B)


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