summaryrefslogtreecommitdiff
path: root/keyboards/woodkeys/scarletbandana
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/woodkeys/scarletbandana')
-rw-r--r--keyboards/woodkeys/scarletbandana/config.h57
-rw-r--r--keyboards/woodkeys/scarletbandana/info.json10
-rw-r--r--keyboards/woodkeys/scarletbandana/keymaps/default/keymap.c161
-rw-r--r--keyboards/woodkeys/scarletbandana/keymaps/default/readme.md1
-rw-r--r--keyboards/woodkeys/scarletbandana/readme.md11
-rw-r--r--keyboards/woodkeys/scarletbandana/rules.mk19
-rw-r--r--keyboards/woodkeys/scarletbandana/scarletbandana.c22
-rw-r--r--keyboards/woodkeys/scarletbandana/scarletbandana.h38
8 files changed, 319 insertions, 0 deletions
diff --git a/keyboards/woodkeys/scarletbandana/config.h b/keyboards/woodkeys/scarletbandana/config.h
new file mode 100644
index 0000000000..b9c8dd9b0f
--- /dev/null
+++ b/keyboards/woodkeys/scarletbandana/config.h
@@ -0,0 +1,57 @@
+/*
+Copyright 2019 Cole Markham
+
+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 0x6969
+#define DEVICE_VER 0x0001
+#define MANUFACTURER WoodKeys.click
+#define PRODUCT Scarlet Bandana Version IV mark.2
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 17
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION ROW2COL
+
+#ifdef RGBLIGHT_ENABLE
+#define RGB_DI_PIN D3
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 8 // Number of LEDs
+#endif
+
+#define MATRIX_ROW_PINS { D4, D6, D7, B4, B5 }
+#define MATRIX_COL_PINS { B2, B3, B7, B1, F5, F4, F6, F7, B0, F0, F1, D0, D1, D2, D5, B6, C7 }
+
+#define QMK_SPEAKER C6
+
+#ifdef AUDIO_ENABLE
+#define AUDIO_PIN C6
+#define STARTUP_SONG SONG(PREONIC_SOUND)
+// Disable music mode to keep the firmware size down
+#define NO_MUSIC_MODE
+#endif
+
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+
+#define DEBOUNCE 5
diff --git a/keyboards/woodkeys/scarletbandana/info.json b/keyboards/woodkeys/scarletbandana/info.json
new file mode 100644
index 0000000000..c700093194
--- /dev/null
+++ b/keyboards/woodkeys/scarletbandana/info.json
@@ -0,0 +1,10 @@
+{
+ "keyboard_name": "Scarlet Bandana Version IV Mark 2",
+ "url": "",
+ "maintainer": "qmk",
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0}, {"x":16.5, "y":0}, {"x":17.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2.5, "y":1, "w":1.5}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1, "w":1.5}, {"x":17.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.5, "y":2, "w":1.75}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":8.25, "y":2}, {"x":9.25, "y":2}, {"x":10.25, "y":2}, {"x":11.25, "y":2}, {"x":12.25, "y":2}, {"x":13.25, "y":2}, {"x":14.25, "y":2}, {"x":15.25, "y":2, "w":2.25}, {"x":17.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.5, "y":3, "w":2.25}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3}, {"x":14.75, "y":3, "w":1.75}, {"x":16.5, "y":3}, {"x":17.5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":1.25}, {"x":6.25, "y":4, "w":2.25}, {"x":8.5, "y":4, "w":1.75}, {"x":10.25, "y":4, "w":2.25}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":16.5, "y":4}, {"x":17.5, "y":4}]
+ }
+ }
+}
diff --git a/keyboards/woodkeys/scarletbandana/keymaps/default/keymap.c b/keyboards/woodkeys/scarletbandana/keymaps/default/keymap.c
new file mode 100644
index 0000000000..7b2687a607
--- /dev/null
+++ b/keyboards/woodkeys/scarletbandana/keymaps/default/keymap.c
@@ -0,0 +1,161 @@
+/* Copyright 2019 Cole Markham
+ *
+ * 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
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _ADJUST 16
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ LOWER,
+ RAISE,
+ ADJUST,
+};
+
+// define variables for reactive RGB
+bool TOG_STATUS = false;
+int RGB_current_mode;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = LAYOUT_all(
+ KC_F1, KC_F2, KC_ESC, 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_DEL, KC_PGUP,
+ KC_F3, KC_F4, 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_PGDN,
+ KC_F5, KC_F6, 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_HOME,
+ KC_F7, KC_F8, KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLASH,KC_RSFT,KC_UP,KC_END,
+ KC_F9, KC_F10, KC_LCTL,KC_LGUI,KC_LALT, RAISE, KC_SPACE, LOWER, KC_RALT,KC_APP,KC_RCTRL,KC_LEFT,KC_DOWN,KC_RIGHT),
+
+ [_RAISE] = LAYOUT_all(
+ RGB_MOD, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,
+ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,
+ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,
+ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
+ _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______),
+
+ [_LOWER] = LAYOUT_all(
+ RGB_MOD, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,
+ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,
+ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,
+ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
+ _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______),
+
+ [_ADJUST] = LAYOUT_all(
+ RESET, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,
+ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,
+ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,
+ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
+ _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______)
+};
+
+// Setting ADJUST layer RGB back to default
+void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+ if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
+#ifdef RGBLIGHT_ENABLE
+ rgblight_mode(RGB_current_mode);
+#endif
+ layer_on(layer3);
+ } else {
+ layer_off(layer3);
+ }
+}
+
+#ifdef AUDIO_ENABLE
+
+ float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case LOWER:
+ if (record->event.pressed) {
+ //not sure how to have keyboard check mode and set it to a variable, so my work around
+ //uses another variable that would be set to true after the first time a reactive key is pressed.
+ if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
+ } else {
+ TOG_STATUS = !TOG_STATUS;
+#ifdef RGBLIGHT_ENABLE
+ rgblight_mode(16);
+#endif
+ }
+ layer_on(_LOWER);
+ update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
+ } else {
+#ifdef RGBLIGHT_ENABLE
+ rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
+#endif
+ TOG_STATUS = false;
+ layer_off(_LOWER);
+ update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ //not sure how to have keyboard check mode and set it to a variable, so my work around
+ //uses another variable that would be set to true after the first time a reactive key is pressed.
+ if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
+ } else {
+ TOG_STATUS = !TOG_STATUS;
+#ifdef RGBLIGHT_ENABLE
+ rgblight_mode(15);
+#endif
+ }
+ layer_on(_RAISE);
+ update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
+ } else {
+#ifdef RGBLIGHT_ENABLE
+ rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
+#endif
+ layer_off(_RAISE);
+ TOG_STATUS = false;
+ update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case ADJUST:
+ // FIXME add RGB feedback
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ break;
+ //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
+#ifdef RGBLIGHT_ENABLE
+ case RGB_MOD:
+ if (record->event.pressed) {
+ rgblight_mode(RGB_current_mode);
+ rgblight_step();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ return false;
+ break;
+#endif
+ }
+ return true;
+}
diff --git a/keyboards/woodkeys/scarletbandana/keymaps/default/readme.md b/keyboards/woodkeys/scarletbandana/keymaps/default/readme.md
new file mode 100644
index 0000000000..c2c281fe35
--- /dev/null
+++ b/keyboards/woodkeys/scarletbandana/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for scarletbandana
diff --git a/keyboards/woodkeys/scarletbandana/readme.md b/keyboards/woodkeys/scarletbandana/readme.md
new file mode 100644
index 0000000000..4505fd0573
--- /dev/null
+++ b/keyboards/woodkeys/scarletbandana/readme.md
@@ -0,0 +1,11 @@
+# Scarlet Bandana Version IV Mark 2
+
+Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham)
+Hardware Supported: Scarlet Bandana Version IV Mark 2
+Hardware Availability: [WoodKeys.click](https://woodkeys.click/product/scarlet-bandana-version-iv-mark-2/)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make woodkeys/scarletbandana: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).
diff --git a/keyboards/woodkeys/scarletbandana/rules.mk b/keyboards/woodkeys/scarletbandana/rules.mk
new file mode 100644
index 0000000000..a6313e3b41
--- /dev/null
+++ b/keyboards/woodkeys/scarletbandana/rules.mk
@@ -0,0 +1,19 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Enable N-Key Rollover
+AUDIO_ENABLE = yes # Audio output
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera
+LTO_ENABLE = yes
diff --git a/keyboards/woodkeys/scarletbandana/scarletbandana.c b/keyboards/woodkeys/scarletbandana/scarletbandana.c
new file mode 100644
index 0000000000..6ef183c2cc
--- /dev/null
+++ b/keyboards/woodkeys/scarletbandana/scarletbandana.c
@@ -0,0 +1,22 @@
+/* Copyright 2019 Cole Markham, WoodKeys.click
+ *
+ * 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 "scarletbandana.h"
+
+
+
+
+
+
diff --git a/keyboards/woodkeys/scarletbandana/scarletbandana.h b/keyboards/woodkeys/scarletbandana/scarletbandana.h
new file mode 100644
index 0000000000..8178e8c8dc
--- /dev/null
+++ b/keyboards/woodkeys/scarletbandana/scarletbandana.h
@@ -0,0 +1,38 @@
+/* Copyright 2019 Cole Markham
+ *
+ * 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"
+
+// This a shortcut to help you visually see your layout.
+// The following is an example using the Planck MIT layout
+// The first section contains all of the arguments
+// The second converts the arguments into a two-dimensional array
+#define LAYOUT_all( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k2f, k0g, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2g, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, \
+ k40, k41, k42, k43, k44, k45, k47, k49, k4a, k4b, k4c, k4e, k4f, k4g \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, k3e, k3f, k3g }, \
+ { k40, k41, k42, k43, k44, k45, KC_NO, k47, KC_NO, k49, k4a, k4b, k4c, KC_NO, k4e, k4f, k4g } \
+}
+