diff options
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/README.md | 19 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/keyboard.json | 103 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/keymaps/default/keymap.c | 76 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/keymaps/default/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/keymaps/via/keymap.c | 90 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/keymaps/via/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/keymaps/vial/config.h | 10 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/keymaps/vial/keymap.c | 90 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/keymaps/vial/rules.mk | 4 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/keymaps/vial/vial.json | 32 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/lumberjack_c.c | 27 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/lumberjack_c.h | 25 | ||||
| -rw-r--r-- | keyboards/42keebs/lumberjack_c/rules.mk | 1 |
13 files changed, 480 insertions, 0 deletions
diff --git a/keyboards/42keebs/lumberjack_c/README.md b/keyboards/42keebs/lumberjack_c/README.md new file mode 100644 index 0000000000..2726068236 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/README.md @@ -0,0 +1,19 @@ +# Lumberjack-C + +Through-hole ortholinear 60% keyboard PCB + + + +12x5 ortholinear PCB for 60% tray mount cases with only through hole components. + +* [Original design](https://github.com/peej/lumberjack-keyboard) by [Paul James](https://github.com/peej) +* Modified by [piit79 / 42. Keebs](https://github.com/piit79/lumberjack-keyboard) +* Uses ATmega328p MCU with vusb + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb 42keebs/lumberjack_c -km vial + +## Bootloader + +Use USBaspLoader in [hsgw's repository](https://github.com/hsgw/USBaspLoader/tree/plaid). diff --git a/keyboards/42keebs/lumberjack_c/keyboard.json b/keyboards/42keebs/lumberjack_c/keyboard.json new file mode 100644 index 0000000000..1587e60bfd --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/keyboard.json @@ -0,0 +1,103 @@ +{ + "keyboard_name": "Lumberjack-C", + "manufacturer": "42. Keebs", + "url": "https://github.com/piit79/lumberjack-keyboard", + "maintainer": "piit79", + "features": { + "bootmagic": false, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": false + }, + "usb": { + "vid": "0x706A", + "pid": "0x0002", + "device_version": "0.0.1", + "max_power": 100 + }, + "matrix_pins": { + "cols": ["B0", "D7", "D6", "D5", "D4", "D1", "D0", "C1", "C2", "C3"], + "rows": ["C0", "B5", "B4", "B3", "B2", "B1"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "C5", "pin_b": "C4", "resolution": 2} + ] + }, + "processor": "atmega328p", + "bootloader": "usbasploader", + "community_layouts": ["ortho_5x12"], + "layouts": { + "LAYOUT_ortho_5x12": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [1, 4], "x": 5, "y": 0}, + {"matrix": [1, 9], "x": 6, "y": 0}, + {"matrix": [0, 9], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 7], "x": 9, "y": 0}, + {"matrix": [0, 6], "x": 10, "y": 0}, + {"matrix": [0, 5], "x": 11, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [2, 3], "x": 4, "y": 1}, + {"matrix": [2, 4], "x": 5, "y": 1}, + {"matrix": [2, 9], "x": 6, "y": 1}, + {"matrix": [2, 8], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 7], "x": 9, "y": 1}, + {"matrix": [1, 6], "x": 10, "y": 1}, + {"matrix": [1, 5], "x": 11, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [3, 2], "x": 3, "y": 2}, + {"matrix": [3, 3], "x": 4, "y": 2}, + {"matrix": [3, 4], "x": 5, "y": 2}, + {"matrix": [3, 9], "x": 6, "y": 2}, + {"matrix": [3, 8], "x": 7, "y": 2}, + {"matrix": [3, 7], "x": 8, "y": 2}, + {"matrix": [2, 7], "x": 9, "y": 2}, + {"matrix": [2, 6], "x": 10, "y": 2}, + {"matrix": [2, 5], "x": 11, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [4, 1], "x": 2, "y": 3}, + {"matrix": [4, 2], "x": 3, "y": 3}, + {"matrix": [4, 3], "x": 4, "y": 3}, + {"matrix": [4, 4], "x": 5, "y": 3}, + {"matrix": [4, 9], "x": 6, "y": 3}, + {"matrix": [4, 8], "x": 7, "y": 3}, + {"matrix": [4, 7], "x": 8, "y": 3}, + {"matrix": [4, 6], "x": 9, "y": 3}, + {"matrix": [3, 6], "x": 10, "y": 3}, + {"matrix": [3, 5], "x": 11, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4}, + {"matrix": [5, 0], "x": 1, "y": 4}, + {"matrix": [5, 1], "x": 2, "y": 4}, + {"matrix": [5, 2], "x": 3, "y": 4}, + {"matrix": [5, 3], "x": 4, "y": 4}, + {"matrix": [5, 4], "x": 5, "y": 4}, + {"matrix": [5, 9], "x": 6, "y": 4}, + {"matrix": [5, 8], "x": 7, "y": 4}, + {"matrix": [5, 7], "x": 8, "y": 4}, + {"matrix": [5, 6], "x": 9, "y": 4}, + {"matrix": [5, 5], "x": 10, "y": 4}, + {"matrix": [4, 5], "x": 11, "y": 4} + ] + } + } +} diff --git a/keyboards/42keebs/lumberjack_c/keymaps/default/keymap.c b/keyboards/42keebs/lumberjack_c/keymaps/default/keymap.c new file mode 100644 index 0000000000..9202958818 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/keymaps/default/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2020 Paul James + * + * 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 + +enum layers { + _QWERTY = 0, + _FUNCTION +}; + +#define FN MO(_FUNCTION) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shft | Z | X | C | V | B | | N | M | , | . | / | Entr | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Fn | Alt | Cmd | Fn | Spac | | Spac | Fn | Left | Down | Up | Rght | + * `-----------------------------------------' `-----------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, 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, FN, KC_LALT, KC_LGUI, FN, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Function +* ,------------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' + */ +[_FUNCTION] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +) + +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, +}; +#endif diff --git a/keyboards/42keebs/lumberjack_c/keymaps/default/rules.mk b/keyboards/42keebs/lumberjack_c/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/42keebs/lumberjack_c/keymaps/via/keymap.c b/keyboards/42keebs/lumberjack_c/keymaps/via/keymap.c new file mode 100644 index 0000000000..f9f8e3a2d6 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/keymaps/via/keymap.c @@ -0,0 +1,90 @@ +/* Copyright 2020 Paul James + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, 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, MO(2), KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[1] = LAYOUT_ortho_5x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[2] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[3] = LAYOUT_ortho_5x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), }, +}; +#endif + +void keyboard_pre_init_user() { +// To enable indicator LEDs and disable encoder support, set "ENCODER_MAP_ENABLE = no" in rules.mk +#if !defined(ENCODER_MAP_ENABLE) + writePin(LED1, true); + writePin(LED2, true); +#endif +} + +void keyboard_post_init_user() { +#if !defined(ENCODER_MAP_ENABLE) + writePin(LED1, false); + writePin(LED2, false); +#endif +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#if !defined(ENCODER_MAP_ENABLE) + writePin(LED1, record->event.pressed); +#endif + + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { +#if !defined(ENCODER_MAP_ENABLE) + writePin(LED2, state); +#endif + + return state; +} diff --git a/keyboards/42keebs/lumberjack_c/keymaps/via/rules.mk b/keyboards/42keebs/lumberjack_c/keymaps/via/rules.mk new file mode 100644 index 0000000000..f1adcab005 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/42keebs/lumberjack_c/keymaps/vial/config.h b/keyboards/42keebs/lumberjack_c/keymaps/vial/config.h new file mode 100644 index 0000000000..805bf9a1c4 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/keymaps/vial/config.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0xBE, 0x78, 0x4B, 0x49, 0x48, 0xB7, 0xA9, 0x77} + + +/* this is the left upper and left lower key */ +#define VIAL_UNLOCK_COMBO_ROWS { 0, 4 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 0 } diff --git a/keyboards/42keebs/lumberjack_c/keymaps/vial/keymap.c b/keyboards/42keebs/lumberjack_c/keymaps/vial/keymap.c new file mode 100644 index 0000000000..f9f8e3a2d6 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/keymaps/vial/keymap.c @@ -0,0 +1,90 @@ +/* Copyright 2020 Paul James + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, 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, MO(2), KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +[1] = LAYOUT_ortho_5x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[2] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +[3] = LAYOUT_ortho_5x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), }, +}; +#endif + +void keyboard_pre_init_user() { +// To enable indicator LEDs and disable encoder support, set "ENCODER_MAP_ENABLE = no" in rules.mk +#if !defined(ENCODER_MAP_ENABLE) + writePin(LED1, true); + writePin(LED2, true); +#endif +} + +void keyboard_post_init_user() { +#if !defined(ENCODER_MAP_ENABLE) + writePin(LED1, false); + writePin(LED2, false); +#endif +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#if !defined(ENCODER_MAP_ENABLE) + writePin(LED1, record->event.pressed); +#endif + + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { +#if !defined(ENCODER_MAP_ENABLE) + writePin(LED2, state); +#endif + + return state; +} diff --git a/keyboards/42keebs/lumberjack_c/keymaps/vial/rules.mk b/keyboards/42keebs/lumberjack_c/keymaps/vial/rules.mk new file mode 100644 index 0000000000..af31994bc2 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/keymaps/vial/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +KEY_OVERRIDE_ENABLE = no +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/42keebs/lumberjack_c/keymaps/vial/vial.json b/keyboards/42keebs/lumberjack_c/keymaps/vial/vial.json new file mode 100644 index 0000000000..ea9abd4585 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/keymaps/vial/vial.json @@ -0,0 +1,32 @@ +{ + "name": "Lumberjack-C", + "vendorId": "0x706A", + "productId": "0x0002", + "lighting": "none", + "matrix": { + "rows": 6, + "cols": 10 + }, + "layouts": { + "labels": [ + [ + "Bottom Row", + "Grid", + "2u Spacebars", + "2u left", + "2u right" + ], + "Encoder" + ], + "keymap": [ + ["0,0", "0,1", "0,2", "0,3", "0,4", "1,4",{"x":3},"1,9", "0,9", "0,8", "0,7", "0,6", "0,5"], + ["1,0", "1,1", "1,2", "1,3", "2,3", "2,4",{"x":3},"2,9", "2,8", "1,8", "1,7", "1,6", "1,5"], + ["2,0", "2,1", "2,2", "3,2", "3,3", "3,4",{"x":3},"3,9", "3,8", "3,7", "2,7", "2,6", "2,5"], + ["3,0", "3,1", "4,1", "4,2", "4,3", "4,4",{"x":0.5},"0,0\n\n\n1,1\n\n\n\n\n\ne","0,1\n\n\n1,1\n\n\n\n\n\ne",{"x":0.5},"4,9", "4,8", "4,7", "4,6", "3,6", "3,5"], + ["4,0", "5,0", "5,1", "5,2", "5,3\n\n\n0,0", "5,4\n\n\n0,0",{"x":3},"5,9\n\n\n0,0", "5,8\n\n\n0,0", "5,7", "5,6", "5,5", "4,5"], + [{"y":0.25,"x":4,"w":2},"5,4\n\n\n0,1",{"x":3,"w":2},"5,9\n\n\n0,1"], + [{"x":4,"w":2},"5,4\n\n\n0,2",{"x":3},"5,9\n\n\n0,2", "5,8\n\n\n0,2"], + [{"x":4},"5,3\n\n\n0,3", "5,4\n\n\n0,3",{"x":3,"w":2},"5,9\n\n\n0,3"] + ] + } +} diff --git a/keyboards/42keebs/lumberjack_c/lumberjack_c.c b/keyboards/42keebs/lumberjack_c/lumberjack_c.c new file mode 100644 index 0000000000..e7125a8570 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/lumberjack_c.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Paul James + * + * 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 "lumberjack_c.h" + +void keyboard_pre_init_kb() { +// To enable indicator LEDs and disable encoder support, set "ENCODER_MAP_ENABLE = no" in rules.mk +#if !defined(ENCODER_MAP_ENABLE) + setPinOutput(LED1); + setPinOutput(LED2); +#endif + + keyboard_pre_init_user(); +} diff --git a/keyboards/42keebs/lumberjack_c/lumberjack_c.h b/keyboards/42keebs/lumberjack_c/lumberjack_c.h new file mode 100644 index 0000000000..b9451d45af --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/lumberjack_c.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Paul James + * + * 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 + +#include "quantum.h" + +// To restore LED functionality, set "features.encoder_map" to "false" in info.json +#if !defined(ENCODER_MAP_ENABLE) +#define LED1 C5 +#define LED2 C4 +#endif diff --git a/keyboards/42keebs/lumberjack_c/rules.mk b/keyboards/42keebs/lumberjack_c/rules.mk new file mode 100644 index 0000000000..a2854804b6 --- /dev/null +++ b/keyboards/42keebs/lumberjack_c/rules.mk @@ -0,0 +1 @@ +# All build options now in info.json |
