[Keymap] Drashna Updates - Split+OLED edition (#11968)
This commit is contained in:
@ -24,14 +24,15 @@
|
||||
* of use. K## is a placeholder to pass through the individual keycodes
|
||||
*/
|
||||
// clang-format off
|
||||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define LAYOUT_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, KC_DEL, \
|
||||
ALT_T(KC_TAB), K11, K12, K13, K14, K15, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
ALT_T(KC_TAB), K11, K12, K13, K14, K15, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, LT(_LOWER,K25), KC_SPC, LT(_RAISE,K26), K27, K28, K29, RCTL_T(K2A), KC_ENT \
|
||||
)
|
||||
#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__)
|
||||
|
@ -24,14 +24,15 @@
|
||||
* of use. K## is a placeholder to pass through the individual keycodes
|
||||
*/
|
||||
// clang-format off
|
||||
#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__)
|
||||
#define LAYOUT_gergo_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_gergo_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \
|
||||
)
|
||||
|
@ -85,7 +85,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||
|
||||
#ifdef POINTING_DEVICE_ENABLE
|
||||
if (keycode == DPI_CONFIG && record->event.pressed) {
|
||||
keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE;
|
||||
if ((get_mods()|get_oneshot_mods()) & MOD_MASK_SHIFT) {
|
||||
keyboard_config.dpi_config = (keyboard_config.dpi_config - 1) % DPI_OPTION_SIZE;
|
||||
} else {
|
||||
keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE;
|
||||
}
|
||||
eeconfig_update_kb(keyboard_config.raw);
|
||||
trackball_set_cpi(dpi_array[keyboard_config.dpi_config]);
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define BOOTMAGIC_LITE_COLUMN_RIGHT 5
|
||||
|
||||
#define C6_AUDIO
|
||||
#define B7_AUDIO
|
||||
|
||||
#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 16
|
||||
|
@ -18,9 +18,10 @@
|
||||
|
||||
// #define USE_I2C
|
||||
#define SELECT_SOFT_SERIAL_SPEED 0
|
||||
#define SERIAL_USE_MULTI_TRANSACTION
|
||||
|
||||
// #define SERIAL_USE_MULTI_TRANSACTION
|
||||
#define SPLIT_MODS_ENABLE
|
||||
#define EE_HANDS
|
||||
|
||||
#define TRACKBALL_DPI_OPTIONS \
|
||||
{ 1200, 1800, 2600, 3400 }
|
||||
|
||||
@ -35,8 +36,6 @@
|
||||
#define SOLENOID_DEFAULT_DWELL 8
|
||||
|
||||
#define OLED_DISPLAY_128X64
|
||||
#define OLED_TIMEOUT 0
|
||||
#define OLED_BRIGHTNESS 100
|
||||
#define SPLIT_MODS_ENABLE
|
||||
|
||||
#define MK_KINETIC_SPEED
|
||||
|
@ -16,24 +16,21 @@
|
||||
|
||||
#include "drashna.h"
|
||||
|
||||
#define TG_DBLO TG(_DIABLO)
|
||||
|
||||
|
||||
// clang-format off
|
||||
#define LAYOUT_5x6_right_trackball_wrapper(...) LAYOUT_5x6_right_trackball(__VA_ARGS__)
|
||||
#define LAYOUT_5x6_right_trackball_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_5x6_right_trackball_wrapper( \
|
||||
KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||
SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
OS_LALT, OS_LGUI, TG_GAME, TG_DBLO, \
|
||||
OS_LGUI, KC_GRV, OS_RGUI, \
|
||||
KC_SPC, _______, KC_ENT, \
|
||||
KC_SPC, TT(_MOUSE), KC_ENT, \
|
||||
BK_LWER, MO(_MOUSE), MO(_MOUSE), DL_RAIS \
|
||||
)
|
||||
#define LAYOUT_5x6_right_trackball_base_wrapper(...) LAYOUT_5x6_right_trackball_base(__VA_ARGS__)
|
||||
@ -149,13 +146,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, KC_NUKE, _______
|
||||
),
|
||||
};
|
||||
// clang-format off
|
||||
|
||||
// clang-format on
|
||||
|
||||
#ifdef POINTING_DEVICE_ENABLE
|
||||
static uint16_t mouse_timer = 0;
|
||||
static uint16_t mouse_debounce_timer = 0;
|
||||
static uint16_t mouse_timer = 0;
|
||||
static uint16_t mouse_debounce_timer = 0;
|
||||
static uint8_t mouse_keycode_tracker = 0;
|
||||
bool tap_toggling = false;
|
||||
|
||||
void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
|
||||
if ((x || y) && timer_elapsed(mouse_timer) > 125) {
|
||||
@ -164,29 +161,64 @@ void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
|
||||
layer_on(_MOUSE);
|
||||
}
|
||||
}
|
||||
if (timer_elapsed(mouse_debounce_timer) > 125 || layer_state_is(_GAMEPAD) ) {
|
||||
|
||||
# ifdef TAPPING_TERM_PER_KEY
|
||||
if (timer_elapsed(mouse_debounce_timer) > get_tapping_term(KC_BTN1, NULL)
|
||||
# else
|
||||
if (timer_elapsed(mouse_debounce_timer) > TAPPING_TERM
|
||||
# endif
|
||||
|| layer_state_is(_GAMEPAD)) {
|
||||
mouse_report->x = x;
|
||||
mouse_report->y = y;
|
||||
}
|
||||
# ifdef OLED_DRIVER_ENABLE
|
||||
if (x || y) oled_timer = timer_read32();
|
||||
# endif
|
||||
}
|
||||
|
||||
void matrix_scan_keymap(void) {
|
||||
if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker) {
|
||||
if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) {
|
||||
layer_off(_MOUSE);
|
||||
}
|
||||
if (tap_toggling) {
|
||||
if (!layer_state_is(_MOUSE)) {
|
||||
layer_on(_MOUSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode){
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t* record) {
|
||||
switch (keycode) {
|
||||
case TT(_MOUSE): {
|
||||
if (record->event.pressed) {
|
||||
mouse_keycode_tracker++;
|
||||
} else {
|
||||
# if TAPPING_TOGGLE != 0
|
||||
if (record->tap.count == TAPPING_TOGGLE) {
|
||||
tap_toggling ^= 1;
|
||||
# if TAPPING_TOGGLE == 1
|
||||
if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1;
|
||||
# else
|
||||
if (!tap_toggling) mouse_keycode_tracker -= record->tap.count;
|
||||
# endif
|
||||
} else {
|
||||
mouse_keycode_tracker--;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
mouse_timer = timer_read();
|
||||
break;
|
||||
}
|
||||
case MO(_MOUSE):
|
||||
case DPI_CONFIG:
|
||||
case KC_MS_UP...KC_MS_WH_RIGHT:
|
||||
case KC_MS_UP ... KC_MS_WH_RIGHT:
|
||||
record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--;
|
||||
mouse_timer = timer_read();
|
||||
break;
|
||||
default:
|
||||
if (layer_state_is(_MOUSE) && !mouse_keycode_tracker) {
|
||||
layer_off(_MOUSE);
|
||||
mouse_keycode_tracker = 0;
|
||||
}
|
||||
mouse_debounce_timer = timer_read();
|
||||
break;
|
||||
|
@ -5,5 +5,5 @@ AUDIO_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
UNICODE_ENABLE = yes
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
|
||||
WPM_ENABLE = yes
|
||||
# DEBOUNCE_TYPE = sym_eager_pk
|
||||
|
@ -77,7 +77,8 @@ typedef struct _I2C_slave_buffer_t {
|
||||
bool oled_on;
|
||||
layer_state_t t_layer_state;
|
||||
layer_state_t t_default_layer_state;
|
||||
} I2C_slave_buffer_t;
|
||||
bool is_rgb_matrix_suspended;
|
||||
} __attribute__((packed)) I2C_slave_buffer_t;
|
||||
|
||||
static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
|
||||
|
||||
@ -93,9 +94,10 @@ static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_re
|
||||
# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x)
|
||||
# define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y)
|
||||
# define I2C_MOUSE_DPI_START offsetof(I2C_slave_buffer_t, device_cpi)
|
||||
# define I2C_OLED_ON_START offsetof(I2C_slave_buffent, oled_on)
|
||||
# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffent, t_layer_state)
|
||||
# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffent, t_default_layer_state)
|
||||
# define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on)
|
||||
# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state)
|
||||
# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state)
|
||||
# define I2C_RGB_MATRIX_SUSPEND_START offsetof(I2C_slave_buffer_t, is_rgb_matrix_suspended)
|
||||
|
||||
# define TIMEOUT 100
|
||||
|
||||
@ -196,9 +198,19 @@ bool transport_master(matrix_row_t matrix[]) {
|
||||
}
|
||||
|
||||
# ifdef OLED_DRIVER_ENABLE
|
||||
if (is_oled_on() != i2c_buffer->oled_on) {
|
||||
if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on(), sizeof(bool), TIMEOUT) >= 0) {
|
||||
i2c_buffer->oled_on = is_oled_on();
|
||||
bool is_oled_on = is_oled_on();
|
||||
if (is_oled_on != i2c_buffer->oled_on) {
|
||||
if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on, sizeof(is_oled_on), TIMEOUT) >= 0) {
|
||||
i2c_buffer->oled_on = is_oled_on;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
bool sus_state = rgb_matrix_get_suspend_state();
|
||||
if (sus_state != i2c_buffer->is_rgb_matrix_suspended) {
|
||||
if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_SUSPEND_START, (void *)&sus_state, sizeof(sus_state), TIMEOUT) >= 0) {
|
||||
i2c_buffer->is_rgb_matrix_suspended = sus_state;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
@ -255,10 +267,10 @@ void transport_slave(matrix_row_t matrix[]) {
|
||||
# endif
|
||||
|
||||
if (layer_state != i2c_buffer->t_layer_state) {
|
||||
layer_state_set(i2c_buffer->t_layer_state);
|
||||
layer_state = i2c_buffer->t_layer_state;
|
||||
}
|
||||
if (default_layer_state != i2c_buffer->t_default_layer_state) {
|
||||
default_layer_state_set(i2c_buffer->t_default_layer_state);
|
||||
default_layer_state = i2c_buffer->t_default_layer_state;
|
||||
}
|
||||
|
||||
# ifdef OLED_DRIVER_ENABLE
|
||||
@ -268,6 +280,10 @@ void transport_slave(matrix_row_t matrix[]) {
|
||||
oled_off();
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
rgb_matrix_set_suspend_state(i2c_buffer->is_rgb_matrix_suspended);
|
||||
# endif
|
||||
}
|
||||
|
||||
void transport_master_init(void) { i2c_init(); }
|
||||
@ -286,7 +302,7 @@ typedef struct _Serial_s2m_buffer_t {
|
||||
# endif
|
||||
int8_t mouse_x;
|
||||
int8_t mouse_y;
|
||||
} Serial_s2m_buffer_t;
|
||||
} __attribute__((packed)) Serial_s2m_buffer_t;
|
||||
|
||||
typedef struct _Serial_m2s_buffer_t {
|
||||
# ifdef SPLIT_MODS_ENABLE
|
||||
@ -309,7 +325,8 @@ typedef struct _Serial_m2s_buffer_t {
|
||||
bool oled_on;
|
||||
layer_state_t t_layer_state;
|
||||
layer_state_t t_default_layer_state;
|
||||
} Serial_m2s_buffer_t;
|
||||
bool is_rgb_matrix_suspended;
|
||||
} __attribute__((packed)) Serial_m2s_buffer_t;
|
||||
|
||||
# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
|
||||
// When MCUs on both sides drive their respective RGB LED chains,
|
||||
@ -434,10 +451,14 @@ bool transport_master(matrix_row_t matrix[]) {
|
||||
}
|
||||
# endif
|
||||
|
||||
serial_m2s_buffer.t_layer_state = layer_state;
|
||||
serial_m2s_buffer.t_default_layer_state = default_layer_state;
|
||||
serial_m2s_buffer.t_layer_state = layer_state;
|
||||
serial_m2s_buffer.t_default_layer_state = default_layer_state;
|
||||
# ifdef OLED_DRIVER_ENABLE
|
||||
serial_m2s_buffer.oled_on = is_oled_on();
|
||||
serial_m2s_buffer.oled_on = is_oled_on();
|
||||
# endif
|
||||
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
serial_m2s_buffer.is_rgb_matrix_suspended = rgb_matrix_get_suspend_state();
|
||||
# endif
|
||||
|
||||
return true;
|
||||
@ -484,10 +505,10 @@ void transport_slave(matrix_row_t matrix[]) {
|
||||
# endif
|
||||
|
||||
if (layer_state != serial_m2s_buffer.t_layer_state) {
|
||||
layer_state_set(serial_m2s_buffer.t_layer_state);
|
||||
layer_state = serial_m2s_buffer.t_layer_state;
|
||||
}
|
||||
if (default_layer_state != serial_m2s_buffer.t_default_layer_state) {
|
||||
default_layer_set(serial_m2s_buffer.t_default_layer_state);
|
||||
default_layer_state = serial_m2s_buffer.t_default_layer_state;
|
||||
}
|
||||
# ifdef OLED_DRIVER_ENABLE
|
||||
if (serial_m2s_buffer.oled_on) {
|
||||
@ -496,6 +517,10 @@ void transport_slave(matrix_row_t matrix[]) {
|
||||
oled_off();
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
rgb_matrix_set_suspend_state(serial_m2s_buffer.is_rgb_matrix_suspended);
|
||||
# endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -26,5 +26,5 @@ POINTING_DEVICE_ENABLE = yes
|
||||
SPLIT_KEYBOARD = yes
|
||||
SPLIT_TRANSPORT = custom
|
||||
|
||||
SRC += pointer_transport.c pmw3360.c
|
||||
QUANTUM_LIB_SRC += serial.c i2c_master.c i2c_slave.c spi_master.c
|
||||
SRC += pmw3360.c
|
||||
QUANTUM_LIB_SRC += pointer_transport.c serial.c i2c_master.c i2c_slave.c spi_master.c
|
||||
|
@ -25,15 +25,16 @@
|
||||
*/
|
||||
|
||||
// clang-format off
|
||||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define LAYOUT_iris_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||
LALT_T(KC_TAB), K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \
|
||||
)
|
||||
|
@ -17,9 +17,7 @@
|
||||
#include "drashna.h"
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define DIABLO TG(_DIABLO)
|
||||
#define GAMEPAD TG(_GAMEPAD)
|
||||
#define MEDIA TT(_MEDIA)
|
||||
#define TT_MDIA TT(_MEDIA)
|
||||
|
||||
// enum more_custom_keycodes {
|
||||
// KC_P00 = NEW_SAFE_RANGE
|
||||
@ -29,15 +27,15 @@
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_NUMLOCK] = LAYOUT_ortho_5x7(
|
||||
KC_NO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS,
|
||||
MEDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST,
|
||||
KC_NO, TG_DBLO, TG_GAME, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS,
|
||||
TT_MDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST,
|
||||
KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS,
|
||||
KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS,
|
||||
KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_COLN, KC_PENT
|
||||
),
|
||||
|
||||
[_DIABLO] = LAYOUT_ortho_5x7(
|
||||
KC_ESC, DIABLO, KC_V, KC_D, XXXXXXX, XXXXXXX, KC_L,
|
||||
KC_ESC, _______, KC_V, KC_D, XXXXXXX, XXXXXXX, KC_L,
|
||||
KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_J,
|
||||
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_F,
|
||||
KC_LCTL, KC_D3_3, KC_D3_3, KC_D3_3, KC_D3_3, KC_Z, KC_DIABLO_CLEAR,
|
||||
@ -45,16 +43,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
[_GAMEPAD] = LAYOUT_ortho_5x7( // Game pad layout designed primarily for Overwatch
|
||||
KC_NO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4,
|
||||
MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_NO, KC_ESC, _______, KC_1, KC_2, KC_3, KC_4,
|
||||
TT_MDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
|
||||
KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V
|
||||
),
|
||||
|
||||
[_MEDIA] = LAYOUT_ortho_5x7(
|
||||
KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD,
|
||||
MEDIA, EEP_RST, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI,
|
||||
KC_MAKE, RESET, MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD,
|
||||
_______, EEP_RST, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI,
|
||||
RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD,
|
||||
KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI,
|
||||
KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI
|
||||
|
@ -20,8 +20,6 @@
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
# define OLED_DISPLAY_128X64
|
||||
# define OLED_FONT_H "font_gmk_bad.h"
|
||||
# define OLED_DISABLE_TIMEOUT
|
||||
# define OLED_SCROLL_TIMEOUT_RIGHT 60000
|
||||
#endif
|
||||
|
||||
|
@ -31,15 +31,16 @@ uint8_t is_master;
|
||||
*/
|
||||
|
||||
// clang-format off
|
||||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define LAYOUT_kyria_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), MEH(KC_MINS), TG(_DIABLO), KC_CAPS, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, TG_GAME, MEH(KC_MINS), TG_DBLO, KC_CAPS, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \
|
||||
)
|
||||
/* Re-pass though to allow templates to be used */
|
||||
@ -112,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_DIABLO] = LAYOUT_wrapper(
|
||||
KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_J, KC_L, TG(_DIABLO), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_J, KC_L, TG_DBLO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_DIABLO_CLEAR, KC_J, KC_NO, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
[_LOWER] = LAYOUT_wrapper(
|
||||
|
@ -1,7 +1,7 @@
|
||||
OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
|
||||
ENCODER_ENABLE = yes # ENables the use of one or more encoders
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||
RGBLIGHT_STARTUP_ANIMATION = no
|
||||
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
|
@ -27,13 +27,13 @@ enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE };
|
||||
|
||||
#define LAYOUT_moonlander_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_moonlander_wrapper( \
|
||||
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||
KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO),TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||
KC_C1R3, K11, K12, K13, K14, K15, TG(_GAMEPAD),TG(_GAMEPAD), K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
KC_TAB, K01, K02, K03, K04, K05, TG_DBLO,TG_DBLO, K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||
KC_C1R3, K11, K12, K13, K14, K15, TG_GAME,TG_GAME, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A),KC_MRSF, \
|
||||
KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_NO, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \
|
||||
KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT \
|
||||
@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_GAMEPAD] = LAYOUT_moonlander_wrapper(
|
||||
KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, HYPR(KC_Q), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_TRNS, TG(_GAMEPAD), KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_TRNS, TG_GAME, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO,
|
||||
KC_V, KC_SPC, KC_H, KC_NO, KC_NO, KC_SWAP_NUM
|
||||
|
@ -8,14 +8,15 @@
|
||||
* of use. K## is a placeholder to pass through the individual keycodes
|
||||
*/
|
||||
// clang-format off
|
||||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define LAYOUT_orthodox_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \
|
||||
)
|
||||
#define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__)
|
||||
|
32
keyboards/splitkb/zima/keymaps/drashna/config.h
Normal file
32
keyboards/splitkb/zima/keymaps/drashna/config.h
Normal file
@ -0,0 +1,32 @@
|
||||
/* Copyright 2019 Thomas Baart
|
||||
* Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define OLED_FONT_H "users/drashna/drashna_font.h"
|
||||
#define OLED_UPDATE_INTERVAL 15
|
||||
#define OLED_DISABLE_TIMEOUT
|
||||
#define OLED_FONT_END 255
|
||||
// # define OLED_FONT_5X5
|
||||
// # define OLED_FONT_AZTECH
|
||||
// # define OLED_FONT_BMPLAIN
|
||||
# define OLED_FONT_SUPER_DIGG
|
||||
// # define OLED_LOGO_GMK_BAD
|
||||
// # define OLED_LOGO_HUE_MANITEE
|
||||
// # define OLED_LOGO_CORNE
|
||||
// # define OLED_LOGO_GOTHAM
|
||||
#define OLED_LOGO_SCIFI
|
140
keyboards/splitkb/zima/keymaps/drashna/keymap.c
Normal file
140
keyboards/splitkb/zima/keymaps/drashna/keymap.c
Normal file
@ -0,0 +1,140 @@
|
||||
/* Copyright 2019 Thomas Baart
|
||||
* Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAPTIC_ENABLE
|
||||
# include "haptic.h"
|
||||
extern haptic_config_t haptic_config;
|
||||
#endif
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_ortho_4x3( /* Base */
|
||||
KC_MUTE, TG(1), TG(2),
|
||||
KC_P7, KC_P8, KC_P9,
|
||||
KC_P4, KC_P5, KC_P6,
|
||||
KC_P1, KC_P2, KC_P3
|
||||
),
|
||||
[1] = LAYOUT_ortho_4x3( /* Layer 1 */
|
||||
RESET, _______, XXXXXXX,
|
||||
AU_ON, AU_OFF, XXXXXXX,
|
||||
CK_TOGG, XXXXXXX, CK_UP,
|
||||
CK_RST, XXXXXXX, CK_DOWN
|
||||
),
|
||||
[2] = LAYOUT_ortho_4x3( /* Layer 2*/
|
||||
RGB_TOG, RGB_MOD, _______,
|
||||
RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
RGB_HUD, RGB_SAD, RGB_VAD,
|
||||
HPT_TOG, HPT_FBK, HPT_CONT
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
static bool is_asleep = false;
|
||||
static uint32_t oled_timer;
|
||||
|
||||
void render_oled_logo(void) {
|
||||
// clang-format off
|
||||
static const char PROGMEM qmk_logo[] = {
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
|
||||
// clang-format on
|
||||
oled_write_ln_P(qmk_logo, false);
|
||||
}
|
||||
|
||||
void render_user_status(void) {
|
||||
static const char PROGMEM audio_status[2][3] = {{0xE0, 0xE1, 0}, {0xE2, 0xE3, 0}};
|
||||
oled_write_P(audio_status[is_audio_on()], false);
|
||||
static const char PROGMEM audio_clicky_status[2][3] = {{0xF4, 0xF5, 0}, {0xF6, 0xF7, 0}};
|
||||
oled_write_P(audio_clicky_status[is_clicky_on() && is_audio_on()], false);
|
||||
static const char PROGMEM rgb_layer_status[2][3] = {{0xEE, 0xEF, 0}, {0xF0, 0xF1, 0}};
|
||||
oled_write_P(rgb_layer_status[rgblight_is_enabled()], false);
|
||||
static const char PROGMEM nukem_good[2][3] = {{0xF8, 0xF9, 0}, {0xF6, 0xF7, 0}};
|
||||
oled_write_P(nukem_good[0], haptic_config.enable);
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
oled_scroll_set_speed(0);
|
||||
}
|
||||
|
||||
void oled_task_user(void) {
|
||||
if (is_asleep) {
|
||||
oled_off();
|
||||
return;
|
||||
}
|
||||
|
||||
if (timer_elapsed32(oled_timer) < 30000) {
|
||||
oled_on();
|
||||
oled_scroll_off();
|
||||
oled_write_P(PSTR("SplitKB's Zima"), false);
|
||||
char layer[2] = {0};
|
||||
snprintf(layer, sizeof(layer), "%d", get_highest_layer(layer_state));
|
||||
oled_write_P(PSTR(" L:"), false);
|
||||
oled_write_ln(layer, false);
|
||||
oled_write_ln_P(PSTR("--------------"), false);
|
||||
if (rgblight_is_enabled()) {
|
||||
oled_write_P(PSTR("HSV: "), false);
|
||||
char rgbs[14];
|
||||
snprintf(rgbs, sizeof(rgbs), "%3d, %3d, %3d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
|
||||
oled_write_ln(rgbs, false);
|
||||
} else {
|
||||
oled_write_ln_P(PSTR("RGB LIGHT DISABLED"), false);
|
||||
}
|
||||
render_user_status();
|
||||
} else {
|
||||
if (timer_elapsed32(oled_timer) < 120000) {
|
||||
oled_on();
|
||||
render_oled_logo();
|
||||
oled_scroll_right();
|
||||
} else {
|
||||
oled_off();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void suspend_power_down_user(void) {
|
||||
is_asleep = true;
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_user(void) {
|
||||
is_asleep = false;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t* record) {
|
||||
oled_timer = timer_read32();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code16(KC_VOLU);
|
||||
} else {
|
||||
tap_code16(KC_VOLD);
|
||||
}
|
||||
# ifdef OLED_DRIVER_ENABLE
|
||||
oled_timer = timer_read32();
|
||||
# endif
|
||||
# if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY)
|
||||
if (is_audio_on() && is_clicky_on()) clicky_play();
|
||||
# endif
|
||||
# ifdef HAPTIC_ENABLE
|
||||
if (haptic_config.enable) haptic_play();
|
||||
# endif
|
||||
}
|
7
keyboards/splitkb/zima/keymaps/drashna/readme.md
Normal file
7
keyboards/splitkb/zima/keymaps/drashna/readme.md
Normal file
@ -0,0 +1,7 @@
|
||||
# The default keymap for zima
|
||||
|
||||
This includes support for the OLED and Encoder. However, the actual code is found in the `zima.c` file. This can be replaced by adding your own `oled_task_user(void)` and `encoder_update_user` functinons. These will replace what is in the keyboard, and allow you to customize these features.
|
||||
|
||||
The reason that this is done this way, is so that this functionality will work on the [QMK Configurator](https://config.qmk.fm/#/splitkb/zima/LAYOUT_ortho_4x3)
|
||||
|
||||
For reference, the code used for the oled and encoder defaults is in [zima.c](https://github.com/qmk/qmk_firmware/tree/master/keyboards/splitkb/zima/zima.c).
|
2
keyboards/splitkb/zima/keymaps/drashna/rules.mk
Normal file
2
keyboards/splitkb/zima/keymaps/drashna/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
# is intentional. won't compile under size, otherwise.
|
||||
USER_NAME := not_drashna
|
@ -40,17 +40,20 @@ bool skip_leds = false;
|
||||
* ease of use. K## is a placeholder to pass through the individual keycodes
|
||||
*/
|
||||
// clang-format off
|
||||
#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
|
||||
#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__)
|
||||
|
||||
#define LAYOUT_ergodox_pretty_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_ergodox_pretty_wrapper( \
|
||||
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||
LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \
|
||||
KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_BTN1, KC_BTN3, KC_BTN2, PM_SCROLL, PM_PRECISION, \
|
||||
LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG_DBLO, TG_DBLO, K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG_GAME, TG_GAME, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \
|
||||
KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_BTN1, KC_BTN3, KC_BTN2, PM_SCROLL, PM_PRECISION, \
|
||||
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
|
||||
KC_APP, KC_MENU, \
|
||||
KC_SPC, LT(_LOWER, KC_BSPC), OS_LWR, OS_RSE, LT(_RAISE, KC_DEL), KC_ENT \
|
||||
@ -235,7 +238,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_ESC, KC_NO, KC_1, KC_2, KC_3, HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG_GAME, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO,
|
||||
KC_O, KC_P, MAGIC_TOGGLE_NKRO, LALT(KC_PSCR),
|
||||
KC_LGUI, KC_HYPR,
|
||||
|
@ -50,14 +50,15 @@ enum planck_keycodes {
|
||||
* of use. K## is a placeholder to pass through the individual keycodes
|
||||
*/
|
||||
// clang-format off
|
||||
#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
|
||||
#define LAYOUT_ortho_4x12_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_ortho_4x12_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \
|
||||
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
)
|
||||
|
@ -24,17 +24,17 @@
|
||||
* of use. K## is a placeholder to pass through the individual keycodes
|
||||
*/
|
||||
// clang-format off
|
||||
#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__)
|
||||
#define LAYOUT_ortho_5x12_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
|
||||
K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_ortho_5x12_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \
|
||||
KC_C1R3, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, RALT_T(KC_QUOT), \
|
||||
KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, RCTL_T(K3A), KC_ENT, \
|
||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_BSPC, \
|
||||
LALT_T(KC_TAB), K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \
|
||||
KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
)
|
||||
|
||||
@ -44,28 +44,24 @@
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT_ortho_5x12_base_wrapper(
|
||||
________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,
|
||||
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
||||
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
||||
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
|
||||
),
|
||||
|
||||
[_COLEMAK] = LAYOUT_ortho_5x12_base_wrapper(
|
||||
________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,
|
||||
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
|
||||
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
|
||||
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
|
||||
),
|
||||
|
||||
[_DVORAK] = LAYOUT_ortho_5x12_base_wrapper(
|
||||
________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,
|
||||
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
|
||||
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
|
||||
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
|
||||
),
|
||||
|
||||
[_WORKMAN] = LAYOUT_ortho_5x12_base_wrapper(
|
||||
________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,
|
||||
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
|
||||
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
|
||||
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
|
||||
|
@ -9,6 +9,8 @@ NKRO_ENABLE = yes
|
||||
ifeq ($(strip $(KEYBOARD)), fractal)
|
||||
RGB_MATRIX_ENABLE = no
|
||||
AUDIO_ENABLE = yes
|
||||
AUDIO_SUPPORTED = yes
|
||||
RGBLIGHT_SUPPORTED = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
RGBLIGHT_TWINKLE = yes
|
||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||
|
9
layouts/community/split_3x6_3/drashna/chconf.h
Normal file
9
layouts/community/split_3x6_3/drashna/chconf.h
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
#define CH_CFG_ST_RESOLUTION 16
|
||||
#define CH_CFG_ST_FREQUENCY 10000
|
||||
|
||||
#if __has_include("platforms/chibios/common/configs/chconf.h")
|
||||
# include_next "platforms/chibios/common/configs/chconf.h"
|
||||
#else
|
||||
# include_next "chconf.h"
|
||||
#endif
|
@ -19,8 +19,10 @@
|
||||
/* Select hand configuration */
|
||||
|
||||
// #define MASTER_LEFT
|
||||
#define MASTER_RIGHT
|
||||
// #define EE_HAND
|
||||
// #define MASTER_RIGHT
|
||||
#define EE_HANDS
|
||||
#define SPLIT_MODS_ENABLE
|
||||
|
||||
#undef USE_I2C
|
||||
#undef SSD1306OLED
|
||||
|
||||
@ -40,7 +42,7 @@
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# ifdef CONVERT_TO_PROTON_C
|
||||
# undef RGB_DI_PIN
|
||||
# define RGB_DI_PIN PAL_LINE(GPIOA, 3)
|
||||
# define RGB_DI_PIN A3
|
||||
# endif
|
||||
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||
@ -56,24 +58,23 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONVERT_TO_PROTON_C
|
||||
# define WS2812_PWM_DRIVER PWMD15 // default: PWMD2
|
||||
# define WS2812_PWM_CHANNEL 2 // default: 2
|
||||
# define WS2812_PWM_PAL_MODE 9 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
|
||||
# define WS2812_DMA_STREAM STM32_DMA1_STREAM5 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
||||
# define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
||||
# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM15_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
|
||||
# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
|
||||
# define WS2812_PWM_CHANNEL 4 // default: 2
|
||||
# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
|
||||
# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
||||
# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
||||
# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
|
||||
|
||||
# undef SOFT_SERIAL_PIN
|
||||
# define SOFT_SERIAL_PIN D3
|
||||
# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
|
||||
# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
||||
|
||||
|
||||
// #define INIT_EE_HANDS_LEFT
|
||||
// #define INIT_EE_HANDS_RIGHT
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#if defined(AUDIO_ENABLE) && !defined(CONVERT_TO_PROTON_C)
|
||||
# define B6_AUDIO
|
||||
# define NO_MUSIC_MODE
|
||||
#endif
|
||||
@ -88,9 +89,5 @@
|
||||
#else
|
||||
# define PRODUCT Drashna Hacked Corne Keyboard
|
||||
#endif
|
||||
#define OLED_FONT_H "layouts/community/split_3x6_3/drashna/glcdfont.c"
|
||||
// #define OLED_FONT_WIDTH 5
|
||||
// #define OLED_FONT_HEIGHT 7
|
||||
|
||||
#define OLED_DISABLE_TIMEOUT
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
|
@ -27,14 +27,15 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
|
||||
*/
|
||||
|
||||
// clang-format off
|
||||
#define LAYOUT_split_3x6_3_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__)
|
||||
#define LAYOUT_split_3x6_3_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_split_3x6_3_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||
ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
RGB_MOD, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \
|
||||
)
|
||||
@ -121,11 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (is_keyboard_master()) {
|
||||
return OLED_ROTATION_270;
|
||||
} else {
|
||||
return rotation;
|
||||
}
|
||||
return OLED_ROTATION_270;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -19,14 +19,18 @@
|
||||
|
||||
// #undef STM32_HSE_ENABLED
|
||||
// #define STM32_HSE_ENABLED FALSE
|
||||
#undef STM32_GPT_USE_TIM15
|
||||
#define STM32_GPT_USE_TIM15 FALSE
|
||||
// #undef STM32_GPT_USE_TIM15
|
||||
// #define STM32_GPT_USE_TIM15 FALSE
|
||||
|
||||
#undef STM32_PWM_USE_TIM15
|
||||
#define STM32_PWM_USE_TIM15 TRUE
|
||||
#undef STM32_PWM_USE_TIM2
|
||||
#define STM32_PWM_USE_TIM2 TRUE
|
||||
#undef STM32_PWM_USE_TIM3
|
||||
#define STM32_PWM_USE_TIM3 FALSE
|
||||
|
||||
#undef STM32_SERIAL_USE_USART1
|
||||
#define STM32_SERIAL_USE_USART1 TRUE
|
||||
|
||||
#undef STM32_PWM_TIM15_IRQ_PRIORITY
|
||||
#define STM32_PWM_TIM15_IRQ_PRIORITY 16
|
||||
// #undef STM32_PWM_TIM15_IRQ_PRIORITY
|
||||
// #define STM32_PWM_TIM15_IRQ_PRIORITY 16
|
||||
#undef STM32_ST_USE_TIMER
|
||||
#define STM32_ST_USE_TIMER 3
|
||||
|
@ -29,6 +29,6 @@ endif
|
||||
|
||||
ifeq ($(strip $(CTPC)), yes)
|
||||
HAPTIC_ENABLE = no
|
||||
WS2812_DRIVER = pwm
|
||||
WS2812_DRIVER = pwm # won't work without a patch to the ctpc mk file
|
||||
SERIAL_DRIVER = usart
|
||||
endif
|
||||
|
@ -22,8 +22,11 @@
|
||||
/* Set Polling rate to 1000Hz */
|
||||
#define USB_POLLING_INTERVAL_MS 1
|
||||
|
||||
#if defined(SPLIT_KEYBOAD)
|
||||
#if defined(SPLIT_KEYBOARD)
|
||||
# define SPLIT_MODS_ENABLE
|
||||
// # define SPLIT_TRANSPORT_MIRROR
|
||||
# define SERIAL_USE_MULTI_TRANSACTION
|
||||
// # define SPLIT_NUM_TRANSACTIONS_KB 2
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
@ -111,6 +114,18 @@
|
||||
# else
|
||||
# define OLED_UPDATE_INTERVAL 15
|
||||
# endif
|
||||
# define OLED_DISABLE_TIMEOUT
|
||||
# define OLED_FONT_H "drashna_font.h"
|
||||
# define OLED_FONT_END 255
|
||||
// # define OLED_FONT_5X5
|
||||
// # define OLED_FONT_AZTECH
|
||||
// # define OLED_FONT_BMPLAIN
|
||||
// # define OLED_FONT_SUPER_DIGG
|
||||
// # define OLED_LOGO_GMK_BAD
|
||||
// # define OLED_LOGO_HUE_MANITEE
|
||||
// # define OLED_LOGO_CORNE
|
||||
// # define OLED_LOGO_GOTHAM
|
||||
# define OLED_LOGO_SCIFI
|
||||
#endif
|
||||
|
||||
#ifndef ONESHOT_TAP_TOGGLE
|
||||
@ -162,3 +177,22 @@
|
||||
#ifdef LOCKING_RESYNC_ENABLE
|
||||
# undef LOCKING_RESYNC_ENABLE
|
||||
#endif
|
||||
|
||||
#ifdef CONVERT_TO_PROTON_C
|
||||
// pins that are available but not present on Pro Micro
|
||||
# define A3 PAL_LINE(GPIOA, 3)
|
||||
# define A4 PAL_LINE(GPIOA, 4)
|
||||
# define A5 PAL_LINE(GPIOA, 5)
|
||||
# define A6 PAL_LINE(GPIOA, 6)
|
||||
# define A7 PAL_LINE(GPIOA, 7)
|
||||
# define A8 PAL_LINE(GPIOA, 8)
|
||||
# define A13 PAL_LINE(GPIOA, 13)
|
||||
# define A14 PAL_LINE(GPIOA, 14)
|
||||
# define A15 PAL_LINE(GPIOA, 15)
|
||||
# define B10 PAL_LINE(GPIOB, 10)
|
||||
# define B11 PAL_LINE(GPIOB, 11)
|
||||
# define B12 PAL_LINE(GPIOB, 12)
|
||||
# define C13 PAL_LINE(GPIOC, 13)
|
||||
# define C14 PAL_LINE(GPIOC, 14)
|
||||
# define C15 PAL_LINE(GPIOC, 15)
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user