babblePaste.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* A library to output the right key shortcut in any common app.
  2. Given a global variable babble_mode to show the environment and a
  3. key that calls the paste macro, do the right type of paste.
  4. Setting the bable_mode is done by another macro, or TBD interaction with the host.
  5. Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
  6. and jeebak & algernon's keymap
  7. */
  8. #ifndef _babblePaste_h_included__
  9. #define _babblePaste_h_included__
  10. /* Add this to your config.h
  11. // Uncomment any modes you want.
  12. // Windows.
  13. //#define MS_MODE 0
  14. //#define MAC_MODE 1
  15. //aka gnome+KDE
  16. //#define LINUX_MODE 2
  17. //#define EMACS_MODE 3
  18. //#define VI_MODE 4
  19. //#define WORDSTAR_MODE 5
  20. // Readline and tmux
  21. //#define READMUX 6
  22. */
  23. /* Macros handled by babblepaste. Most should be available for all platforms. */
  24. enum {
  25. // Movement
  26. BABL_DEL_RIGHT_1C=200,
  27. BABL_DEL_LEFT_WORD,
  28. BABL_DEL_RIGHT_WORD,
  29. BABL_GO_LEFT_1C,
  30. BABL_GO_RIGHT_1C,
  31. BABL_GO_LEFT_WORD,
  32. BABL_GO_RIGHT_WORD,
  33. BABL_GO_START_LINE,
  34. BABL_GO_END_LINE,
  35. BABL_GO_START_DOC,
  36. BABL_GO_END_DOC,
  37. BABL_GO_NEXT_LINE,
  38. BABL_GO_PREV_LINE,
  39. BABL_PGDN,
  40. BABL_PGUP,
  41. #ifndef BABL_MOVEMENTONLY
  42. // Cut & Paste
  43. BABL_UNDO,
  44. BABL_REDO,
  45. BABL_CUT,
  46. BABL_COPY,
  47. BABL_PASTE,
  48. BABL_SELECT_ALL,
  49. // GUI or app
  50. BABL_FIND,
  51. BABL_FIND_NEXT,
  52. BABL_FIND_REPLACE,
  53. BABL_RUNAPP,
  54. BABL_SWITCH_APP_NEXT,
  55. BABL_SWITCH_APP_LAST, // previous
  56. BABL_CLOSE_APP,
  57. BABL_HELP
  58. #endif
  59. };
  60. //static macro_t *babblePaste(keyrecord_t *record, uint16_t shortcut)
  61. #endif