summaryrefslogtreecommitdiff
path: root/users/d4mation/zalgo.c
blob: 3a1688e05385f967343fa680bc188f4a61857df1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "zalgo.h"

void zalgo_text( uint16_t keycode ) {

  tap_code( keycode );

  int number = ( rand() % ( 8 + 1 - 2 ) ) + 2;
  unsigned int index;

  unicode_input_start();

  for ( index = 0; index < number; index++ ) {

    uint16_t hex = ( rand() % ( 0x036F + 1 - 0x0300 ) ) + 0x0300;
    register_hex( hex );

  }

  unicode_input_finish();

}