Added horizon layout
parent
e6318b045d
commit
08f3cee0a7
|
@ -33,6 +33,6 @@
|
||||||
#define USB_SUSPEND_WAKEUP_DELAY 200
|
#define USB_SUSPEND_WAKEUP_DELAY 200
|
||||||
#define RAW_USAGE_PAGE 0xFF60
|
#define RAW_USAGE_PAGE 0xFF60
|
||||||
#define RAW_USAGE_ID 0x61
|
#define RAW_USAGE_ID 0x61
|
||||||
#define LAYER_STATE_8BIT
|
#define LAYER_STATE_32BIT
|
||||||
|
|
||||||
#define RGB_MATRIX_STARTUP_SPD 60
|
#define RGB_MATRIX_STARTUP_SPD 60
|
||||||
|
|
|
@ -43,13 +43,6 @@ enum custom_keycodes {
|
||||||
M_SPECIAL_BOTTOM
|
M_SPECIAL_BOTTOM
|
||||||
};
|
};
|
||||||
|
|
||||||
// Tapdance keycodes
|
|
||||||
enum tap_dance_codes {
|
|
||||||
TD_WMLAYOUT,
|
|
||||||
TD_SCREENSHOT,
|
|
||||||
TD_OCR
|
|
||||||
};
|
|
||||||
|
|
||||||
// LED colors
|
// LED colors
|
||||||
#define LC_OFF { 0, 0, 0}
|
#define LC_OFF { 0, 0, 0}
|
||||||
#define LC_GRN { 85, 203, 158}
|
#define LC_GRN { 85, 203, 158}
|
||||||
|
@ -104,11 +97,17 @@ void matrix_scan_user(void) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Must be done early, layers need this enum
|
||||||
|
enum tap_dance_codes {
|
||||||
|
TD_WMLAYOUT,
|
||||||
|
TD_SCREENSHOT,
|
||||||
|
TD_ESCAPE,
|
||||||
|
};
|
||||||
|
|
||||||
// Include all other parts of configuration
|
// Include all other parts of configuration
|
||||||
#include "layers/layers.c"
|
#include "layers/layers.c"
|
||||||
#include "parts/leader.c"
|
#include "parts/leader.c"
|
||||||
//#include "parts/tapdance.c"
|
#include "parts/tapdance.c"
|
||||||
|
|
||||||
// Process macros.
|
// Process macros.
|
||||||
// Return FALSE to halt key processing,
|
// Return FALSE to halt key processing,
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
// See symbols.h for docs
|
||||||
|
|
||||||
|
#define BETA_LAYER_MAGIC_MACRO BETA_LAYER(HORIZON)
|
||||||
|
|
||||||
|
#ifdef BETA_LAYER_LAYOUTS
|
||||||
|
#define BETA_LAYER_CONTEXT_DATA LAYOUT_EN
|
||||||
|
BETA_LAYER_MAGIC_MACRO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BETA_LAYER_KEYS
|
||||||
|
#define BETA_LAYER_CONTEXT_DATA LAYOUT_voyager(\
|
||||||
|
TD(TD_ESCAPE), KC_1, KC_2, KC_3, KC_4, KC_5, \
|
||||||
|
KC_H, KC_Q, KC_Q, KC_W, KC_E, KC_R, \
|
||||||
|
KC_TAB, KC_LSFT, KC_A, KC_S, KC_D, KC_F, \
|
||||||
|
KC_NO, KC_Z, KC_X, KC_NO, KC_C, KC_V, \
|
||||||
|
KC_SPACE, KC_ENTER, \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_NO, KC_NO \
|
||||||
|
)
|
||||||
|
|
||||||
|
BETA_LAYER_MAGIC_MACRO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BETA_LAYER_LEDS
|
||||||
|
#define BETA_LAYER_CONTEXT_DATA {\
|
||||||
|
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
||||||
|
LC_OFF, LC_OFF, LC_OFF, LC_BLU, LC_OFF, LC_OFF, \
|
||||||
|
LC_OFF, LC_OFF, LC_BLU, LC_BLU, LC_BLU, LC_OFF, \
|
||||||
|
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
||||||
|
LC_OFF, LC_OFF, \
|
||||||
|
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
||||||
|
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
||||||
|
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
||||||
|
LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, LC_OFF, \
|
||||||
|
LC_OFF, LC_OFF \
|
||||||
|
}
|
||||||
|
|
||||||
|
BETA_LAYER_MAGIC_MACRO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef BETA_LAYER_CONTEXT_DATA
|
||||||
|
#undef BETA_LAYER_MAGIC_MACRO
|
|
@ -19,8 +19,8 @@
|
||||||
|
|
||||||
// The order of the layers below doesn't matter,
|
// The order of the layers below doesn't matter,
|
||||||
// since they avoid transparent keys.
|
// since they avoid transparent keys.
|
||||||
|
#include "horizon.h"
|
||||||
#include "symbols.h"
|
#include "symbols.h"
|
||||||
|
|
||||||
#include "arrows.h"
|
#include "arrows.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "fkeys.h"
|
#include "fkeys.h"
|
||||||
|
|
|
@ -33,5 +33,10 @@ bool beta_leader_check(void) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BETA_SEQ_2_SHORT(KC_H, KC_O) {
|
||||||
|
layer_move(LAYER_HORIZON);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
|
@ -10,16 +10,6 @@ void td_screenshot(tap_dance_state_t *state, void *user_data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void td_ocr(tap_dance_state_t *state, void *user_data) {
|
|
||||||
if (state->count == 1) {
|
|
||||||
tap_code16(LCTL(KC_PSCR));
|
|
||||||
} else if (state->count == 2) {
|
|
||||||
tap_code16(LCTL(LSFT(KC_PSCR)));
|
|
||||||
} else {
|
|
||||||
reset_tap_dance(state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void td_wmlayout(tap_dance_state_t *state, void *user_data) {
|
void td_wmlayout(tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->count == 1) {
|
if (state->count == 1) {
|
||||||
tap_code16(LGUI(KC_COMMA));
|
tap_code16(LGUI(KC_COMMA));
|
||||||
|
@ -30,8 +20,19 @@ void td_wmlayout(tap_dance_state_t *state, void *user_data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void td_escape(tap_dance_state_t *state, void *user_data) {
|
||||||
|
if (state->count == 1) {
|
||||||
|
tap_code16(KC_ESCAPE);
|
||||||
|
} else if (state->count == 2) {
|
||||||
|
layer_move(LAYER_MAIN);
|
||||||
|
} else {
|
||||||
|
reset_tap_dance(state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
tap_dance_action_t tap_dance_actions[] = {
|
tap_dance_action_t tap_dance_actions[] = {
|
||||||
[TD_WMLAYOUT] = ACTION_TAP_DANCE_FN(td_wmlayout),
|
[TD_WMLAYOUT] = ACTION_TAP_DANCE_FN(td_wmlayout),
|
||||||
[TD_SCREENSHOT] = ACTION_TAP_DANCE_FN(td_screenshot),
|
[TD_SCREENSHOT] = ACTION_TAP_DANCE_FN(td_screenshot),
|
||||||
[TD_OCR] = ACTION_TAP_DANCE_FN(td_ocr),
|
[TD_ESCAPE] = ACTION_TAP_DANCE_FN(td_escape),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue