Skip to content

Commit

Permalink
cleanup #defines
Browse files Browse the repository at this point in the history
  • Loading branch information
morganvenable committed Jan 24, 2024
1 parent 9bf2623 commit 60d895b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 46 deletions.
9 changes: 0 additions & 9 deletions keyboards/svalboard/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define SERIAL_USART_TX_PIN GP0
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500 // Timeout window in ms in which the double tap can occur.
#define FORCE_NKRO

//@manna-harbour's automousekeys
#if defined MH_AUTO_BUTTONS
#define MH_AUTO_BUTTONS_LAYER MBO
#define MH_AUTO_BUTTONS_TIMEOUT 5000
#endif

//#define USB_POLLING_INTERVAL_MS 1

#define DYNAMIC_KEYMAP_LAYER_COUNT 10
#define VIAL_TAP_DANCE_ENTRIES 100
Expand Down
14 changes: 9 additions & 5 deletions keyboards/svalboard/keymaps/claussen/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ void keyboard_post_init_user(void) {
//debug_mouse=true;
}

#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE
void pointing_device_init_user(void) {
set_auto_mouse_layer(5); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of <mouse_layer>
set_auto_mouse_enable(true); // always required before the auto mouse feature will work
}
#endif

enum my_keycodes {
KC_NORMAL_HOLD = SAFE_RANGE,
KC_FUNC_HOLD
Expand All @@ -45,7 +52,7 @@ enum layer {
const uint16_t PROGMEM keymaps[NUM_LAYERS][MATRIX_ROWS][MATRIX_COLS] = {
[NORMAL] = LAYOUT(
/*Center North East South West*/
/*L4*/ KC_A, KC_Q, KC_LBRC, KC_Z, KC_DEL,

/*R1*/ KC_J, KC_U, KC_QUOTE, KC_M, KC_H,
/*R2*/ KC_K, KC_I, KC_COLON, KC_COMMA, KC_Y,
/*R3*/ KC_L, KC_O, KC_LGUI, KC_DOT, KC_N,
Expand All @@ -54,7 +61,7 @@ const uint16_t PROGMEM keymaps[NUM_LAYERS][MATRIX_ROWS][MATRIX_COLS] = {
/*L1*/ KC_F, KC_R, KC_G, KC_V, KC_DOUBLE_QUOTE,
/*L2*/ KC_D, KC_E, KC_T, KC_C, KC_GRAVE,
/*L3*/ KC_S, KC_W, KC_B, KC_X, KC_ESC,

/*L4*/ KC_A, KC_Q, KC_LBRC, KC_Z, KC_DEL,

/*Down Inner (pad) Upper (Mode) O.Upper (nail) OL (knuckle) Pushthrough*/
/*RT*/ MO(NAS), KC_SPACE, TO(FUNC), KC_BSPC, KC_LALT, TG(NAS),
Expand Down Expand Up @@ -180,11 +187,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {

case KC_NORMAL_HOLD:
if (record->event.pressed) {
layer_clear();
layer_on(NORMAL_HOLD);
SEND_STRING(SS_LCTL(SS_TAP(X_F19)));
} else {
layer_off(NORMAL_HOLD);
}
return false;
/* case KC_FUNC_HOLD:
Expand Down
6 changes: 5 additions & 1 deletion keyboards/svalboard/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ void keyboard_post_init_user(void) {
}

// in keymap.c:
#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE
void pointing_device_init_user(void) {
set_auto_mouse_layer(5); // only required if AUTO_MOUSE_DEFAULT_LAYER is not set to index of <mouse_layer>
set_auto_mouse_enable(true); // always required before the auto mouse feature will work
}
#endif

enum my_keycodes {
KC_NORMAL_HOLD = SAFE_RANGE,
Expand Down Expand Up @@ -185,14 +187,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {

case KC_NORMAL_HOLD:
if (record->event.pressed) {
/* if (record->event.pressed) {
layer_clear();
layer_on(NORMAL_HOLD);
SEND_STRING(SS_LCTL(SS_TAP(X_F19)));
} else {
layer_off(NORMAL_HOLD);
}
return false;
*/

/* case KC_FUNC_HOLD:
if (record->event.pressed) {
layer_clear();
Expand Down
33 changes: 2 additions & 31 deletions keyboards/svalboard/trackpoint/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

/* key matrix size */
// Rows are doubled-up
#define MATRIX_ROWS 10
#define MATRIX_COLS 6
#define PFET_ROWS

#define FORCE_NKRO
//#define DEBUG_MATRIX_SCAN_RATE
//#define PS2_MOUSE_ENABLE // see info.json for duplicate...
#define EE_HANDS

// wiring of each half
//Layout for svalboard v0 (different from lalboard_v2)
Expand All @@ -47,16 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PUSHED_STATES_THUMBS { 0, 0, 0, 0, 0, 0 }
#endif
#endif
#define DOUBLEDOWN_COL 5 // need a pullup on COL6
#define PREWAIT_US 90
#define POSTWAIT_US 90

#define SERIAL_DEBUG
#define SERIAL_USART_TX_PIN GP0
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500 // Timeout window in ms in which the double tap can occur.
#define FORCE_NKRO
//#define EE_HANDS

//PS2 Trackpoint Setup
#ifdef PS2_MOUSE_ENABLE
Expand All @@ -67,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PS2_DATA_PIN GP23
#define PS2_MOUSE_SCROLL_DIVISOR_H 4
#define PS2_MOUSE_SCROLL_DIVISOR_V 4
#define PS2_MOUSE_ROTATE 270
#define PS2_MOUSE_ROTATE 90
#define PS2_MOUSE_SCROLL_BTN_MASK 0 // just normal middle button for panning and relative scroll
//#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BTN_MIDDLE) /* Default -- tap to enter relative scroll, hold to use direct scroll*/
#endif
Expand All @@ -76,15 +58,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#if defined MH_AUTO_BUTTONS
#define MH_AUTO_BUTTONS_LAYER MBO
#define MH_AUTO_BUTTONS_TIMEOUT 5000
#endif

//#define USB_POLLING_INTERVAL_MS 1

#define DYNAMIC_KEYMAP_LAYER_COUNT 10
#define VIAL_TAP_DANCE_ENTRIES 100
#define VIAL_TAP_COMBO_ENTRIES 100
#define VIAL_COMBO_ENTRIES 100
#define VIAL_KEY_OVERRIDE_ENTRIES 10
#define DYNAMIC_KEYMAP_MACRO_COUNT 100


#endif

0 comments on commit 60d895b

Please sign in to comment.