qmk_firmware

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

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 
      5 #include "introspection.h"
      6 
      7 ASSERT_COMMUNITY_MODULES_MIN_API_VERSION(1, 0, 0);
      8 
      9 uint32_t delayed_hello_world(uint32_t trigger_time, void *cb_arg) {
     10     dprintf("Hello, world! I'm a QMK based keyboard! The keymap array size is %d bytes.\n", (int)hello_world_introspection().total_size);
     11     return 0;
     12 }
     13 
     14 void keyboard_post_init_hello_world(void) {
     15     keyboard_post_init_hello_world_kb();
     16     defer_exec(10000, delayed_hello_world, NULL);
     17 }
     18 
     19 bool process_record_hello_world(uint16_t keycode, keyrecord_t *record) {
     20     if (!process_record_hello_world_kb(keycode, record)) {
     21         return false;
     22     }
     23 
     24     switch (keycode) {
     25         case COMMUNITY_MODULE_HELLO:
     26             if (record->event.pressed) {
     27                 SEND_STRING("Hello there.");
     28                 break;
     29             }
     30     }
     31 
     32     return true;
     33 }