macro_t* switch_babble_mode( uint8_t id) {
babble_mode= id;
- return MACRO_NONE; //less typing above
+ return MACRO_NONE; //less typing where called
}
return MACRO_NONE;
}
*/
- switch(babble_mode) {
-
-
+
+
+#ifdef MS_MODE
+ if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); }
+#endif
+#ifdef MAC_MODE
+ if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); }
+#endif
+#ifdef LINUX_MODE
+ if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); }
+#endif
+ #ifdef READMUX_MODE
+ if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; }
+#endif
+#ifdef VI_MODE
+ if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); }
+#endif
+#ifdef EMACS_MODE
+ if ( BABL_EMACS == shortcut ) { return switch_babble_mode(EMACS_MODE); }
+#endif
+
+
+
+ switch(babble_mode) {
#ifdef MS_MODE
- if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); }
case MS_MODE:
BABLM( BABL_GO_LEFT_1C, T(LEFT), END );
#ifdef LINUX_MODE
- if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); }
case LINUX_MODE:
BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
#endif
#ifdef MAC_MODE
- if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); }
case MAC_MODE:
BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
#ifdef EMACS_MODE
- if ( BABL_EMACS == shortcut ) { return switch_babble_mode(EMACS_MODE); }
-
case EMACS_MODE:
switch(shortcut) {
//probably should allow meta to not be ALT
#ifdef VI_MODE
- if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); }
case VI_MODE:
// you have to track the modes yourself. Otherwise motion is awful (bell, bell, bell)
#ifdef READMUX_MODE
// Readline command line editing + tmux windowing
// I havent decided how much to do readline and how much tmux
- if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; }
+
+
case READMUX_MODE:
BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
/* ***************************
// Uncomment any modes you want. Whatever mode = 0 will be the default on boot
+// Expect to get errors if you comment a feature out and leave it in your keymap.
+
+#define USE_BABLPASTE
//#define MS_MODE 0 // Windows.
//#define MAC_MODE 1
//#define VI_MODE 4
//#define WORDSTAR_MODE 5
//#define READMUX 6 // Readline and tmux
+
+// This removes everything but cursor movement
+//#define BABL_MOVEMENTONLY
+// and this just removes browser shortcuts
+//#define BABL_NOBROWSER
****************************/
};
// 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.
+#define BABL_NUM_MACROS 48+4 // 48 + # of defined modes.
/* And all the shorthand keymap ready versions */
// First the mode switching macros
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER Microsoftplus
-#define PRODUCT sculpt mobile
#define DESCRIPTION 6000
/* key matrix size */
#define MATRIX_COLS 18
#ifdef ASTAR
-
+#define PRODUCT sculpt mobile astar
/*0 1 2 3 4 5 6 7 8 */
#define MATRIX_ROW_PINS {D7, C6, D4, D0, D1, D3, D2, E2}
/* A B C D E F G H I J K L M N O P Q R */
#define MATRIX_COL_PINS {B4, B5, E6, B7, B6, D6, C7, F7, F6, F4,F5, F1,F0, D5, B0, B1, B2, B3}
#else
-
+#define PRODUCT sculpt mobile teensypp
/* 0 1 2 3 4 5 6 7 */
#define MATRIX_ROW_PINS { F7,F6,F4,F5,F3,F2,F1,F0}
/* A B C D E F G H I J K L M N O P Q R */
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
- include ../../../../Makefile
+ include ../../../../../Makefile
endif
#ifdef USE_BABLPASTE
//define BabblePaste maps
// Windows.
-#define MS_MODE 0
-#define MAC_MODE 1
+#define MAC_MODE 0
+#define MS_MODE 1
//aka gnome+KDE
//#define LINUX_MODE 2
//#define EMACS_MODE 3
-#define VI_MODE 4
-//#define WORDSTAR_MODE 5
+#define VI_MODE 3
// Readline and tmux
-#define READMUX_MODE 6
+#define READMUX_MODE 2
+//#define WORDSTAR_MODE 5
#endif
// Uncomment if you need more free flash space
____, ____, ____, ____, ____, ____, ____, ____, ____, ____
),
/*
-* |ESC | Win| MAC|RdLn| VI | | | | | | | | | | | |
+* |ESC | MAC| Win|RdLn| VI | | | | | | | | | | | |
* -------------------------------------------------------------------------------'
* | | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del|
* ---------------------------------------------------------------------------
/* If this is in the range of BABL macros, call a separate function */
/* Any clever remapping with modifiers should happen here e.g. shift bablkey does opposite*/
#ifdef USE_BABLPASTE
+
if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) {
if (record->event.pressed) { // is there a case where this isn't desired?
}
#endif
+
// MACRODOWN only works in this function
switch(id) {
case 0:
If you want a speaker, LEDs &etc, you'll need to free up a pin. I recommend joining columns
R and L to the same pin.
-Building - edit rules.mk to set ASTAR=1 or comment it out for teensy2++
+Building - add ASTAR=1 to the compile line or leave out for teensy2++
-#CFLAGS=-D ASTAR
## Project specific files
SRC= babblePaste.c
ifdef ASTAR
+ CFLAGS=-D ASTAR
OPT_DEFS += -DBOOTLOADER_SIZE=4096
MCU = atmega32u4
OPT_DEFS += -DCATERINA_BOOTLOADER
AUDIO_ENABLE ?= no # Audio output on port C6
-USB ?= /dev/cu.usbmodem1421
+USB ?= /dev/cu.usbmodem14141
+
upload: build