diff options
author | Mika Kuitunen <mika.kuitunen@hotmail.com> | 2020-10-23 06:08:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 20:08:56 -0700 |
commit | e7d8ccdbb2c14af9cf37be680af1d8633729b65a (patch) | |
tree | 8a75e70ab60e89f75c6840f66d689956b7786277 /keyboards/tunks | |
parent | c45d7e526c9c5315c3fe2e831b01778c51b7a953 (diff) |
[Keyboard] Add support for Tunks Ergo33 keyboard (#10665)
* [Keyboard] Add support for Tunks Ergo33
* [Keyboard] Ergo33: Code style fixes
* [Keyboard] Ergo33: Add GPL license headers
* [Keyboard] Ergo33: remove keymap_config declarations
* Apply suggestions from code review
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/tunks')
-rw-r--r-- | keyboards/tunks/ergo33/config.h | 68 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/ergo33.c | 17 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/ergo33.h | 57 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/info.json | 18 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/keymaps/default/config.h | 26 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/keymaps/default/keymap.c | 110 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/keymaps/default/readme.md | 11 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/keymaps/prpro/config.h | 28 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/keymaps/prpro/keymap.c | 164 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/keymaps/prpro/readme.md | 5 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/keymaps/prpro/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/keymaps/rgb/config.h | 24 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/keymaps/rgb/keymap.c | 33 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/keymaps/rgb/readme.md | 3 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/readme.md | 20 | ||||
-rw-r--r-- | keyboards/tunks/ergo33/rules.mk | 24 |
16 files changed, 609 insertions, 0 deletions
diff --git a/keyboards/tunks/ergo33/config.h b/keyboards/tunks/ergo33/config.h new file mode 100644 index 0000000000..96cc5b93b0 --- /dev/null +++ b/keyboards/tunks/ergo33/config.h @@ -0,0 +1,68 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xA0A1 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kulmajaba +#define PRODUCT Ergo33 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom +*/ +#define MATRIX_ROW_PINS { F0, F1, B5, B4, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, C7, C6, B6 } + +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Underglow + top RGB configuration */ +#define RGB_DI_PIN D4 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define ENCODERS_PAD_A { D5 } +#define ENCODERS_PAD_B { D3 } + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/tunks/ergo33/ergo33.c b/keyboards/tunks/ergo33/ergo33.c new file mode 100644 index 0000000000..9426558167 --- /dev/null +++ b/keyboards/tunks/ergo33/ergo33.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 "ergo33.h" diff --git a/keyboards/tunks/ergo33/ergo33.h b/keyboards/tunks/ergo33/ergo33.h new file mode 100644 index 0000000000..d3deb97485 --- /dev/null +++ b/keyboards/tunks/ergo33/ergo33.h @@ -0,0 +1,57 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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" + +/* The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +/* Matrix layout + * ,---------. + * | 00 | 01 |------------------------. + * |----|----| 02 | 03 | 04 | 05 | 06 | + * | 10 | 11 |----|----|----|----|----| + * |----|----| 12 | 13 | 14 | 14 | 16 | + * | 20 | 21 |----|----|----|----|----| + * |----|----| 22 | 23 | 24 | 25 | 26 | + * | 30 | 31 |----|----|----|----|----| ,----. + * |----|----| 32 | 33 | 34 | 35 | 36 | | 46 | + * | 40 | 41 |---------------------------|----' + * `---------' | 43 | 44 | 45 | + * `--------------' + */ + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, \ + k10, k11, k12, k13, k14, k15, k16, \ + k20, k21, k22, k23, k24, k25, k26, \ + k30, k31, k32, k33, k34, k35, k36, \ + k40, k41, k46, \ + k43, k44, k45 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06 }, \ + { k10, k11, k12, k13, k14, k15, k16 }, \ + { k20, k21, k22, k23, k24, k25, k26 }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, KC_NO, k43, k44, k45, k46 } \ +} diff --git a/keyboards/tunks/ergo33/info.json b/keyboards/tunks/ergo33/info.json new file mode 100644 index 0000000000..0d4f00b940 --- /dev/null +++ b/keyboards/tunks/ergo33/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Ergo33", + "url": "https://github.com/kulmajaba/tunks-keyboard", + "width": 9, + "height": 6, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x": 0, "y": 0}, {"x": 1, "y": 0}, {"x": 2, "y": 0.4}, {"x": 3, "y": 0.3}, {"x": 4, "y": 0.4}, {"x": 5, "y": 0.5}, {"x": 6, "y": 0.5}, + {"x": 0, "y": 1}, {"x": 1, "y": 1}, {"x": 2, "y": 1.4}, {"x": 3, "y": 1.3}, {"x": 4, "y": 1.4}, {"x": 5, "y": 1.5}, {"x": 6, "y": 1.5}, + {"x": 0, "y": 2}, {"x": 1, "y": 2}, {"x": 2, "y": 2.4}, {"x": 3, "y": 2.3}, {"x": 4, "y": 2.4}, {"x": 5, "y": 2.5}, {"x": 6, "y": 2.5}, + {"x": 0, "y": 3}, {"x": 1, "y": 3}, {"x": 2, "y": 3.4}, {"x": 3, "y": 3.3}, {"x": 4, "y": 3.4}, {"x": 5, "y": 3.5}, {"x": 6, "y": 3.5}, {"x": 8, "y": 3.5}, + {"x": 0, "y": 4}, {"x": 1, "y": 4}, + {"x": 4.7, "y": 4.7}, {"x": 5.8, "y": 4.7}, {"x": 6.8, "y": 4.8} + ] + } + } +}
\ No newline at end of file diff --git a/keyboards/tunks/ergo33/keymaps/default/config.h b/keyboards/tunks/ergo33/keymaps/default/config.h new file mode 100644 index 0000000000..0fd2ef93a4 --- /dev/null +++ b/keyboards/tunks/ergo33/keymaps/default/config.h @@ -0,0 +1,26 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 + +/* RGB LED count + * No external LED PCB: 10 + * External LED PCB: 14 + */ +#define RGBLED_NUM 14 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LAYERS +#define RGBLIGHT_SLEEP
\ No newline at end of file diff --git a/keyboards/tunks/ergo33/keymaps/default/keymap.c b/keyboards/tunks/ergo33/keymaps/default/keymap.c new file mode 100644 index 0000000000..e26e556cb3 --- /dev/null +++ b/keyboards/tunks/ergo33/keymaps/default/keymap.c @@ -0,0 +1,110 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 + +/* Each layer gets a name for readability, which is then used in the keymap matrix below. + * The underscores don't mean anything - you can have a layer called STUFF or any other name. + */ +enum layers { + _BASE = 0, + _RGB, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_ESC, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_Y, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_H, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_N, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, TG(_RGB), + KC_LGUI, KC_LCTL, KC_ENT, + KC_LALT, KC_SPC, KC_ENT + ), + + [_RGB] = LAYOUT( + RGB_RMOD, RGB_MOD, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_HUD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_SAD, RGB_SAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(_RGB), + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_MS_WH_DOWN); + } else { + tap_code(KC_MS_WH_UP); + } + } +} +#endif + + +#ifdef RGBLIGHT_LAYERS +#define HUE_PRIMARY 10 +#define HSV_OFF 0, 0, 0 +#define HSV_CAPS HUE_PRIMARY, 255, 64 +#define HSV_LAYER_BASE HUE_PRIMARY, 255, 64 +#define HSV_LAYER_RGB 213, 255, 64 + +const rgblight_segment_t PROGMEM ug_default_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {10, 4, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ug_caps_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {11, 1, HSV_CAPS} +); + +const rgblight_segment_t PROGMEM ug_base_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {13, 1, HSV_LAYER_BASE} +); + +const rgblight_segment_t PROGMEM ug_rgb_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {13, 1, HSV_LAYER_RGB} +); + +/* Define layer order, later layers take precedence */ +const rgblight_segment_t* const PROGMEM ug_layers[] = RGBLIGHT_LAYERS_LIST( + ug_default_layer, + ug_caps_layer, + ug_base_layer, + ug_rgb_layer +); + +void keyboard_post_init_user(void) { + /* Enable the LED layers and set the initial state */ + rgblight_layers = ug_layers; + rgblight_set_layer_state(0, true); + rgblight_set_layer_state(2, true); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + /* Both layers will light up if both kb layers are active, latter overrides */ + rgblight_set_layer_state(2, layer_state_cmp(state, 0)); + rgblight_set_layer_state(3, layer_state_cmp(state, 1)); + return state; +} + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + return true; +} +#endif diff --git a/keyboards/tunks/ergo33/keymaps/default/readme.md b/keyboards/tunks/ergo33/keymaps/default/readme.md new file mode 100644 index 0000000000..40c5e0f496 --- /dev/null +++ b/keyboards/tunks/ergo33/keymaps/default/readme.md @@ -0,0 +1,11 @@ +# Default Ergo33 Layout + +This is the default layout for the Ergo33. It mostly follows the left side of a normal keyboard, except since there is an extra column on the left, `0` is above `TAB` and the left column is: +``` +ESC +Y +H +N +GUI (Win) +``` +The encoder acts as a mouse scrollwheel and encoder press is `Enter`. On the top LEDs the 1st is a layer indicator and the 3rd is a caps lock indicator. diff --git a/keyboards/tunks/ergo33/keymaps/prpro/config.h b/keyboards/tunks/ergo33/keymaps/prpro/config.h new file mode 100644 index 0000000000..4fc3b21322 --- /dev/null +++ b/keyboards/tunks/ergo33/keymaps/prpro/config.h @@ -0,0 +1,28 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 + +/* RGB LED count + * No external LED PCB: 10 + * External LED PCB: 14 + */ +#define RGBLED_NUM 14 +#define RGBLIGHT_LAYERS +#define RGBLIGHT_SLEEP + +/* Tap dance delay in ms */ +#define TAPPING_TERM 175
\ No newline at end of file diff --git a/keyboards/tunks/ergo33/keymaps/prpro/keymap.c b/keyboards/tunks/ergo33/keymaps/prpro/keymap.c new file mode 100644 index 0000000000..500e5dba1c --- /dev/null +++ b/keyboards/tunks/ergo33/keymaps/prpro/keymap.c @@ -0,0 +1,164 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 "keymap_finnish.h" + +enum layers { + _BASE = 0, + _PRPRO, + _PRPRO2, +}; + +/* Tap Dance declarations */ +enum { + TD_1, + TD_2, + TD_3, + TD_4, + TD_5, + TD_6, + TD_COMMA, + TD_HOME, + TD_K, + TD_DEL, + TD_X, + TD_C, + TD_V, + TD_Z +}; + +/* Tap Dance definitions */ +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_1] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_1), LCTL(LSFT(KC_1))), + [TD_2] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_2), LCTL(LSFT(KC_2))), + [TD_3] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_3), LCTL(LSFT(KC_3))), + [TD_4] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_4), LCTL(LSFT(KC_4))), + [TD_5] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_5), LCTL(LSFT(KC_5))), + [TD_6] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_6), LCTL(LSFT(KC_6))), + [TD_COMMA] = ACTION_TAP_DANCE_DOUBLE(KC_COMMA, KC_DOT), + [TD_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END), + [TD_K] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_K), LCTL(LSFT(KC_K))), + [TD_DEL] = ACTION_TAP_DANCE_DOUBLE(KC_DEL, LSFT(KC_DEL)), + [TD_X] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_X), KC_S), + [TD_C] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_C), KC_M), + [TD_V] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_V), LCTL(KC_L)), + [TD_Z] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_Z), LCTL(LSFT(KC_Z))) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_ESC, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_Y, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_H, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_N, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, TG(_PRPRO), + KC_LGUI, KC_LCTL, KC_ENT, + KC_LALT, KC_SPC, KC_ENT + ), + + [_PRPRO] = LAYOUT( + KC_ESC, KC_M, KC_V, KC_UP, KC_A, KC_Y, KC_C, + KC_1, KC_2, KC_LEFT, KC_DOWN, KC_RIGHT, TD(TD_Z), TD(TD_DEL), + FI_SECT, TD(TD_HOME), KC_J, KC_K, KC_L, TD(TD_K), TG(_PRPRO2), + KC_S, KC_LSFT, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_S), TG(_PRPRO), + LCTL(KC_L), KC_LCTL, KC_ENT, + KC_LALT, KC_SPC, KC_ENT + ), + + [_PRPRO2] = LAYOUT( + KC_TRNS, KC_TRNS, TD(TD_1), TD(TD_2), TD(TD_3), TD(TD_4), TD(TD_5), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_I, KC_O, TD(TD_COMMA), KC_TRNS, TG(_PRPRO2), + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_MS_WH_DOWN); + } else { + tap_code(KC_MS_WH_UP); + } + } +} +#endif + +#ifdef RGBLIGHT_LAYERS +#define HUE_PRIMARY 10 +#define HSV_PRIMARY HUE_PRIMARY, 255, 255 +#define HSV_OFF 0, 0, 0 +#define HSV_CAPS HUE_PRIMARY, 255, 64 +#define HSV_LAYER_BASE HUE_PRIMARY, 255, 64 +#define HSV_LAYER_PRPRO 213, 255, 64 +#define HSV_LAYER_PRPRO2 184, 255, 64 + +const rgblight_segment_t PROGMEM ug_default_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 14, HSV_PRIMARY}, + {10, 4, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ug_caps_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {11, 1, HSV_CAPS} +); + +const rgblight_segment_t PROGMEM ug_base_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {13, 1, HSV_LAYER_BASE} +); + +const rgblight_segment_t PROGMEM ug_prpro_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {13, 1, HSV_LAYER_PRPRO} +); + +const rgblight_segment_t PROGMEM ug_prpro2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {13, 1, HSV_LAYER_PRPRO2} +); + +/* Define layer order, later layers take precedence */ +const rgblight_segment_t* const PROGMEM ug_layers[] = RGBLIGHT_LAYERS_LIST( + ug_default_layer, + ug_caps_layer, + ug_base_layer, + ug_prpro_layer, + ug_prpro2_layer +); + +void keyboard_post_init_user(void) { + /* Enable the LED layers */ + rgblight_layers = ug_layers; + rgblight_set_layer_state(0, true); + rgblight_set_layer_state(2, true); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(0, true); + /* Both layers will light up if both kb layers are active */ + rgblight_set_layer_state(2, layer_state_cmp(state, 0)); + rgblight_set_layer_state(3, layer_state_cmp(state, 1)); + rgblight_set_layer_state(4, layer_state_cmp(state, 2)); + return state; +} + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + return true; +} +#endif diff --git a/keyboards/tunks/ergo33/keymaps/prpro/readme.md b/keyboards/tunks/ergo33/keymaps/prpro/readme.md new file mode 100644 index 0000000000..d9507df738 --- /dev/null +++ b/keyboards/tunks/ergo33/keymaps/prpro/readme.md @@ -0,0 +1,5 @@ +# Ergo33 Premiere Pro Layout + +Default layout + Premiere pro editing layout for Ergo33. + +On this layout, the second and third layers are Adobe Premiere Pro hotkeys. You'll need to use [My custom shortcuts](https://github.com/kulmajaba/tunks-keyboard/blob/master/Ergo33%20prpro.kys) for it to work. diff --git a/keyboards/tunks/ergo33/keymaps/prpro/rules.mk b/keyboards/tunks/ergo33/keymaps/prpro/rules.mk new file mode 100644 index 0000000000..2176e6dc2b --- /dev/null +++ b/keyboards/tunks/ergo33/keymaps/prpro/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes # Tap dance
\ No newline at end of file diff --git a/keyboards/tunks/ergo33/keymaps/rgb/config.h b/keyboards/tunks/ergo33/keymaps/rgb/config.h new file mode 100644 index 0000000000..dceb82945e --- /dev/null +++ b/keyboards/tunks/ergo33/keymaps/rgb/config.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 + +/* RGB LED count + * No external LED PCB: 10 + * External LED PCB: 14 + */ +#define RGBLED_NUM 10 +#define RGBLIGHT_ANIMATIONS
\ No newline at end of file diff --git a/keyboards/tunks/ergo33/keymaps/rgb/keymap.c b/keyboards/tunks/ergo33/keymaps/rgb/keymap.c new file mode 100644 index 0000000000..9ea18d2791 --- /dev/null +++ b/keyboards/tunks/ergo33/keymaps/rgb/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 { + _BASE = 0, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + RGB_RMOD, RGB_MOD, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_HUD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_SAD, RGB_SAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/tunks/ergo33/keymaps/rgb/readme.md b/keyboards/tunks/ergo33/keymaps/rgb/readme.md new file mode 100644 index 0000000000..bafc87e5a8 --- /dev/null +++ b/keyboards/tunks/ergo33/keymaps/rgb/readme.md @@ -0,0 +1,3 @@ +# Ergo33 RGB Layout + +Pure RGB lighting layout for product photography. diff --git a/keyboards/tunks/ergo33/readme.md b/keyboards/tunks/ergo33/readme.md new file mode 100644 index 0000000000..d825ef3af8 --- /dev/null +++ b/keyboards/tunks/ergo33/readme.md @@ -0,0 +1,20 @@ +# Ergo33 + +A one-handed 33-key keypad for gaming, macros etc. + +* Keyboard Maintainer: [Mika Kuitunen / kulmajaba](https://github.com/kulmajaba) +* Hardware Supported: Ergo33 PCB, ATmega32U4 MCU, Kailh hot-swap sockets, EC11 rotary encoder +* Hardware Availability: Open source, schema and layout: [Github](https://github.com/kulmajaba/tunks-keyboard) + +![](https://i.imgur.com/G5nAspYl.jpg) +![](https://i.imgur.com/snLIZrEl.jpg) + +Make example for this keyboard (after setting up your build environment): + + make ergo33:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +### Bootloader mode + +To get the keyboard into bootloader mode, press the switch `SW1` on the backside of the PCB once while the keyboard is connected to USB. diff --git a/keyboards/tunks/ergo33/rules.mk b/keyboards/tunks/ergo33/rules.mk new file mode 100644 index 0000000000..fcd2cf52be --- /dev/null +++ b/keyboards/tunks/ergo33/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +EXTRAKEY_ENABLE = yes # Audio control and System control +MOUSEKEY_ENABLE = yes # Mouse keys +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +ENCODER_ENABLE = yes # Rotary encoders |