mirror of
https://github.com/qmk/qmk_userspace.git
synced 2026-03-10 10:20:23 -04:00
handle backspace in record_send_string; add practice.txt
This commit is contained in:
parent
581ef8f672
commit
e0fa879454
4 changed files with 19 additions and 11 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
|
#include "magic_sturdy/general.h"
|
||||||
#include "../__init__.h"
|
#include "../__init__.h"
|
||||||
|
|
||||||
int mag1_key_count = 0;
|
int mag1_key_count = 0;
|
||||||
|
|
@ -25,7 +26,8 @@ void refresh_token(void) {
|
||||||
|
|
||||||
void record_send_string(const char *str) {
|
void record_send_string(const char *str) {
|
||||||
for (int i = 0; str[i] != '\0'; i++) {
|
for (int i = 0; str[i] != '\0'; i++) {
|
||||||
if (65 <= str[i] && str[i] <= 90) enqueue(str[i] - 61);
|
if (str[i] == 11) dequeue();
|
||||||
|
else if (65 <= str[i] && str[i] <= 90) enqueue(str[i] - 61);
|
||||||
else if (97 <= str[i] && str[i] <= 122) enqueue(str[i] - 93);
|
else if (97 <= str[i] && str[i] <= 122) enqueue(str[i] - 93);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#include "../__init__.h"
|
#include "../__init__.h"
|
||||||
|
|
||||||
#define PREV_KEYS_QUEUE_SIZE 10
|
#define PREV_KEYS_QUEUE_SIZE 10
|
||||||
#define MAGIC_KEY_TIMEOUT 1500
|
#define MAGIC_KEY_TIMEOUT 2000
|
||||||
|
|
||||||
bool sturdy_pr(uint16_t keycode, keyrecord_t *record, bool *return_value);
|
bool sturdy_pr(uint16_t keycode, keyrecord_t *record, bool *return_value);
|
||||||
bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, uint8_t* mods);
|
bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, uint8_t* mods);
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@
|
||||||
|
|
||||||
void process_magic_key_1(void) {
|
void process_magic_key_1(void) {
|
||||||
if (mag1_key_count >= 2) {
|
if (mag1_key_count >= 2) {
|
||||||
|
switch (queue(-5)) {
|
||||||
|
quintuple_magic_case(KC_J, KC_U, KC_D, KC_G, KC_E, "\bment");
|
||||||
|
}
|
||||||
switch (queue(-4)) {
|
switch (queue(-4)) {
|
||||||
quadruple_magic_case(KC_SPC, KC_A, KC_L, KC_R, "eady");
|
quadruple_magic_case(KC_SPC, KC_A, KC_L, KC_R, "eady");
|
||||||
quadruple_magic_switch(KC_J,
|
quadruple_magic_switch(KC_J,
|
||||||
|
|
@ -57,7 +60,7 @@ void process_magic_key_1(void) {
|
||||||
magic_case(KC_L, "ieve");
|
magic_case(KC_L, "ieve");
|
||||||
);
|
);
|
||||||
|
|
||||||
double_magic_case(KC_U, KC_D, "g");
|
double_magic_case(KC_U, KC_D, "ge");
|
||||||
);
|
);
|
||||||
|
|
||||||
triple_magic_switch(KC_V,
|
triple_magic_switch(KC_V,
|
||||||
|
|
@ -95,7 +98,7 @@ void process_magic_key_1(void) {
|
||||||
double_magic_case(KC_N, KC_Y, "way");
|
double_magic_case(KC_N, KC_Y, "way");
|
||||||
);
|
);
|
||||||
|
|
||||||
triple_magic_case(KC_J, KC_U, KC_D, "g");
|
triple_magic_case(KC_J, KC_U, KC_D, "ge");
|
||||||
triple_magic_case(KC_O, KC_B, KC_V, "ious");
|
triple_magic_case(KC_O, KC_B, KC_V, "ious");
|
||||||
triple_magic_case(KC_H, KC_I, KC_L, "arious");
|
triple_magic_case(KC_H, KC_I, KC_L, "arious");
|
||||||
}
|
}
|
||||||
|
|
@ -193,6 +196,8 @@ void process_magic_key_2(void) {
|
||||||
double_magic_case(KC_B, KC_O, "ut");
|
double_magic_case(KC_B, KC_O, "ut");
|
||||||
double_magic_case(KC_N, KC_Y, "where");
|
double_magic_case(KC_N, KC_Y, "where");
|
||||||
);
|
);
|
||||||
|
|
||||||
|
triple_magic_case(KC_R, KC_S, KC_C, "hool");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (queue(-2)) {
|
switch (queue(-2)) {
|
||||||
|
|
@ -280,7 +285,7 @@ void process_magic_key_3(void) {
|
||||||
magic_case(KC_U, "pgrade");
|
magic_case(KC_U, "pgrade");
|
||||||
magic_case(KC_O, "ther");
|
magic_case(KC_O, "ther");
|
||||||
magic_case(KC_A, "fter");
|
magic_case(KC_A, "fter");
|
||||||
magic_case(KC_P, "sych");
|
magic_case(KC_P, "ower");
|
||||||
magic_case(KC_I, "'ll");
|
magic_case(KC_I, "'ll");
|
||||||
magic_case(KC_K, "now");
|
magic_case(KC_K, "now");
|
||||||
magic_case(KC_T, "hough");
|
magic_case(KC_T, "hough");
|
||||||
|
|
@ -288,7 +293,7 @@ void process_magic_key_3(void) {
|
||||||
magic_case(KC_M, "ight");
|
magic_case(KC_M, "ight");
|
||||||
magic_case(KC_R, "ight");
|
magic_case(KC_R, "ight");
|
||||||
magic_case(KC_J, "udge");
|
magic_case(KC_J, "udge");
|
||||||
magic_case(KC_C, "hord");
|
magic_case(KC_C, "onsider");
|
||||||
magic_case(KC_D, "evelop");
|
magic_case(KC_D, "evelop");
|
||||||
magic_case(KC_G, "overn");
|
magic_case(KC_G, "overn");
|
||||||
magic_case(KC_W, "here");
|
magic_case(KC_W, "here");
|
||||||
|
|
@ -302,17 +307,17 @@ void process_magic_key_3(void) {
|
||||||
void process_magic_key_4(void) {
|
void process_magic_key_4(void) {
|
||||||
switch (queue(-1)) {
|
switch (queue(-1)) {
|
||||||
magic_case(KC_B, "etween");
|
magic_case(KC_B, "etween");
|
||||||
magic_case(KC_N, "umber");
|
magic_case(KC_N, "ation");
|
||||||
magic_case(KC_U, "pdate");
|
magic_case(KC_U, "nivers");
|
||||||
magic_case(KC_O, "ught");
|
magic_case(KC_O, "ption");
|
||||||
magic_case(KC_A, "gainst");
|
magic_case(KC_A, "gainst");
|
||||||
magic_case(KC_P, "rogram");
|
magic_case(KC_P, "rogram");
|
||||||
magic_case(KC_I, "'m");
|
magic_case(KC_I, "'m");
|
||||||
magic_case(KC_T, "hrough");
|
magic_case(KC_T, "echnology");
|
||||||
magic_case(KC_M, "anage");
|
magic_case(KC_M, "anage");
|
||||||
magic_case(KC_C, "rowd");
|
magic_case(KC_C, "rowd");
|
||||||
magic_case(KC_W, "orld");
|
magic_case(KC_W, "orld");
|
||||||
magic_case(KC_S, "chool");
|
magic_case(KC_S, "ervice");
|
||||||
magic_case(KC_E, "'re");
|
magic_case(KC_E, "'re");
|
||||||
magic_case(KC_DOT, "com");
|
magic_case(KC_DOT, "com");
|
||||||
magic_case(KC_COMM, " since");
|
magic_case(KC_COMM, " since");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
the be of and a to in he have it that for they I with as not on she at by this we you do but from or which one would all will there say who make when can more if no man out other so what time up go about than into could state only new year some take come these know see use get like then first any work now may such give over think most even find day also after way many must look before great back through long where much should well people down own just because good each those feel seem how high too place little world very still nation hand old life tell write become here show house both between need mean call develop under last right move thing general school never same another begin while number part turn real leave might want point form off child few small since against ask late home interest large person end open public follow during present without again hold govern around possible head consider word program problem however lead system set order eye plan run keep face fact group play stand increase early course change help line power powerschool oxygen already alright judge judgment above edge ledge bridge inform information various video different difference definite definitely anyway anywhere obvious hilarious page previous dry list vision division question view review light don't zero update upgrade enough often ought bought fought fraught caught success successful access crack quite quiet neighbor mother brother though thought crowd govern government manage nation network service university universe
|
||||||
Loading…
Add table
Add a link
Reference in a new issue