diff options
Diffstat (limited to 'users')
-rw-r--r-- | users/ridingqwerty/config.h | 8 | ||||
-rw-r--r-- | users/ridingqwerty/dict.h | 1012 | ||||
-rw-r--r-- | users/ridingqwerty/process_records.c | 467 | ||||
-rw-r--r-- | users/ridingqwerty/process_records.h | 55 | ||||
-rw-r--r-- | users/ridingqwerty/ridingqwerty.c | 64 | ||||
-rw-r--r-- | users/ridingqwerty/ridingqwerty.h | 64 | ||||
-rw-r--r-- | users/ridingqwerty/rules.mk | 20 | ||||
-rw-r--r-- | users/ridingqwerty/tapdances.c | 33 | ||||
-rw-r--r-- | users/ridingqwerty/tapdances.h | 9 | ||||
-rw-r--r-- | users/ridingqwerty/unicode.c | 7 | ||||
-rw-r--r-- | users/ridingqwerty/unicode.h | 295 | ||||
-rw-r--r-- | users/ridingqwerty/wrappers.h | 156 |
12 files changed, 2149 insertions, 41 deletions
diff --git a/users/ridingqwerty/config.h b/users/ridingqwerty/config.h index 2461b8b8dd..6501efe62f 100644 --- a/users/ridingqwerty/config.h +++ b/users/ridingqwerty/config.h @@ -1,3 +1,11 @@ #pragma once + +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COL 0 + #define TAPPING_TERM 175 #define MACRO_TIMER 5 +#define TAPPING_FORCE_HOLD_PER_KEY +// testing +#define TAPPING_TERM_PER_KEY +//#define IGNORE_MOD_TAP_INTERRUPT // rolling R3 "zxcv", etc... diff --git a/users/ridingqwerty/dict.h b/users/ridingqwerty/dict.h new file mode 100644 index 0000000000..43d4d50b50 --- /dev/null +++ b/users/ridingqwerty/dict.h @@ -0,0 +1,1012 @@ +#pragma once + +// lower this number if a smaller dictionary is desired +#define NUMBER_OF_WORDS 1000 + +#define MAX_WORDS 1000 +#if (NUMBER_OF_WORDS > MAX_WORDS) +# error *** NUMBER_OF_WORDS must be between 0 and 1000 inclusive +#endif + +const char *dict[MAX_WORDS] = { \ +"the", \ +"of", \ +"to", \ +"and", \ +"a", \ +"in", \ +"is", \ +"it", \ +"you", \ +"that", \ +"he", \ +"was", \ +"for", \ +"on", \ +"are", \ +"with", \ +"as", \ +"I", \ +"his", \ +"they", \ +"be", \ +"at", \ +"one", \ +"have", \ +"this", \ +"from", \ +"or", \ +"had", \ +"by", \ +"not", \ +"word", \ +"but", \ +"what", \ +"some", \ +"we", \ +"can", \ +"out", \ +"other", \ +"were", \ +"all", \ +"there", \ +"when", \ +"up", \ +"use", \ +"your", \ +"how", \ +"said", \ +"an", \ +"each", \ +"she", \ +"which", \ +"do", \ +"their", \ +"time", \ +"if", \ +"will", \ +"way", \ +"about", \ +"many", \ +"then", \ +"them", \ +"write", \ +"would", \ +"like", \ +"so", \ +"these", \ +"her", \ +"long", \ +"make", \ +"thing", \ +"see", \ +"him", \ +"two", \ +"has", \ +"look", \ +"more", \ +"day", \ +"could", \ +"go", \ +"come", \ +"did", \ +"number", \ +"sound", \ +"no", \ +"most", \ +"people", \ +"my", \ +"over", \ +"know", \ +"water", \ +"than", \ +"call", \ +"first", \ +"who", \ +"may", \ +"down", \ +"side", \ +"been", \ +"now", \ +"find", \ +"any", \ +"new", \ +"work", \ +"part", \ +"take", \ +"get", \ +"place", \ +"made", \ +"live", \ +"where", \ +"after", \ +"back", \ +"little", \ +"only", \ +"round", \ +"man", \ +"year", \ +"came", \ +"show", \ +"every", \ +"good", \ +"me", \ +"give", \ +"our", \ +"under", \ +"name", \ +"very", \ +"through", \ +"just", \ +"form", \ +"sentence", \ +"great", \ +"think", \ +"say", \ +"help", \ +"low", \ +"line", \ +"differ", \ +"turn", \ +"cause", \ +"much", \ +"mean", \ +"before", \ +"move", \ +"right", \ +"boy", \ +"old", \ +"too", \ +"same", \ +"tell", \ +"does", \ +"set", \ +"three", \ +"want", \ +"air", \ +"well", \ +"also", \ +"play", \ +"small", \ +"end", \ +"put", \ +"home", \ +"read", \ +"hand", \ +"port", \ +"large", \ +"spell", \ +"add", \ +"even", \ +"land", \ +"here", \ +"must", \ +"big", \ +"high", \ +"such", \ +"follow", \ +"act", \ +"why", \ +"ask", \ +"men", \ +"change", \ +"went", \ +"light", \ +"kind", \ +"off", \ +"need", \ +"house", \ +"picture", \ +"try", \ +"us", \ +"again", \ +"animal", \ +"point", \ +"mother", \ +"world", \ +"near", \ +"build", \ +"self", \ +"earth", \ +"father", \ +"head", \ +"stand", \ +"own", \ +"page", \ +"should", \ +"country", \ +"found", \ +"answer", \ +"school", \ +"grow", \ +"study", \ +"still", \ +"learn", \ +"plant", \ +"cover", \ +"food", \ +"sun", \ +"four", \ +"between", \ +"state", \ +"keep", \ +"eye", \ +"never", \ +"last", \ +"let", \ +"thought", \ +"city", \ +"tree", \ +"cross", \ +"farm", \ +"hard", \ +"start", \ +"might", \ +"story", \ +"saw", \ +"far", \ +"sea", \ +"draw", \ +"left", \ +"late", \ +"run", \ +"don't", \ +"while", \ +"press", \ +"close", \ +"night", \ +"real", \ +"life", \ +"few", \ +"north", \ +"open", \ +"seem", \ +"together", \ +"next", \ +"white", \ +"children", \ +"begin", \ +"got", \ +"walk", \ +"example", \ +"ease", \ +"paper", \ +"group", \ +"always", \ +"music", \ +"those", \ +"both", \ +"mark", \ +"often", \ +"letter", \ +"until", \ +"mile", \ +"river", \ +"car", \ +"feet", \ +"care", \ +"second", \ +"book", \ +"carry", \ +"took", \ +"science", \ +"eat", \ +"room", \ +"friend", \ +"began", \ +"idea", \ +"fish", \ +"mountain", \ +"stop", \ +"once", \ +"base", \ +"hear", \ +"horse", \ +"cut", \ +"sure", \ +"watch", \ +"color", \ +"face", \ +"wood", \ +"main", \ +"enough", \ +"plain", \ +"girl", \ +"usual", \ +"young", \ +"ready", \ +"above", \ +"ever", \ +"red", \ +"list", \ +"though", \ +"feel", \ +"talk", \ +"bird", \ +"soon", \ +"body", \ +"dog", \ +"family", \ +"direct", \ +"pose", \ +"leave", \ +"song", \ +"measure", \ +"door", \ +"product", \ +"black", \ +"short", \ +"numeral", \ +"class", \ +"wind", \ +"question", \ +"happen", \ +"complete", \ +"ship", \ +"area", \ +"half", \ +"rock", \ +"order", \ +"fire", \ +"south", \ +"problem", \ +"piece", \ +"told", \ +"knew", \ +"pass", \ +"since", \ +"top", \ +"whole", \ +"king", \ +"space", \ +"heard", \ +"best", \ +"hour", \ +"better", \ +"true", \ +"during", \ +"hundred", \ +"five", \ +"remember", \ +"step", \ +"early", \ +"hold", \ +"west", \ +"ground", \ +"interest", \ +"reach", \ +"fast", \ +"verb", \ +"sing", \ +"listen", \ +"six", \ +"table", \ +"travel", \ +"less", \ +"morning", \ +"ten", \ +"simple", \ +"several", \ +"vowel", \ +"toward", \ +"war", \ +"lay", \ +"against", \ +"pattern", \ +"slow", \ +"center", \ +"love", \ +"person", \ +"money", \ +"serve", \ +"appear", \ +"road", \ +"map", \ +"rain", \ +"rule", \ +"govern", \ +"pull", \ +"cold", \ +"notice", \ +"voice", \ +"unit", \ +"power", \ +"town", \ +"fine", \ +"certain", \ +"fly", \ +"fall", \ +"lead", \ +"cry", \ +"dark", \ +"machine", \ +"note", \ +"wait", \ +"plan", \ +"figure", \ +"star", \ +"box", \ +"noun", \ +"field", \ +"rest", \ +"correct", \ +"able", \ +"pound", \ +"done", \ +"beauty", \ +"drive", \ +"stood", \ +"contain", \ +"front", \ +"teach", \ +"week", \ +"final", \ +"gave", \ +"green", \ +"oh", \ +"quick", \ +"develop", \ +"ocean", \ +"warm", \ +"free", \ +"minute", \ +"strong", \ +"special", \ +"mind", \ +"behind", \ +"clear", \ +"tail", \ +"produce", \ +"fact", \ +"street", \ +"inch", \ +"multiply", \ +"nothing", \ +"course", \ +"stay", \ +"wheel", \ +"full", \ +"force", \ +"blue", \ +"object", \ +"decide", \ +"surface", \ +"deep", \ +"moon", \ +"island", \ +"foot", \ +"system", \ +"busy", \ +"test", \ +"record", \ +"boat", \ +"common", \ +"gold", \ +"possible", \ +"plane", \ +"stead", \ +"dry", \ +"wonder", \ +"laugh", \ +"thousand", \ +"ago", \ +"ran", \ +"check", \ +"game", \ +"shape", \ +"equate", \ +"hot", \ +"miss", \ +"brought", \ +"heat", \ +"snow", \ +"tire", \ +"bring", \ +"yes", \ +"distant", \ +"fill", \ +"east", \ +"paint", \ +"language", \ +"among", \ +"grand", \ +"ball", \ +"yet", \ +"wave", \ +"drop", \ +"heart", \ +"am", \ +"present", \ +"heavy", \ +"dance", \ +"engine", \ +"position", \ +"arm", \ +"wide", \ +"sail", \ +"material", \ +"size", \ +"vary", \ +"settle", \ +"speak", \ +"weight", \ +"general", \ +"ice", \ +"matter", \ +"circle", \ +"pair", \ +"include", \ +"divide", \ +"syllable", \ +"felt", \ +"perhaps", \ +"pick", \ +"sudden", \ +"count", \ +"square", \ +"reason", \ +"length", \ +"represent", \ +"art", \ +"subject", \ +"region", \ +"energy", \ +"hunt", \ +"probable", \ +"bed", \ +"brother", \ +"egg", \ +"ride", \ +"cell", \ +"believe", \ +"fraction", \ +"forest", \ +"sit", \ +"race", \ +"window", \ +"store", \ +"summer", \ +"train", \ +"sleep", \ +"prove", \ +"lone", \ +"leg", \ +"exercise", \ +"wall", \ +"catch", \ +"mount", \ +"wish", \ +"sky", \ +"board", \ +"joy", \ +"winter", \ +"sat", \ +"written", \ +"wild", \ +"instrument", \ +"kept", \ +"glass", \ +"grass", \ +"cow", \ +"job", \ +"edge", \ +"sign", \ +"visit", \ +"past", \ +"soft", \ +"fun", \ +"bright", \ +"gas", \ +"weather", \ +"month", \ +"million", \ +"bear", \ +"finish", \ +"happy", \ +"hope", \ +"flower", \ +"clothe", \ +"strange", \ +"gone", \ +"jump", \ +"baby", \ +"eight", \ +"village", \ +"meet", \ +"root", \ +"buy", \ +"raise", \ +"solve", \ +"metal", \ +"whether", \ +"push", \ +"seven", \ +"paragraph", \ +"third", \ +"shall", \ +"held", \ +"hair", \ +"describe", \ +"cook", \ +"floor", \ +"either", \ +"result", \ +"burn", \ +"hill", \ +"safe", \ +"cat", \ +"century", \ +"consider", \ +"type", \ +"law", \ +"bit", \ +"coast", \ +"copy", \ +"phrase", \ +"silent", \ +"tall", \ +"sand", \ +"soil", \ +"roll", \ +"temperature", \ +"finger", \ +"industry", \ +"value", \ +"fight", \ +"lie", \ +"beat", \ +"excite", \ +"natural", \ +"view", \ +"sense", \ +"ear", \ +"else", \ +"quite", \ +"broke", \ +"case", \ +"middle", \ +"kill", \ +"son", \ +"lake", \ +"moment", \ +"scale", \ +"loud", \ +"spring", \ +"observe", \ +"child", \ +"straight", \ +"consonant", \ +"nation", \ +"dictionary", \ +"milk", \ +"speed", \ +"method", \ +"organ", \ +"pay", \ +"age", \ +"section", \ +"dress", \ +"cloud", \ +"surprise", \ +"quiet", \ +"stone", \ +"tiny", \ +"climb", \ +"cool", \ +"design", \ +"poor", \ +"lot", \ +"experiment", \ +"bottom", \ +"key", \ +"iron", \ +"single", \ +"stick", \ +"flat", \ +"twenty", \ +"skin", \ +"smile", \ +"crease", \ +"hole", \ +"trade", \ +"melody", \ +"trip", \ +"office", \ +"receive", \ +"row", \ +"mouth", \ +"exact", \ +"symbol", \ +"die", \ +"least", \ +"trouble", \ +"shout", \ +"except", \ +"wrote", \ +"seed", \ +"tone", \ +"join", \ +"suggest", \ +"clean", \ +"break", \ +"lady", \ +"yard", \ +"rise", \ +"bad", \ +"blow", \ +"oil", \ +"blood", \ +"touch", \ +"grew", \ +"cent", \ +"mix", \ +"team", \ +"wire", \ +"cost", \ +"lost", \ +"brown", \ +"wear", \ +"garden", \ +"equal", \ +"sent", \ +"choose", \ +"fell", \ +"fit", \ +"flow", \ +"fair", \ +"bank", \ +"collect", \ +"save", \ +"control", \ +"decimal", \ +"gentle", \ +"woman", \ +"captain", \ +"practice", \ +"separate", \ +"difficult", \ +"doctor", \ +"please", \ +"protect", \ +"noon", \ +"whose", \ +"locate", \ +"ring", \ +"character", \ +"insect", \ +"caught", \ +"period", \ +"indicate", \ +"radio", \ +"spoke", \ +"atom", \ +"human", \ +"history", \ +"effect", \ +"electric", \ +"expect", \ +"crop", \ +"modern", \ +"element", \ +"hit", \ +"student", \ +"corner", \ +"party", \ +"supply", \ +"bone", \ +"rail", \ +"imagine", \ +"provide", \ +"agree", \ +"thus", \ +"capital", \ +"won't", \ +"chair", \ +"danger", \ +"fruit", \ +"rich", \ +"thick", \ +"soldier", \ +"process", \ +"operate", \ +"guess", \ +"necessary", \ +"sharp", \ +"wing", \ +"create", \ +"neighbor", \ +"wash", \ +"bat", \ +"rather", \ +"crowd", \ +"corn", \ +"compare", \ +"poem", \ +"string", \ +"bell", \ +"depend", \ +"meat", \ +"rub", \ +"tube", \ +"famous", \ +"dollar", \ +"stream", \ +"fear", \ +"sight", \ +"thin", \ +"triangle", \ +"planet", \ +"hurry", \ +"chief", \ +"colony", \ +"clock", \ +"mine", \ +"tie", \ +"enter", \ +"major", \ +"fresh", \ +"search", \ +"send", \ +"yellow", \ +"gun", \ +"allow", \ +"print", \ +"dead", \ +"spot", \ +"desert", \ +"suit", \ +"current", \ +"lift", \ +"rose", \ +"continue", \ +"block", \ +"chart", \ +"hat", \ +"sell", \ +"success", \ +"company", \ +"subtract", \ +"event", \ +"particular", \ +"deal", \ +"swim", \ +"term", \ +"opposite", \ +"wife", \ +"shoe", \ +"shoulder", \ +"spread", \ +"arrange", \ +"camp", \ +"invent", \ +"cotton", \ +"born", \ +"determine", \ +"quart", \ +"nine", \ +"truck", \ +"noise", \ +"level", \ +"chance", \ +"gather", \ +"shop", \ +"stretch", \ +"throw", \ +"shine", \ +"property", \ +"column", \ +"molecule", \ +"select", \ +"wrong", \ +"gray", \ +"repeat", \ +"require", \ +"broad", \ +"prepare", \ +"salt", \ +"nose", \ +"plural", \ +"anger", \ +"claim", \ +"continent", \ +"oxygen", \ +"sugar", \ +"death", \ +"pretty", \ +"skill", \ +"women", \ +"season", \ +"solution", \ +"magnet", \ +"silver", \ +"thank", \ +"branch", \ +"match", \ +"suffix", \ +"especially", \ +"fig", \ +"afraid", \ +"huge", \ +"sister", \ +"steel", \ +"discuss", \ +"forward", \ +"similar", \ +"guide", \ +"experience", \ +"score", \ +"apple", \ +"bought", \ +"led", \ +"pitch", \ +"coat", \ +"mass", \ +"card", \ +"band", \ +"rope", \ +"slip", \ +"win", \ +"dream", \ +"evening", \ +"condition", \ +"feed", \ +"tool", \ +"total", \ +"basic", \ +"smell", \ +"valley", \ +"nor", \ +"double", \ +"seat", \ +"arrive", \ +"master", \ +"track", \ +"parent", \ +"shore", \ +"division", \ +"sheet", \ +"substance", \ +"favor", \ +"connect", \ +"post", \ +"spend", \ +"chord", \ +"fat", \ +"glad", \ +"original", \ +"share", \ +"station", \ +"dad", \ +"bread", \ +"charge", \ +"proper", \ +"bar", \ +"offer", \ +"segment", \ +"slave", \ +"duck", \ +"instant", \ +"market", \ +"degree", \ +"populate", \ +"chick", \ +"dear", \ +"enemy", \ +"reply", \ +"drink", \ +"occur", \ +"support", \ +"speech", \ +"nature", \ +"range", \ +"steam", \ +"motion", \ +"path", \ +"liquid", \ +"log", \ +"meant", \ +"quotient", \ +"teeth", \ +"shell", \ +"neck" \ +}; diff --git a/users/ridingqwerty/process_records.c b/users/ridingqwerty/process_records.c index be72883ecb..b0b0b48a22 100644 --- a/users/ridingqwerty/process_records.c +++ b/users/ridingqwerty/process_records.c @@ -1,4 +1,7 @@ +#include <stdio.h> +#include <time.h> #include "ridingqwerty.h" +#include "dict.h" __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { @@ -10,23 +13,475 @@ bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } -uint16_t user_key_timer; +/* +typedef union { + struct { + uint8_t aesthetic : 1, + spongebob : 1, + uppercase : 1, + australia : 1, + unusued : 4; + }; + uint8_t all; +} mode_config_t; +*/ +mode_config_t mode = {.all = 0U}; + +bool randword_seed = false; +uint8_t user_mod_state; +uint16_t rand_key; +uint16_t temp_keycode; +uint32_t user_key_timer; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + + temp_keycode = keycode; + if ((mode.all != 0U) && ((keycode != DB(TAB) || keycode != ED(ESC)) && ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)))) { + temp_keycode &= 0xFF; + } + + if (mode.spongebob) { + switch(temp_keycode) { + case KC_A ... KC_Z: + if (record->event.pressed) { + (mode.uppercase ^= 1) == 0 ? tap_code16(S(temp_keycode)) : tap_code(temp_keycode); + } + return false; + } + } + + if (mode.aesthetic) { + switch(temp_keycode) { +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + case KC_A: + if (record->event.pressed) { + send_unicode_hex_string("039B"); + tap_code(KC_SPC); + } + return false; + case KC_E: + if (record->event.pressed) { + send_unicode_hex_string("039E"); + tap_code(KC_SPC); + } + return false; +#else + case A: + case E: + if (record->event.pressed) { + tap_code16(S(temp_keycode)); + tap_code(KC_SPC); + } + return false; +#endif + case KC_B ... KC_D: + case KC_F ... KC_Z: + if (record->event.pressed) { + tap_code16(S(temp_keycode)); + tap_code(KC_SPC); + } + return false; + case KC_1 ... KC_0: + if (record->event.pressed) { + tap_code(temp_keycode); + tap_code(KC_SPC); + } + return false; + + case KC_BSPC: + if (record->event.pressed) { + tap_code(KC_BSPC); + tap_code(KC_BSPC); + } + return false; + case KC_SPC: + if (record->event.pressed) { + tap_code(KC_SPC); + tap_code(KC_SPC); + tap_code(KC_SPC); + } + return false; + } + } + + if (mode.australia) { + switch(temp_keycode) { + // IDEMPOTENT + case KC_L: + case KC_O: + case KC_S: + case KC_Z: + case KC_8: + case KC_0: + if (record->event.pressed) { + tap_code(temp_keycode); + tap_code(KC_LEFT); + } + return false; + + // INVERSE + case KC_B: + if (record->event.pressed) { + tap_code(KC_Q); + tap_code(KC_LEFT); + } + return false; + case KC_Q: + if (record->event.pressed) { + tap_code(KC_B); + tap_code(KC_LEFT); + } + return false; + case KC_D: + if (record->event.pressed) { + tap_code(KC_P); + tap_code(KC_LEFT); + } + return false; + case KC_P: + if (record->event.pressed) { + tap_code(KC_D); + tap_code(KC_LEFT); + } + return false; + case KC_N: + if (record->event.pressed) { + tap_code(KC_U); + tap_code(KC_LEFT); + } + return false; + case KC_U: + if (record->event.pressed) { + tap_code(KC_N); + tap_code(KC_LEFT); + } + return false; + case KC_6: + if (record->event.pressed) { + tap_code(KC_9); + tap_code(KC_LEFT); + } + return false; + case KC_9: + if (record->event.pressed) { + tap_code(KC_6); + tap_code(KC_LEFT); + } + return false; + + // TRANSLATE + case KC_A: + if (record->event.pressed) { + send_unicode_hex_string("0250"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_C: + if (record->event.pressed) { + send_unicode_hex_string("0254"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_E: + if (record->event.pressed) { + send_unicode_hex_string("01DD"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_F: + if (record->event.pressed) { + send_unicode_hex_string("025F"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_G: + if (record->event.pressed) { + send_unicode_hex_string("0183"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_H: + if (record->event.pressed) { + send_unicode_hex_string("0265"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_I: + if (record->event.pressed) { + send_unicode_hex_string("1D09"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_J: + if (record->event.pressed) { + send_unicode_hex_string("027E"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_K: + if (record->event.pressed) { + send_unicode_hex_string("029E"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_M: + if (record->event.pressed) { + send_unicode_hex_string("026F"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_R: + if (record->event.pressed) { + send_unicode_hex_string("0279"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_T: + if (record->event.pressed) { + send_unicode_hex_string("0287"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_V: + if (record->event.pressed) { + send_unicode_hex_string("028C"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_W: + if (record->event.pressed) { + send_unicode_hex_string("028D"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_X: + if (record->event.pressed) { + send_unicode_hex_string("2717"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_Y: + if (record->event.pressed) { + send_unicode_hex_string("028E"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_1: + if (record->event.pressed) { + send_unicode_hex_string("0269"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_2: + if (record->event.pressed) { + send_unicode_hex_string("3139"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_3: + if (record->event.pressed) { + send_unicode_hex_string("0190"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_4: + if (record->event.pressed) { + send_unicode_hex_string("3123"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_5: + if (record->event.pressed) { + send_unicode_hex_string("03DB"); + tap_code(KC_LEFT); + return false; + } + break; + case KC_7: + if (record->event.pressed) { + send_unicode_hex_string("3125"); + tap_code(KC_LEFT); + } + return false; + + // CONTROLS + case KC_ENT: + if (record->event.pressed) { + tap_code(KC_END); + tap_code(KC_ENTER); + } + return false; + case KC_BSPC: + if (record->event.pressed) { + tap_code(KC_DELT); + } + return false; + case KC_SPC: + if (record->event.pressed) { + tap_code(KC_SPC); + tap_code(KC_LEFT); + } + return false; + } + } + switch(keycode) { + + case VERSION: + if (!record->event.pressed) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD ":" QMK_KEYMAP "\nVersion:" QMK_VERSION ", built: " QMK_BUILDDATE "\n"), MACRO_TIMER); + } + break; + + case QWERTY ... COLEMAK: +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + case GREEK ... HIRAGAN: +#endif + if (record->event.pressed) { + //set_single_persistent_default_layer(keycode - QWERTY); + default_layer_set(1U << (keycode - QWERTY)); + } + break; + + case MAKE: + if (record->event.pressed) { + user_mod_state = get_mods() & MOD_MASK_CTRL; + if (user_mod_state) { + clear_mods(); + send_string_with_delay_P(PSTR("sleep 1 && "), MACRO_TIMER); + } + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); + if (user_mod_state) { + send_string_with_delay_P(PSTR(":flash\n"), MACRO_TIMER); + reset_keyboard(); + } else { + send_string_with_delay_P(PSTR("\n"), MACRO_TIMER); + } + } + break; + + case RNGWORD: + if (randword_seed == false) { + randword_seed = true; + srand(timer_read32()); + } + rand_key = rand() % NUMBER_OF_WORDS; + if (record->event.pressed) { + send_string(dict[rand_key]); + tap_code(KC_SPC); + } + break; + case RG_QUOT: if (record->event.pressed) { - user_key_timer = timer_read(); +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + user_mod_state = get_mods() & MOD_MASK_ALT; + if (user_mod_state) { + unregister_mods(MOD_BIT(KC_RALT)); + send_unicode_hex_string("00B0"); + |