summaryrefslogtreecommitdiffstats
path: root/keyboards/handwired/MS-sculpt-mobile/babblePaste.h
diff options
context:
space:
mode:
authormilestogo <milestogo@users.noreply.github.com>2017-03-08 01:06:25 -0800
committermilestogo <milestogo@users.noreply.github.com>2017-03-08 01:06:25 -0800
commit01980c96e9c1e8ab5aad0e89d03c0e15417712c8 (patch)
tree6dbc8e0536794aca09184553ec00a895dae8452a /keyboards/handwired/MS-sculpt-mobile/babblePaste.h
parent2f677c24a8fcf936e92a0a5acfbbf95b5f47fdb7 (diff)
added browser babble, removed code from keymap
Diffstat (limited to 'keyboards/handwired/MS-sculpt-mobile/babblePaste.h')
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/babblePaste.h151
1 files changed, 140 insertions, 11 deletions
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h
index 313fa80ec4..67153fb0d8 100644
--- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h
+++ b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h
@@ -10,6 +10,8 @@ and jeebak & algernon's keymap
#ifndef _babblePaste_h_included__
#define _babblePaste_h_included__
#include "action_layer.h"
+#include "quantum_keycodes.h"
+#include "config.h"
#ifdef USE_BABLPASTE
@@ -39,23 +41,28 @@ and jeebak & algernon's keymap
/* Macros handled by babblepaste. Most should be available for all platforms.
Whatever isn't defined will NOP */
enum {
-
- // Movement
- BABL_DEL_RIGHT_1C= BABL_START_NUM,
- BABL_DEL_LEFT_WORD,
- BABL_DEL_RIGHT_WORD,
- BABL_GO_LEFT_1C,
+// Movement macros
+ // left & right
+ BABL_GO_LEFT_1C= BABL_START_NUM,
BABL_GO_RIGHT_1C,
- BABL_GO_LEFT_WORD,
+ BABL_GO_LEFT_WORD,
BABL_GO_RIGHT_WORD,
BABL_GO_START_LINE,
BABL_GO_END_LINE,
+ // now up & down
BABL_GO_START_DOC,
BABL_GO_END_DOC,
BABL_GO_NEXT_LINE,
BABL_GO_PREV_LINE,
BABL_PGDN,
BABL_PGUP,
+ // And the delete options
+ //BABL_DEL_LEFT_1C == backspace, so why bother.
+ BABL_DEL_RIGHT_1C, // usually = Del
+ BABL_DEL_LEFT_WORD,
+ BABL_DEL_RIGHT_WORD,
+ BABL_DEL_TO_LINE_END, // delete from cursor to end of line
+ BABL_DEL_TO_LINE_START, // delete from cursor to begining line
#ifndef BABL_MOVEMENTONLY
// Cut & Paste
BABL_UNDO,
@@ -64,20 +71,142 @@ enum {
BABL_COPY,
BABL_PASTE,
BABL_SELECT_ALL,
- // GUI or app
+ /* not yet implemented
+ BABL_SWAP_LAST2C // swap last characters before the cursor
+ BABL_SWAP_LAST2W // Swap the last two words before the cursor
+ */
+ // find & replace
BABL_FIND,
BABL_FIND_NEXT,
BABL_FIND_REPLACE,
+ // GUI or app
BABL_RUNAPP,
BABL_SWITCH_APP_NEXT,
BABL_SWITCH_APP_LAST, // previous
BABL_CLOSE_APP,
- BABL_HELP
+ BABL_HELP,
+
+#ifndef BABL_NOBROWSER
+ BABL_BROWSER_NEW_TAB,
+ BABL_BROWSER_CLOSE_TAB,
+ BABL_BROWSER_REOPEN_LAST_TAB,
+ BABL_BROWSER_NEXT_TAB,
+ BABL_BROWSER_PREV_TAB,
+ BABL_BROWSER_URL_BAR,
+ BABL_BROWSER_FORWARD,
+ BABL_BROWSER_BACK,
+ BABL_BROWSER_FIND,
+ BABL_BROWSER_BOOKMARK,
+ BABL_BROWSER_DEV_TOOLS, // hard one to remember
+ BABL_BROWSER_RELOAD,
+ BABL_BROWSER_FULLSCREEN,
+ BABL_BROWSER_ZOOM_IN,
+ BABL_BROWSER_ZOOM_OUT,
+
+#endif
+
#endif
+// Macros for mode switching
+#ifdef MS_MODE
+ BABL_WINDOWS,
+#endif
+#ifdef MAC_MODE
+ BABL_MAC,
+#endif
+#ifdef LINUX_MODE
+ BABL_LINUX,
+#endif
+#ifdef EMACS_MODE
+ BABL_EMACS,
+#endif
+#ifdef VI_MODE
+ BABL_VI,
+#endif
+#ifdef READMUX_MODE
+ BABL_READLINE,
+#endif
+
+
};
-// How many macros/ how many array elements?
-#define BABL_NUM_MACROS 28
+// BUG, used to jump to babble functiion. Surely there is a way to calculate size of enum?
+#define BABL_NUM_MACROS 48 + 4 // 48 + # of defined modes.
+
+/* And all the shorthand keymap ready versions */
+// First the mode switching macros
+#ifdef MS_MODE
+#define B_WIN M(BABL_WINDOWS)
+#endif
+#ifdef MAC_MODE
+#define B_MAC M(BABL_MAC)
+#endif
+#ifdef LINUX_MODE
+#define B_LNX M(BABL_LINUX)
+#endif
+#ifdef EMACS_MODE
+#define B_EMAX M(BABL_EMACS)
+#endif
+#ifdef VI_MODE
+#define B_VI M(BABL_VI)
+#endif
+#ifdef READMUX_MODE
+#define B_READ M(BABL_READLINE)
+#endif
+
+// and all the movement & action.
+
+#define B_L1C M(BABL_GO_LEFT_1C)
+#define B_R1C M(BABL_GO_RIGHT_1C)
+#define B_L1W M(BABL_GO_LEFT_WORD)
+#define B_R1W M(BABL_GO_RIGHT_WORD)
+#define B_GSOL M(BABL_GO_START_LINE)
+#define B_GEOL M(BABL_GO_END_LINE)
+#define B_GTOP M(BABL_GO_START_DOC)
+#define B_GEND M(BABL_GO_END_DOC)
+#define B_DOWN M(BABL_GO_NEXT_LINE)
+#define B_UP M(BABL_GO_PREV_LINE)
+#define B_PGDN M(BABL_PGDN)
+#define B_PGUP M(BABL_PGUP)
+//#define B_BKSP M(BABL_DEL_LEFT_1C) == backspace so why bother.
+#define B_DEL M(BABL_DEL_RIGHT_1C) // usually = Del
+#define B_DLW M(BABL_DEL_LEFT_WORD)
+#define B_DRW M(BABL_DEL_RIGHT_WORD)
+#define B_DEOL M(BABL_DEL_TO_LINE_END) // delete from cursor to end of line
+#define B_DSOL M(BABL_DEL_TO_LINE_START) // delete from cursor to begining line
+#define B_UNDO M(BABL_UNDO)
+#define B_REDO M(BABL_REDO)
+#define B_CUT M(BABL_CUT)
+#define B_COPY M(BABL_COPY)
+#define B_PAST M(BABL_PASTE)
+#define B_SELA M(BABL_SELECT_ALL)
+#define B_FIND M(BABL_FIND)
+#define B_FINDN M(BABL_FIND_NEXT)
+#define B_FINDR M(BABL_FIND_REPLACE)
+#define B_RAPP M(BABL_RUNAPP)
+#define B_NAPP M(BABL_SWITCH_APP_NEXT)
+#define B_PAPP M(BABL_SWITCH_APP_LAST) // previous
+#define B_CAPP M(BABL_CLOSE_APP)
+#define B_HELP M(BABL_HELP)
+#define B_NTAB M(BABL_BROWSER_NEW_TAB)
+#define B_CTAB M(BABL_BROWSER_CLOSE_TAB)
+#define B_ROTB M(BABL_BROWSER_REOPEN_LAST_TAB)
+#define B_NXTB M(BABL_BROWSER_NEXT_TAB)
+#define B_PTAB M(BABL_BROWSER_PREV_TAB)
+#define B_NURL M(BABL_BROWSER_URL_BAR)
+#define B_BFWD M(BABL_BROWSER_FORWARD)
+#define B_BBAK M(BABL_BROWSER_BACK)
+#define B_BFND M(BABL_BROWSER_FIND)
+#define B_BOOK M(BABL_BROWSER_BOOKMARK)
+#define B_BDEV M(BABL_BROWSER_DEV_TOOLS) // hard one to remember
+#define B_BRLD M(BABL_BROWSER_RELOAD)
+#define B_BFUlL M(BABL_BROWSER_FULLSCREEN)
+#define B_ZMIN M(BABL_BROWSER_ZOOM_IN)
+#define B_ZMOT M(BABL_BROWSER_ZOOM_OUT)
+
+
+
+
+
/* from action_macro.h