Skip to content

Commit

Permalink
Updated SHIFT keymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
pschmuckal authored and Gentoli committed Jul 23, 2020
1 parent 1a106ef commit d9e464c
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 36 deletions.
10 changes: 5 additions & 5 deletions keyboards/massdrop/shift/keymaps/default_md/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PSCR, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, \
Expand All @@ -41,14 +41,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LEFT, KC_DOWN, KC_RGHT \
),
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , _______, _______, KC_PSCR, KC_SLCK, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, KC_BRK , \
L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_MUTE, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_MPLY, KC_MSTP, KC_VOLU, KC_MUTE, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_SLCK, \
L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, _______, _______, _______, _______, \
L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, \
_______, _______, _______, DBG_FAC, KC_APP, _______, _______, _______, \
_______, _______, _______ \
_______, DBG_TOG, _______ \
),
/*
[X] = LAYOUT(
Expand Down
6 changes: 3 additions & 3 deletions keyboards/massdrop/shift/keymaps/mac_md/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PSCR, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, \
Expand All @@ -41,8 +41,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LEFT, KC_DOWN, KC_RGHT \
),
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, KC_MUTE, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_MPLY, KC_MSTP, KC_VOLU, KC_MUTE, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_SLCK, \
L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, _______, _______, _______, _______, \
L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, _______, _______, \
Expand Down
66 changes: 42 additions & 24 deletions tmk_core/common/arm_atsam/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,75 +8,93 @@
*
* FIXME: needs doc
*/
void suspend_idle(uint8_t time) { /* Note: Not used anywhere currently */ }
void suspend_idle(uint8_t time) {
/* Note: Not used anywhere currently */
}

/** \brief Run user level Power down
*
* FIXME: needs doc
*/
__attribute__((weak)) void suspend_power_down_user(void) {}
__attribute__ ((weak))
void suspend_power_down_user (void) {

}

/** \brief Run keyboard level Power down
*
* FIXME: needs doc
*/
__attribute__((weak)) void suspend_power_down_kb(void) { suspend_power_down_user(); }
__attribute__ ((weak))
void suspend_power_down_kb(void) {
suspend_power_down_user();
}

/** \brief Suspend power down
*
* FIXME: needs doc
*/
void suspend_power_down(void) {
void suspend_power_down(void)
{
#ifdef RGB_MATRIX_ENABLE
I2C3733_Control_Set(0); // Disable LED driver
I2C3733_Control_Set(0); //Disable LED driver
#endif

suspend_power_down_kb();
}

__attribute__((weak)) void matrix_power_up(void) {}
__attribute__((weak)) void matrix_power_down(void) {}
bool suspend_wakeup_condition(void) {
if (ui_is_remotewakeup_enabled()) {
matrix_power_up();
matrix_scan();
matrix_power_down();
for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
if (matrix_get_row(r)) return true;
}
} else {
matrix_power_down();
}
__attribute__ ((weak)) void matrix_power_up(void) {}
__attribute__ ((weak)) void matrix_power_down(void) {}
bool suspend_wakeup_condition(void) {
if( ui_is_remotewakeup_enabled() ) {
matrix_power_up();
matrix_scan();
matrix_power_down();
for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
if (matrix_get_row(r)) return true;
}
}
else
{
matrix_power_down();
}
return false;
}

/** \brief run user level code immediately after wakeup
*
* FIXME: needs doc
*/
__attribute__((weak)) void suspend_wakeup_init_user(void) {}
__attribute__ ((weak))
void suspend_wakeup_init_user(void) {

}

/** \brief run keyboard level code immediately after wakeup
*
* FIXME: needs doc
*/
__attribute__((weak)) void suspend_wakeup_init_kb(void) { suspend_wakeup_init_user(); }
__attribute__ ((weak))
void suspend_wakeup_init_kb(void) {
suspend_wakeup_init_user();
}

/** \brief run immediately after wakeup
*
* FIXME: needs doc
*/
void suspend_wakeup_init(void) {
#ifdef RGB_MATRIX_ENABLE
# ifdef USE_MASSDROP_CONFIGURATOR
#ifdef USE_MASSDROP_CONFIGURATOR
// TODO: need to re-add led_enabled?
// if (I2C3733_Control_Get()) {
I2C3733_Control_Set(1);
I2C3733_Control_Set(1);
// }
# else
#else
I2C3733_Control_Set(1);
# endif
#endif
#endif

suspend_wakeup_init_kb();
}

16 changes: 12 additions & 4 deletions tmk_core/protocol/arm_atsam/usb/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,26 @@ static void ui_wakeup_handler(void)
}
#endif

void ui_init(void) { _isWakeupEnabled = true; }
void ui_init(void) {
_isWakeupEnabled = true;
}

void ui_powerdown(void) {}

void ui_wakeup_enable(void) { _isWakeupEnabled = true; }
void ui_wakeup_enable(void) {
_isWakeupEnabled = true;
}

void ui_wakeup_disable(void) { _isWakeupEnabled = false; }
void ui_wakeup_disable(void) {
_isWakeupEnabled = false;
}

void ui_wakeup(void) {}

void ui_process(uint16_t framenumber) {}

void ui_kbd_led(uint8_t value) {}

bool ui_is_remotewakeup_enabled(void) { return (_isWakeupEnabled); }
bool ui_is_remotewakeup_enabled(void) {
return(_isWakeupEnabled);
}

0 comments on commit d9e464c

Please sign in to comment.