Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
qmk-bot committed Feb 28, 2023
2 parents 7a82652 + 0596720 commit 184c1e5
Show file tree
Hide file tree
Showing 35 changed files with 459 additions and 349 deletions.
3 changes: 3 additions & 0 deletions keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
# undef POINTING_DEVICE_CS_PIN
# define POINTING_DEVICE_CS_PIN A15 // b14
# define PMW33XX_LIFTOFF_DISTANCE 0b1111

# define RGB_MATRIX_LED_FLUSH_LIMIT 33
# define RGB_MATRIX_LED_PROCESS_LIMIT 29
#endif

#undef ROTATIONAL_TRANSFORM_ANGLE
Expand Down
14 changes: 5 additions & 9 deletions keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
#include "drashna.h"

// clang-format off
#define LAYOUT_charybdis_4x6_wrapper(...) LAYOUT_charybdis_4x6(__VA_ARGS__)
#define LAYOUT_charybdis_4x6_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
Expand All @@ -26,14 +27,13 @@
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, UC_CLUE, \
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,RGUI_T(K28),RALT_T(K29),RCTL_T(K2A), OS_RSFT, \
OS_LSFT,CTL_T(K21),ALT_T(K22),GUI_T(K23),K24,K25, K26,K27,RGUI_T(K28),RALT_T(K29),RCTL_T(K2A), OS_RSFT, \
SFT_T(KC_GRV), OS_LALT, OS_LGUI, TT(_MOUSE), KC_ENT, \
KC_SPC, BK_LWER, DL_RAIS \
)

#define LAYOUT_base_wrapper(...) LAYOUT_charybdis_4x6_base(__VA_ARGS__)

// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT_LAYER_1] = LAYOUT_base_wrapper(
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
Expand Down Expand Up @@ -120,13 +120,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on


void keyboard_post_init_keymap(void) {
#ifdef RGB_MATRIX_ENABLE
g_led_config.flags[53] = g_led_config.flags[54] = g_led_config.flags[55] =
g_led_config.flags[0] = g_led_config.flags[1] = g_led_config.flags[2] = g_led_config.flags[3] =
g_led_config.flags[29] = g_led_config.flags[30] = g_led_config.flags[31] = g_led_config.flags[32] =
LED_FLAG_MODIFIER;
g_led_config.flags[53] = g_led_config.flags[54] = g_led_config.flags[55] = g_led_config.flags[0] = g_led_config.flags[1] = g_led_config.flags[2] = g_led_config.flags[3] = g_led_config.flags[29] = g_led_config.flags[30] = g_led_config.flags[31] = g_led_config.flags[32] = LED_FLAG_MODIFIER;
#endif
}

Expand Down Expand Up @@ -171,8 +167,8 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}},
{{0, 4}, {3, 4}, {2, 4}, {5, 4}, {4, 4}, {2, 4}},
};
{{0, 4}, {3, 4}, {2, 4}, {5, 4}, {4, 4}, {2, 4}}
};

# ifdef ENCODER_MAP_ENABLE
const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0};
Expand Down
3 changes: 1 addition & 2 deletions keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ ifeq ($(strip $(OVERLOAD_FEATURES)), yes)
NKRO_ENABLE = yes # Enable N-Key Rollover
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow

KEYBOARD_SHARED_EP = yes
MOUSE_SHARED_EP = yes
MOUSE_SHARED_EP = no

AUTOCORRECT_ENABLE = yes
CAPS_WORD_ENABLE = yes
Expand Down
26 changes: 18 additions & 8 deletions keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,24 @@ bool oled_task_keymap(void) {

// render_rgb_hsv(1, 13);
oled_set_cursor(1, 13);
// oled_write_P(PSTR("Timer:"), false);
// oled_write(get_u8_str((uint8_t)(timer_elapsed32(oled_timer) / 1000), ' '), false);
oled_write_P(PSTR("Status: "), false);
if (is_oled_enabled) {
oled_write_P(PSTR("on "), false);
} else {
oled_write_P(PSTR("off"), false);
}
oled_write_P(PSTR("OS: "), false);
extern os_variant_t os_type;
switch (os_type) {
case OS_LINUX:
oled_write_ln_P(PSTR("Linux"), false);
break;
case OS_WINDOWS:
oled_write_ln_P(PSTR("Windows"), false);
break;
case OS_MACOS:
oled_write_ln_P(PSTR("MacOS"), false);
break;
case OS_IOS:
oled_write_ln_P(PSTR("iOS"), false);
break;
default:
break;
}

render_keylogger_status(1, 14);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,25 +130,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, KC_NUKE, _______
),
};

