Skip to content

Commit

Permalink
Merge pull request #19 from BlueTufa/dev/badger-planck
Browse files Browse the repository at this point in the history
Badger flashed Preonic
  • Loading branch information
BlueTufa authored Feb 8, 2023
2 parents 5b40f91 + c7a9aab commit 130db7b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 30 deletions.
45 changes: 20 additions & 25 deletions keyboards/planck/keymaps/badger/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,43 @@ 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/>.
*/
#undef AUDIO_ENABLE

#include "ortho.h"

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY_MAC_ORTHO] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
MOMAC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
KC_LCTL, KC_LALT, KC_LGUI, RAISE, P_ADJ, KC_SPC, LOWER, KC_NO, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC),
J_FUN, KC_LCTL, KC_LALT, KC_LGUI, RAISE, KC_SPC, KC_SPC, LOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT),

[_MOVE_MAC_ORTHO] = LAYOUT_ortho_4x12(
KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, KC_NEXT, \
_______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, \
_______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),

[_QWERTY_LINUX_ORTHO] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
MOLNX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
KC_LCTL, KC_LALT, KC_LGUI, RAISE, P_ADJ, KC_SPC, LOWER, KC_NO, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC),

[_MOVE_LINUX_ORTHO] = LAYOUT_ortho_4x12(
_______, WM_VD1, WM_UH, WM_VD2, KC_MAC1, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_INS, \
_______, WM_LH, WM_MAX, WM_RH, KC_MAC2, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, \
_______, WM_VD3, WM_BH, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),

KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, WD_DELE, \
_______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
_______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, _______, _______, \
_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______),

[_RAISE] = LAYOUT_ortho_4x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DQUO, \
_______, KC_UNDO, KC_CUT, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_LT, KC_GT, KC_QUES, _______, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_DQUO, \
_______, KC_F7, KC_F8, KC_9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_LT, KC_GT, KC_QUES, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),

[_LOWER] = LAYOUT_ortho_4x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
_______, KC_4, KC_5, KC_6, KC_PMNS, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_QUOT, \
_______, KC_1, KC_2, KC_3, KC_PPLS, KC_NO, KC_NO, KC_WHOM, KC_WBAK, KC_WFWD, KC_WSCH, _______, \
_______, KC_4, KC_5, KC_6, KC_PMNS, KC_PSCR, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, \
_______, KC_1, KC_2, KC_3, KC_PPLS, KC_NO, KC_NO, KC_WHOM, KC_WBAK, KC_WFWD, KC_WSCH, KC_RSFT, \
_______, KC_0, KC_DOT, KC_ENT, _______, _______, _______, _______, _______, _______, _______, _______),

[_ADJUST] = LAYOUT_ortho_4x12(
_______, NK_ON, NK_OFF, EE_CLR, QK_BOOT, KC_MSTP, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN2, KC_INS, \
[_FUNCTION_ORTHO] = LAYOUT_ortho_4x12(
_______, KC_7, KC_8, KC_9, KC_PAST, KC_MSTP, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN2, KC_INS, \
_______, KC_4, KC_5, KC_6, KC_PMNS, AG_NORM, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, _______, \
KC_0, KC_1, KC_2, KC_3, KC_PPLS, KC_MPRV, KC_MNXT, KC_MUTE, KC_ACL0, KC_ACL1, KC_ACL2, _______, \
_______, KC_PDOT, KC_PEQL, KC_PSLS,_______, _______, _______, _______, _______, _______, _______, J_ADJ),

[_ADJUST_ORTHO] = LAYOUT_ortho_4x12(
_______, NK_ON, NK_OFF, EE_CLR, QK_BOOT, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, \
_______, GE_SWAP, GE_NORM, DB_TOGG, AG_SWAP, AG_NORM, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, _______, \
_______, KC_LYRC, KC_FIRST, KC_CAPS, KC_NO, KC_MPRV, KC_MNXT, KC_MUTE, KC_ACL0, KC_ACL1, KC_ACL2, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)
Expand Down
2 changes: 2 additions & 0 deletions keyboards/preonic/keymaps/badger/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../default/keymap.c"
#else

#undef AUDIO_ENABLE

#include "ortho.h"

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
Expand Down
8 changes: 4 additions & 4 deletions users/badger/ortho.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
void playSongForLayer(int currentLayer) {
#ifdef AUDIO_ENABLE
switch (currentLayer) {
case _QWERTY_LINUX:
case _QWERTY_LINUX_ORTHO:
PLAY_SONG(defaultLayerSong);
break;
case _MOVE_LINUX:
case _MOVE_LINUX_ORTHO:
PLAY_SONG(moveLayerSong);
break;
case _QWERTY_MAC:
case _QWERTY_MAC_ORTHO:
PLAY_SONG(macLayerSong);
break;
case _MOVE_MAC:
case _MOVE_MAC_ORTHO:
PLAY_SONG(moveLayerSong);
break;
case _RAISE:
Expand Down
4 changes: 3 additions & 1 deletion users/badger/ortho.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ enum OrthoLayers {
_MOVE_LINUX_ORTHO,
_RAISE,
_LOWER,
_FUNCTION_ORTHO
_FUNCTION_ORTHO,
_ADJUST_ORTHO
};

enum OrthoKeys {
Expand All @@ -36,6 +37,7 @@ enum OrthoKeys {
#define RAISE LT(_RAISE, KC_SPACE)
#define LOWER LT(_LOWER, KC_SPACE)
#define J_FUN MO(_FUNCTION_ORTHO)
#define J_ADJ MO(_ADJUST_ORTHO)
#define MOMAC LT(_MOVE_MAC_ORTHO, KC_ESC)
#define MOLNX LT(_MOVE_LINUX_ORTHO, KC_ESC)

Expand Down

0 comments on commit 130db7b

Please sign in to comment.