aboutsummaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index c0580e0aa..224bfb795 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -307,6 +307,41 @@ void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
307 } 307 }
308} 308}
309 309
310void tap_random_base64(void) {
311 uint8_t key = (TCNT0 + TCNT1 + TCNT3 + TCNT4) % 64;
312 // uint8_t key = rand() % 64;
313 switch (key) {
314 case 0 ... 25:
315 register_code(KC_LSFT);
316 register_code(key + KC_A);
317 unregister_code(key + KC_A);
318 unregister_code(KC_LSFT);
319 break;
320 case 26 ... 51:
321 register_code(key - 26 + KC_A);
322 unregister_code(key - 26 + KC_A);
323 break;
324 case 52:
325 register_code(KC_0);
326 unregister_code(KC_0);
327 break;
328 case 53 ... 61:
329 register_code(key - 53 + KC_1);
330 unregister_code(key - 53 + KC_1);
331 break;
332 case 62:
333 register_code(KC_LSFT);
334 register_code(KC_EQL);
335 unregister_code(KC_EQL);
336 unregister_code(KC_LSFT);
337 break;
338 case 63:
339 register_code(KC_SLSH);
340 unregister_code(KC_SLSH);
341 break;
342 }
343}
344
310void matrix_init_quantum() { 345void matrix_init_quantum() {
311 #ifdef BACKLIGHT_ENABLE 346 #ifdef BACKLIGHT_ENABLE
312 backlight_init_ports(); 347 backlight_init_ports();