// clang-format on

#ifdef ENCODER_ENABLE
#ifdef ENCODER_MAP_ENABLE
# ifdef ENCODER_MAP_ENABLE
// clang-format off
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[_DEFAULT_LAYER_1] = { { KC_VOLD, KC_VOLU }, { KC_WH_D, KC_WH_U } },
[_DEFAULT_LAYER_2] = { { _______, _______ }, { _______, _______ } },
[_DEFAULT_LAYER_3] = { { _______, _______ }, { _______, _______ } },
[_DEFAULT_LAYER_4] = { { _______, _______ }, { _______, _______ } },
[_GAMEPAD] = { { _______, _______ }, { _______, _______ } },
[_DIABLO] = { { _______, _______ }, { _______, _______ } },
[_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } },
[_MEDIA] = { { _______, _______ }, { _______, _______ } },
[_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } },
[_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } },
[_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } },
[_DEFAULT_LAYER_1] = { ENCODER_CCW_CW( KC_VOLD, KC_VOLU ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
[_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_DEFAULT_LAYER_3] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_DEFAULT_LAYER_4] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_GAMEPAD] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_DIABLO] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_MOUSE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
[_MEDIA] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_RAISE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_PGDN, KC_PGUP ) },
[_LOWER] = { ENCODER_CCW_CW( RGB_MOD, RGB_RMOD), ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
[_ADJUST] = { ENCODER_CCW_CW( CK_DOWN, CK_UP ), ENCODER_CCW_CW( _______, _______ ) },
};
// clang-format on
#else
# else

deferred_token encoder_token = INVALID_DEFERRED_TOKEN;
static int8_t last_direction = -1;
Expand All @@ -160,11 +161,11 @@ static uint32_t encoder_callback(uint32_t trigger_time, void *cb_arg) {
}

bool encoder_update_user(uint8_t index, bool clockwise) {
# ifdef SWAP_HANDS_ENABLE
# ifdef SWAP_HANDS_ENABLE
if (swap_hands) {
index ^= 1;
}
# endif
# endif
if (index == 0) {
tap_code_delay(clockwise ? KC_VOLD : KC_VOLU, 5);
} else if (index == 1) {
Expand All @@ -185,7 +186,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
return false;
}
#endif
# endif
#endif

#ifdef OLED_ENABLE
Expand Down Expand Up @@ -214,4 +215,8 @@ void oled_render_large_display(bool side) {
render_unicode_mode(1, 14);
}
}

void render_oled_title(bool side) {
oled_write_P(side ? PSTR(" Tractyl ") : PSTR(" Manuform "), true);
}
#endif
2 changes: 1 addition & 1 deletion keyboards/keebio/viterbi/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define TT_MDIA TT(_MEDIA)

// enum more_custom_keycodes {
// KC_P00 = NEW_SAFE_RANGE
// KC_P00 = USER_SAFE_RANGE
//};

// clang-format off
Expand Down
4 changes: 3 additions & 1 deletion keyboards/moonlander/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

#include "drashna.h"

enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE };
enum more_custom_keycodes {
KC_SWAP_NUM = USER_SAFE_RANGE,
};

// clang-format off
#define LAYOUT_moonlander_wrapper(...) LAYOUT_moonlander(__VA_ARGS__)
Expand Down
9 changes: 9 additions & 0 deletions keyboards/ploopyco/mouse/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*/
#include QMK_KEYBOARD_H

// safe range starts at `USER_SAFE_RANGE` instead.

// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
Expand All @@ -26,6 +28,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on

#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[0] = { ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
[1] = { ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
};
#endif

