diff options
Diffstat (limited to 'users/miles2go/babblePaste.h')
| -rw-r--r-- | users/miles2go/babblePaste.h | 50 |
1 files changed, 42 insertions, 8 deletions
diff --git a/users/miles2go/babblePaste.h b/users/miles2go/babblePaste.h index 606640227..8fc233e8d 100644 --- a/users/miles2go/babblePaste.h +++ b/users/miles2go/babblePaste.h | |||
| @@ -16,7 +16,8 @@ and jeebak & algernon's keymap | |||
| 16 | void set_babble_mode(uint8_t id); | 16 | void set_babble_mode(uint8_t id); |
| 17 | void babble_mode_increment(void); | 17 | void babble_mode_increment(void); |
| 18 | void babble_mode_decrement(void); | 18 | void babble_mode_decrement(void); |
| 19 | void babble_led_user(void); | 19 | void babble_modeswitch_user(uint8_t mode); |
| 20 | void babble_modeswitch_kb(uint8_t mode); | ||
| 20 | 21 | ||
| 21 | // manually re-order these if you want to set the order or default. | 22 | // manually re-order these if you want to set the order or default. |
| 22 | enum babble_modes { | 23 | enum babble_modes { |
| @@ -32,19 +33,24 @@ enum babble_modes { | |||
| 32 | # ifdef BABL_VI | 33 | # ifdef BABL_VI |
| 33 | BABL_VI_MODE, | 34 | BABL_VI_MODE, |
| 34 | # endif | 35 | # endif |
| 35 | # ifdef BABL_LINUX | ||
| 36 | BABL_LINUX_MODE, | ||
| 37 | # endif | ||
| 38 | # ifdef BABL_EMACS | 36 | # ifdef BABL_EMACS |
| 39 | BABL_EMACS_MODE, | 37 | BABL_EMACS_MODE, |
| 40 | # endif | 38 | # endif |
| 39 | # ifdef BABL_NANO | ||
| 40 | BABL_NANO_MODE, | ||
| 41 | # endif | ||
| 42 | # ifdef BABL_KITTY | ||
| 43 | BABL_KITTY_MODE, | ||
| 44 | # endif | ||
| 41 | # ifdef BABL_CHROMEOS | 45 | # ifdef BABL_CHROMEOS |
| 42 | BABL_CHROMEOS_MODE, | 46 | BABL_CHROMEOS_MODE, |
| 43 | # endif | 47 | # endif |
| 48 | # ifdef BABL_LINUX | ||
| 49 | BABL_LINUX_MODE, | ||
| 50 | # endif | ||
| 44 | BABL_MODEMAX | 51 | BABL_MODEMAX |
| 45 | }; | 52 | }; |
| 46 | 53 | ||
| 47 | // void babble_led_user( uint8_t id) | ||
| 48 | 54 | ||
| 49 | /// Hacks to make it easier to create sendstring macros | 55 | /// Hacks to make it easier to create sendstring macros |
| 50 | 56 | ||
| @@ -79,6 +85,13 @@ enum babble_modes { | |||
| 79 | 85 | ||
| 80 | enum babble_keycodes { | 86 | enum babble_keycodes { |
| 81 | FIRST = BABBLE_START, | 87 | FIRST = BABBLE_START, |
| 88 | BABL_MODE_INCREMENT, | ||
| 89 | BABL_MODE_DECREMENT, | ||
| 90 | # ifdef BABL_MODSWAP | ||
| 91 | BABL_PRIMARY_OS_MOD, | ||
| 92 | BABL_SECONDARY_OS_MOD, | ||
| 93 | BABL_TERTIARY_OS_MOD, | ||
| 94 | # endif | ||
| 82 | # ifdef BABL_MOVE | 95 | # ifdef BABL_MOVE |
| 83 | // Movement macros | 96 | // Movement macros |
| 84 | // left & right | 97 | // left & right |
| @@ -171,6 +184,7 @@ enum babble_keycodes { | |||
| 171 | # endif // BABL_APP_CELLS | 184 | # endif // BABL_APP_CELLS |
| 172 | # ifdef BABL_APP_EDITOR | 185 | # ifdef BABL_APP_EDITOR |
| 173 | BABL_APP_MULTI_SELECT, /* www.sublimetext.com/docs/2/multiple_selection_with_the_keyboard.html */ | 186 | BABL_APP_MULTI_SELECT, /* www.sublimetext.com/docs/2/multiple_selection_with_the_keyboard.html */ |
| 187 | BABL_APP_SET_MARK, // set editor mark | ||
| 174 | # endif // BABL_APP_EDITOR | 188 | # endif // BABL_APP_EDITOR |
| 175 | # ifdef BABL_APP_WINDOWSPLITTING | 189 | # ifdef BABL_APP_WINDOWSPLITTING |
| 176 | // These aren't useful on most oses. | 190 | // These aren't useful on most oses. |
| @@ -197,6 +211,12 @@ enum babble_keycodes { | |||
| 197 | # ifdef BABL_EMACS | 211 | # ifdef BABL_EMACS |
| 198 | BABL_DO_EMACS, | 212 | BABL_DO_EMACS, |
| 199 | # endif | 213 | # endif |
| 214 | # ifdef BABL_NANO | ||
| 215 | BABL_DO_NANO, | ||
| 216 | # endif | ||
| 217 | # ifdef BABL_KITTY | ||
| 218 | BABL_DO_KITTY, | ||
| 219 | # endif | ||
| 200 | # ifdef BABL_VI | 220 | # ifdef BABL_VI |
| 201 | BABL_DO_VI, | 221 | BABL_DO_VI, |
| 202 | # endif | 222 | # endif |
| @@ -210,7 +230,7 @@ enum babble_keycodes { | |||
| 210 | }; | 230 | }; |
| 211 | 231 | ||
| 212 | // primary function. | 232 | // primary function. |
| 213 | bool babblePaste(uint16_t keycode); | 233 | bool babblePaste(uint16_t keycode, bool is_pressed); |
| 214 | 234 | ||
| 215 | /****************************************************/ | 235 | /****************************************************/ |
| 216 | /* All per-os includes and short mode switch macros*/ | 236 | /* All per-os includes and short mode switch macros*/ |
| @@ -230,6 +250,14 @@ bool babblePaste_linux(uint16_t keycode); | |||
| 230 | # define B_EMACS BABL_DO_EMACS | 250 | # define B_EMACS BABL_DO_EMACS |
| 231 | bool babblePaste_emacs(uint16_t keycode); | 251 | bool babblePaste_emacs(uint16_t keycode); |
| 232 | # endif | 252 | # endif |
| 253 | # ifdef BABL_NANO | ||
| 254 | # define B_NANO BABL_DO_NANO | ||
| 255 | bool babblePaste_nano(uint16_t keycode); | ||
| 256 | # endif | ||
| 257 | # ifdef BABL_KITTY | ||
| 258 | # define B_KITTY BABL_DO_KITTY | ||
| 259 | bool babblePaste_kitty(uint16_t keycode); | ||
| 260 | # endif | ||
| 233 | # ifdef BABL_VI | 261 | # ifdef BABL_VI |
| 234 | # define B_VI BABL_DO_VI | 262 | # define B_VI BABL_DO_VI |
| 235 | bool babblePaste_vi(uint16_t keycode); | 263 | bool babblePaste_vi(uint16_t keycode); |
| @@ -243,12 +271,17 @@ bool babblePaste_readmux(uint16_t keycode); | |||
| 243 | bool babblePaste_chromeos(uint16_t keycode); | 271 | bool babblePaste_chromeos(uint16_t keycode); |
| 244 | # endif | 272 | # endif |
| 245 | 273 | ||
| 246 | # define BABL_INC babble_mode_increment(); | ||
| 247 | # define BABL_DEC babble_mode_decrement(); | ||
| 248 | 274 | ||
| 249 | /**************************************************** | 275 | /**************************************************** |
| 250 | ** All keyboard macros for Babble Actions | 276 | ** All keyboard macros for Babble Actions |
| 251 | *****************************************************/ | 277 | *****************************************************/ |
| 278 | # define B_INC BABL_MODE_INCREMENT | ||
| 279 | # define B_DEC BABL_MODE_DECREMENT | ||
| 280 | # ifdef BABL_MODSWAP | ||
| 281 | # define B_1ME BABL_PRIMARY_OS_MOD | ||
| 282 | # define B_2ME BABL_SECONDARY_OS_MOD | ||
| 283 | # define B_3ME BABL_TERTIARY_OS_MOD | ||
| 284 | # endif | ||
| 252 | 285 | ||
| 253 | # ifdef BABL_MOVE | 286 | # ifdef BABL_MOVE |
| 254 | # define B_L1C BABL_GO_LEFT_1C | 287 | # define B_L1C BABL_GO_LEFT_1C |
| @@ -334,6 +367,7 @@ bool babblePaste_chromeos(uint16_t keycode); | |||
| 334 | # endif // BABL_APP_CELLS | 367 | # endif // BABL_APP_CELLS |
| 335 | # ifdef BABL_APP_EDITOR | 368 | # ifdef BABL_APP_EDITOR |
| 336 | # define B_MSEL BABL_APP_MULTI_SELECT | 369 | # define B_MSEL BABL_APP_MULTI_SELECT |
| 370 | # define B_MARK BABL_APP_SET_MARK | ||
| 337 | /* www.sublimetext.com/docs/2/multiple_selection_with_the_keyboard.html */ | 371 | /* www.sublimetext.com/docs/2/multiple_selection_with_the_keyboard.html */ |
| 338 | # endif // BABL_APP_EDITOR | 372 | # endif // BABL_APP_EDITOR |
| 339 | # ifdef BABL_APP_WINDOWSPLITTING | 373 | # ifdef BABL_APP_WINDOWSPLITTING |
