Guest User

Untitled

a guest
Sep 9th, 2024
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 5.21 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.         }
  17.     return KC_TRNS;  // Defer to default definitions
  18.  
  19.     if (mods & MOD_MASK_CTRL) {  // Was Ctrl held?
  20.         switch (keycode) {
  21.             case KC_G:    return C(KC_Q);  // Ctrl + G reverses to Ctrl + Q
  22.             case KC_J:    return C(KC_Z);  // Ctrl + J reverses to Ctrl + Z
  23.             case KC_EQL:  return C(KC_0);  // Ctrl + = reverses to Ctrl + 0
  24.             case KC_MINS: return C(KC_0);  // Ctrl + - reverses to Ctrl + 0
  25.         }
  26.     }
  27.     return KC_TRNS;  // Defer to default definitions
  28.  
  29.     switch (keycode) {
  30.         case KC_A:  return KC_N;  // For "An" bigram
  31.         case KC_C:  return KC_E;  // For "Ce" bigram
  32.         case KC_D:  return KC_E;  // For "De" bigram
  33.         case KC_E:  return KC_R;  // For "Er" bigram
  34.         case KC_H:  return KC_E;  // For "He" bigram
  35.         case KC_I:  return KC_N;  // For "In" bigram
  36.         case KC_L:  return KC_O;  // For "Lo" bigram
  37.         case KC_O:  return KC_N;  // For "On" bigram
  38.         case KC_R:  return KC_E;  // For "Re" bigram
  39.         case KC_T:  return KC_H;  // For "Th" bigram
  40.         case KC_U:  return KC_N;  // For "Un" bigram
  41.     }
  42.     return KC_TRNS;  // Defer to default definitions
  43. }
  44.  
  45. [nix-shell:~/git/qmk_firmware-1]$ qmk compile -kb alps64 -km dlw1789
  46. Ψ 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"
  47.  
  48.  
  49. avr-gcc (GCC) 8.5.0
  50. Copyright (C) 2018 Free Software Foundation, Inc.
  51. This is free software; see the source for copying conditions.  There is NO
  52. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  53.  
  54. Size before:
  55.    text    data     bss     dec     hex filename
  56.       0   19942       0   19942    4de6 alps64_dlw1789.hex
  57.  
  58. Compiling: quantum/keymap_introspection.c                                                          In file included from quantum/quantum.h:154,
  59.                  from ./.build/obj_alps64_dlw1789/src/default_keyboard.h:27,
  60.                  from ./keyboards/alps64/keymaps/dlw1789/keymap.c:22,
  61.                  from quantum/keymap_introspection.c:5:
  62. ./keyboards/alps64/keymaps/dlw1789/keymap.c: In function ‘get_alt_repeat_key_keycode_user’:
  63. quantum/send_string/send_string.h:155:29: error: void value not ignored as it ought to be
  64.  #define SEND_STRING(string) send_string_with_delay_P(PSTR(string), 0)
  65.                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  66. ./keyboards/alps64/keymaps/dlw1789/keymap.c:561:24: note: in expansion of macro ‘SEND_STRING’
  67.                  return SEND_STRING(SS_TAP(X_BSPC)"Qu"); break;  // Erase the G and send an upper case Qu.
  68.                         ^~~~~~~~~~~
  69. quantum/send_string/send_string.h:155:29: error: void value not ignored as it ought to be
  70.  #define SEND_STRING(string) send_string_with_delay_P(PSTR(string), 0)
  71.                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  72. ./keyboards/alps64/keymaps/dlw1789/keymap.c:563:24: note: in expansion of macro ‘SEND_STRING’
  73.                  return SEND_STRING(SS_TAP(X_BSPC)"qu"); break;  // Erase the g and send a lower case qu.
  74.                         ^~~~~~~~~~~
  75. quantum/send_string/send_string.h:155:29: error: void value not ignored as it ought to be
  76.  #define SEND_STRING(string) send_string_with_delay_P(PSTR(string), 0)
  77.                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  78. ./keyboards/alps64/keymaps/dlw1789/keymap.c:567:24: note: in expansion of macro ‘SEND_STRING’
  79.                  return SEND_STRING(SS_TAP(X_BSPC)"Z"); break;  // Erase the J and send an upper case Z.
  80.                         ^~~~~~~~~~~
  81. quantum/send_string/send_string.h:155:29: error: void value not ignored as it ought to be
  82.  #define SEND_STRING(string) send_string_with_delay_P(PSTR(string), 0)
  83.                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  84. ./keyboards/alps64/keymaps/dlw1789/keymap.c:569:24: note: in expansion of macro ‘SEND_STRING’
  85.                  return SEND_STRING(SS_TAP(X_BSPC)"z"); break;  // Erase the j and send a lower case z.
  86.                         ^~~~~~~~~~~
  87.  [ERRORS]
  88.  |
  89.  |
  90.  |
  91. 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