#ifdef RGBLIGHT_ENABLE
void eeconkfig_init_user(void) {
rgblight_enable();
Expand Down
15 changes: 6 additions & 9 deletions keyboards/ploopyco/trackball/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,17 @@ The PCB should indicate which revision this is.

While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse sensor.

The default behavior for this is:

```c
void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) {
mouse_report->h = h;
mouse_report->v = v;
}

void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
mouse_report->x = x;
mouse_report->y = y;
report_mouse_t pointing_device_task_user(report_mouse_t mouse_report){
// executed each time the sensor is updated
// mouse_report.<attribute> - can be used to access indivdual mouse attributes
return mouse_report;
}
```
More information on `report_mouse_t` may be found [here](https://docs.qmk.fm/#/feature_pointing_device?id=manipulating-mouse-reports).
This should allow you to more heavily customize the behavior.
Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality.
Expand Down
25 changes: 16 additions & 9 deletions keyboards/splitkb/kyria/keymaps/drashna/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,21 @@
#define QMK_ESC_INPUT D4
#define QMK_ESC_OUTPUT B2

#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 7
#define BOOTMAGIC_LITE_ROW_RIGHT 4
#define BOOTMAGIC_LITE_COLUMN_RIGHT 7

#define BOOTMAGIC_LITE_EEPROM_ROW 1
#define BOOTMAGIC_LITE_EEPROM_COLUMN 7
#define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 5
#define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 7
#ifndef KEYBOARD_splitkb_kyria_rev3
# define BOOTMAGIC_LITE_ROW 0
# define BOOTMAGIC_LITE_COLUMN 7
# define BOOTMAGIC_LITE_ROW_RIGHT 4
# define BOOTMAGIC_LITE_COLUMN_RIGHT 7

# define BOOTMAGIC_LITE_EEPROM_ROW 1
# define BOOTMAGIC_LITE_EEPROM_COLUMN 7
# define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 5
# define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 7
#endif

#define SERIAL_USART_SPEED 921600

#if defined(KEYBOARD_splitkb_kyria_rev1_proton_c)
# define WEAR_LEVELING_BACKING_SIZE 16384
# define WEAR_LEVELING_LOGICAL_SIZE 8192
#endif
36 changes: 20 additions & 16 deletions keyboards/splitkb/kyria/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,34 +105,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[_DEFAULT_LAYER_1] = { { KC_VOLD, KC_VOLU }, { KC_WH_D, KC_WH_U } },
[_DEFAULT_LAYER_2] = { { _______, _______ }, { _______, _______ } },
[_DEFAULT_LAYER_3] = { { _______, _______ }, { _______, _______ } },
[_DEFAULT_LAYER_4] = { { _______, _______ }, { _______, _______ } },
[_GAMEPAD] = { { _______, _______ }, { _______, _______ } },
[_DIABLO] = { { _______, _______ }, { _______, _______ } },
[_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } },
[_MEDIA] = { { _______, _______ }, { _______, _______ } },
[_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } },
[_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } },
[_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } },
[_DEFAULT_LAYER_1] = { ENCODER_CCW_CW( KC_VOLD, KC_VOLU ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
[_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_GAMEPAD] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_DIABLO] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_MOUSE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
[_MEDIA] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_RAISE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_PGDN, KC_PGUP ) },
[_LOWER] = { ENCODER_CCW_CW( RGB_MOD, RGB_RMOD), ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
[_ADJUST] = { ENCODER_CCW_CW( CK_DOWN, CK_UP ), ENCODER_CCW_CW( _______, _______ ) },
};
#endif
// clang-format on

#ifdef OLED_ENABLE
void render_oled_title(bool side) {
oled_write_P(side ? PSTR(" Splitkb ") : PSTR(" Kyria "), true);
}

oled_rotation_t oled_init_keymap(oled_rotation_t rotation) {
#ifdef OLED_DRIVER_SH1107
# ifdef OLED_DRIVER_SH1107
return OLED_ROTATION_0;
#else
# else
return OLED_ROTATION_180;
#endif
# endif
}

void oled_render_large_display(bool side) {
if (side) {
render_wpm_graph(56, 64);
} else {
// clang-format off
static const char PROGMEM kyria_logo[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Expand All @@ -144,7 +149,7 @@ void oled_render_large_display(bool side) {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
// clang-format on
oled_set_cursor(0,7);
oled_set_cursor(0, 7);
oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
}
}
Expand All @@ -171,7 +176,6 @@ void housekeeping_task_keymap(void) {
}
#endif


#ifdef KEYBOARD_splitkb_kyria_rev1_proton_c
void matrix_output_unselect_delay(uint8_t line, bool key_pressed) {
for (int32_t i = 0; i < 40; i++) {
Expand Down
2 changes: 1 addition & 1 deletion layouts/community/ergodox/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "drashna.h"

enum more_custom_keycodes {
KC_SWAP_NUM = NEW_SAFE_RANGE,
KC_SWAP_NUM = USER_SAFE_RANGE,
PM_SCROLL,
PM_PRECISION,
};
Expand Down
Loading

0 comments on commit 184c1e5

Please sign in to comment.