2019-12-18 09:59:12 +01:00
|
|
|
|
#include "d4mation.h"
|
|
|
|
|
#include "tap-hold.h"
|
|
|
|
|
#include "zalgo.h"
|
|
|
|
|
#include "macros.h"
|
|
|
|
|
|
|
|
|
|
bool zalgo_enabled = false;
|
|
|
|
|
|
|
|
|
|
bool process_record_user( uint16_t keycode, keyrecord_t *record ) {
|
|
|
|
|
|
|
|
|
|
switch ( keycode ) {
|
|
|
|
|
|
|
|
|
|
case _GRAVE_ESC:
|
|
|
|
|
|
|
|
|
|
/* Send ` on Tap, Esc on Hold */
|
|
|
|
|
tap_or_hold( record, KC_GRAVE, KC_ESC );
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PHPOPEN:
|
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
|
|
|
|
|
|
|
|
|
tap_code16( S( KC_COMMA ) );
|
|
|
|
|
tap_code16( S( KC_SLASH ) );
|
|
|
|
|
|
|
|
|
|
tap_code( KC_P );
|
|
|
|
|
tap_code( KC_H );
|
|
|
|
|
tap_code( KC_P );
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PHPCLSE:
|
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
|
|
|
|
tap_code16( S( KC_SLASH ) );
|
|
|
|
|
tap_code16( S( KC_DOT ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
#ifdef UNICODE_ENABLE
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
case AMENO:
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
send_unicode_string( "༼ つ ◕_◕ ༽つ" );
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
case MAGIC:
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
send_unicode_string( "(∩ ͡° ͜ʖ ͡°)⊃━☆゚. *" );
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
case LENNY:
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
send_unicode_string( "( ͡° ͜ʖ ͡°)" );
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
case DISFACE:
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
2021-05-13 19:25:40 +02:00
|
|
|
|
send_unicode_string( "ಠ_ಠ" );
|
2019-12-18 09:59:12 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
case TFLIP:
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
send_unicode_string( "(╯°□°)╯︵┻━┻" );
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
case TPUT:
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
send_unicode_string( "┬──┬ ノ( ゜-゜ノ)" );
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
case SHRUG:
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
|
|
|
|
|
2021-05-13 19:25:40 +02:00
|
|
|
|
send_unicode_string( "¯\\_(ツ)_/¯" );
|
2019-12-18 09:59:12 +01:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case ZALGO: /* Toggles Zalgo Text mode */
|
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
|
|
|
|
zalgo_enabled = ! zalgo_enabled;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
|
|
#ifdef UNICODE_ENABLE
|
|
|
|
|
|
|
|
|
|
if ( zalgo_enabled ) {
|
|
|
|
|
|
|
|
|
|
if ( keycode < KC_A || ( keycode > KC_0 && keycode < KC_MINUS ) || keycode > KC_SLASH ) {
|
|
|
|
|
process_record_keymap( keycode, record );
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( record->event.pressed ) {
|
|
|
|
|
zalgo_text( keycode );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
process_record_keymap( keycode, record );
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
};
|