logo

qmk_firmware

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

hello_world.c (921B)


  1. // Copyright 2025 Nick Brassel (@tzarc)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include QMK_KEYBOARD_H
  4. #include "introspection.h"
  5. ASSERT_COMMUNITY_MODULES_MIN_API_VERSION(1, 0, 0);
  6. uint32_t delayed_hello_world(uint32_t trigger_time, void *cb_arg) {
  7. dprintf("Hello, world! I'm a QMK based keyboard! The keymap array size is %d bytes.\n", (int)hello_world_introspection().total_size);
  8. return 0;
  9. }
  10. void keyboard_post_init_hello_world(void) {
  11. keyboard_post_init_hello_world_kb();
  12. defer_exec(10000, delayed_hello_world, NULL);
  13. }
  14. bool process_record_hello_world(uint16_t keycode, keyrecord_t *record) {
  15. if (!process_record_hello_world_kb(keycode, record)) {
  16. return false;
  17. }
  18. switch (keycode) {
  19. case COMMUNITY_MODULE_HELLO:
  20. if (record->event.pressed) {
  21. SEND_STRING("Hello there.");
  22. break;
  23. }
  24. }
  25. return true;
  26. }