Guest User

Untitled

a guest
Sep 5th, 2024
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 4.98 KB | None | 0 0
  1. uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) {
  2.     bool shifted = (mods & MOD_MASK_SHIFT);  // Was Shift held? - get_oneshot_mods() ???
  3.     switch (keycode) {
  4.         case KC_G:
  5.             if (shifted) {
  6.                 return SEND_STRING(SS_TAP(X_BSPC)"Qu"); break;  // Erase the G and send an upper case Qu.
  7.             } else {                                            // Otherwise, the last key was lower case g,
  8.                 return SEND_STRING(SS_TAP(X_BSPC)"qu"); break;  // Erase the g and send a lower case qu.
  9.             }
  10.         case KC_J:
  11.             if (shifted) {
  12.                 return SEND_STRING(SS_TAP(X_BSPC)"Z"); break;  // Erase the J and send an upper case Z.
  13.             } else {                                           // Otherwise, the last key was lower case j,
  14.                 return SEND_STRING(SS_TAP(X_BSPC)"z"); break;  // Erase the j and send a lower case z.
  15.             }
  16.     return true;
  17.     }
  18.     if (mods & MOD_MASK_CTRL) {       // Was Ctrl held?
  19.         switch (keycode) {
  20.             case KC_G:    return C(KC_Q);  // Ctrl + G reverses to Ctrl + Q.
  21.             case KC_J:    return C(KC_Z);  // Ctrl + J reverses to Ctrl + Z.
  22.             case KC_EQL:  return C(KC_0);  // Ctrl + = reverses to Ctrl + 0.
  23.             case KC_MINS: return C(KC_0);  // Ctrl + - reverses to Ctrl + 0.
  24.         }
  25.     return KC_TRNS;
  26.     }
  27.     switch (keycode) {
  28.         case KC_A:    return KC_N;  // For "An" bigram.
  29.         case KC_E:    return KC_R;  // For "Er" bigram.
  30.         case KC_H:    return KC_E;  // For "He" bigram.
  31.         case KC_I:    return KC_N;  // For "In" bigram.
  32.         case KC_N:    return KC_D;  // For "Nd" bigram.
  33.         case KC_O:    return KC_N;  // For "On" bigram.
  34.         case KC_R:    return KC_E;  // For "Re" bigram.
  35.         case KC_T:    return KC_H;  // For "Th" bigram.
  36.     }
  37.     return KC_TRNS;
  38. }
  39.  
  40.  
  41. [nix-shell:~/git/qmk_firmware-1]$ qmk compile -kb alps64 -km dlw1789
  42. Ψ Compiling keymap with make -r -R -f builddefs/build_keyboard.mk -s KEYBOARD=alps64 KEYMAP=dlw1789 KEYBOARD_FILESAFE=alps64 TARGET=alps64_dlw1789 INTERMEDIATE_OUTPUT=.build/obj_alps64_dlw1789 VERBOSE=false COLOR=true SILENT=false QMK_BIN="qmk"
  43.  
  44.  
  45. avr-gcc (GCC) 8.5.0
  46. Copyright (C) 2018 Free Software Foundation, Inc.
  47. This is free software; see the source for copying conditions.  There is NO
  48. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  49.  
  50. Size before:
  51.    text    data     bss     dec     hex filename
  52.       0   19552       0   19552    4c60 alps64_dlw1789.hex
  53.  
  54. Compiling: quantum/keymap_introspection.c                                                          In file included from quantum/quantum.h:154,
  55.                  from ./.build/obj_alps64_dlw1789/src/default_keyboard.h:27,
  56.                  from ./keyboards/alps64/keymaps/dlw1789/keymap.c:22,
  57.                  from quantum/keymap_introspection.c:5:
  58. ./keyboards/alps64/keymaps/dlw1789/keymap.c: In function ‘get_alt_repeat_key_keycode_user’:
  59. quantum/send_string/send_string.h:155:29: error: void value not ignored as it ought to be
  60.  #define SEND_STRING(string) send_string_with_delay_P(PSTR(string), 0)
  61.                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  62. ./keyboards/alps64/keymaps/dlw1789/keymap.c:561:24: note: in expansion of macro ‘SEND_STRING’
  63.                  return SEND_STRING(SS_TAP(X_BSPC)"Qu"); break;  // Erase the G and send an upper case Qu.
  64.                         ^~~~~~~~~~~
  65. quantum/send_string/send_string.h:155:29: error: void value not ignored as it ought to be
  66.  #define SEND_STRING(string) send_string_with_delay_P(PSTR(string), 0)
  67.                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  68. ./keyboards/alps64/keymaps/dlw1789/keymap.c:563:24: note: in expansion of macro ‘SEND_STRING’
  69.                  return SEND_STRING(SS_TAP(X_BSPC)"qu"); break;  // Erase the g and send a lower case qu.
  70.                         ^~~~~~~~~~~
  71. quantum/send_string/send_string.h:155:29: error: void value not ignored as it ought to be
  72.  #define SEND_STRING(string) send_string_with_delay_P(PSTR(string), 0)
  73.                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  74. ./keyboards/alps64/keymaps/dlw1789/keymap.c:567:24: note: in expansion of macro ‘SEND_STRING’
  75.                  return SEND_STRING(SS_TAP(X_BSPC)"Z"); break;  // Erase the J and send an upper case Z.
  76.                         ^~~~~~~~~~~
  77. quantum/send_string/send_string.h:155:29: error: void value not ignored as it ought to be
  78.  #define SEND_STRING(string) send_string_with_delay_P(PSTR(string), 0)
  79.                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  80. ./keyboards/alps64/keymaps/dlw1789/keymap.c:569:24: note: in expansion of macro ‘SEND_STRING’
  81.                  return SEND_STRING(SS_TAP(X_BSPC)"z"); break;  // Erase the j and send a lower case z.
  82.                         ^~~~~~~~~~~
  83.  [ERRORS]
  84.  |
  85.  |
  86.  |
  87. make: *** [builddefs/common_rules.mk:373: .build/obj_alps64_dlw1789/quantum/keymap_introspection.o] Error 1
Advertisement
Add Comment
Please, Sign In to add comment