summaryrefslogtreecommitdiff
path: root/keyboards/keebio/bdn9
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/keebio/bdn9')
-rw-r--r--keyboards/keebio/bdn9/config.h3
-rw-r--r--keyboards/keebio/bdn9/keymaps/bcat/keymap.c11
-rw-r--r--keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h12
-rw-r--r--keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c57
-rw-r--r--keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk2
-rw-r--r--keyboards/keebio/bdn9/keymaps/eosti/config.h1
-rw-r--r--keyboards/keebio/bdn9/keymaps/eosti/keymap.c161
-rw-r--r--keyboards/keebio/bdn9/keymaps/eosti/readme.md9
-rw-r--r--keyboards/keebio/bdn9/keymaps/eosti/rules.mk1
-rw-r--r--keyboards/keebio/bdn9/keymaps/rishka/config.h5
-rw-r--r--keyboards/keebio/bdn9/keymaps/rishka/keymap.c66
-rw-r--r--keyboards/keebio/bdn9/keymaps/rishka/rules.mk1
-rw-r--r--keyboards/keebio/bdn9/rules.mk24
13 files changed, 324 insertions, 29 deletions
diff --git a/keyboards/keebio/bdn9/config.h b/keyboards/keebio/bdn9/config.h
index 19e625348d..40c8a1d77a 100644
--- a/keyboards/keebio/bdn9/config.h
+++ b/keyboards/keebio/bdn9/config.h
@@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ E6, B4, B2 } \
}
-#define NUMBER_OF_ENCODERS 2
#define ENCODERS_PAD_A { D1, F5 }
#define ENCODERS_PAD_B { D0, F6 }
@@ -65,4 +64,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* 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 LOCKING_RESYNC_ENABLE \ No newline at end of file
diff --git a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c
index 3507aaedec..05d324034c 100644
--- a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c
@@ -5,20 +5,17 @@ enum layer {
LAYER_SECOND,
};
-/* Switch to second layer when held. */
#define LY_SECND MO(LAYER_SECOND)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* First layer (F1-F6) */
[LAYER_FIRST] = LAYOUT(
- KC_MUTE, LY_SECND, BL_TOGG,
+ KC_MUTE, LY_SECND, BL_BRTG,
KC_F4, KC_F5, KC_F6,
KC_F1, KC_F2, KC_F3
),
- /* Second layer (F7-F12) */
[LAYER_SECOND] = LAYOUT(
- _______, _______, _______,
+ EEP_RST, _______, RESET,
KC_F10, KC_F11, KC_F12,
KC_F7, KC_F8, KC_F9
),
@@ -26,12 +23,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
void encoder_update_user(uint8_t index, bool clockwise) {
switch (index) {
- /* Top-left encoder (volume): */
+ /* Top-left encoder (volume) */
case 0:
tap_code(clockwise ? KC_VOLU : KC_VOLD);
break;
- /* Top-right encoder (backlight brightness): */
+ /* Top-right encoder (backlight brightness) */
case 1:
if (clockwise) {
backlight_increase();
diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h b/keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h
new file mode 100644
index 0000000000..5b8b369bc3
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/config.h
@@ -0,0 +1,12 @@
+#pragma once
+
+/* For USB nonsense in various OSs */
+#define TAP_CODE_DELAY 10
+
+/* For constant mouse speed */
+#define MOUSEKEY_DELAY 300
+#define MOUSEKEY_INTERVAL 50
+#define MOUSEKEY_MAX_SPEED 1
+#define MOUSEKEY_TIME_TO_MAX 0
+#define MOUSEKEY_WHEEL_MAX_SPEED 1
+#define MOUSEKEY_WHEEL_TIME_TO_MAX 0
diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c b/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c
new file mode 100644
index 0000000000..9747dbf223
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c
@@ -0,0 +1,57 @@
+/* Copyright 2019 Danny Nguyen <danny@keeb.io>
+ *
+ * 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] = {
+ /*
+ | Knob 1: Scrl Dn/Up | | Knob 2: Vol Dn/Up |
+ | Press: Mute | Up | Press: Play/Pause |
+ | Left | Down | Right |
+ | Media Previous | MO(1)| Media Next |
+ */
+ [0] = LAYOUT(
+ KC_MUTE, KC_UP, KC_MPLY,
+ KC_LEFT, KC_DOWN, KC_RIGHT,
+ KC_MPRV, MO(1), KC_MNXT
+ ),
+ /*
+ | RESET | Home | Media Stop |
+ | | End | |
+ | CTRL_END | | CTRL_HOME |
+ */
+ [1] = LAYOUT(
+ RESET , KC_HOME, KC_STOP,
+ _______, KC_END, _______,
+ LCTL(KC_END), _______, LCTL(KC_HOME)
+ ),
+};
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_MS_WH_UP);
+ } else {
+ tap_code(KC_MS_WH_DOWN);
+ }
+ }
+ else if (index == 1) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
+}
diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk b/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk
new file mode 100644
index 0000000000..e910b7bea5
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk
@@ -0,0 +1,2 @@
+MOUSEKEY_ENABLE = yes
+CTPC = yes \ No newline at end of file
diff --git a/keyboards/keebio/bdn9/keymaps/eosti/config.h b/keyboards/keebio/bdn9/keymaps/eosti/config.h
new file mode 100644
index 0000000000..4ba28f26a8
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/eosti/config.h
@@ -0,0 +1 @@
+#define TAPPING_TERM 175
diff --git a/keyboards/keebio/bdn9/keymaps/eosti/keymap.c b/keyboards/keebio/bdn9/keymaps/eosti/keymap.c
new file mode 100644
index 0000000000..adec3984bc
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/eosti/keymap.c
@@ -0,0 +1,161 @@
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _BASE,
+ _MACRO,
+ _MOD
+};
+
+enum custom_keycodes {
+ M801 = SAFE_RANGE,
+ M802,
+ M803,
+ M804,
+ M805,
+ M806,
+ MAIL_C
+};
+
+// tapdance keycodes
+enum td_keycodes {
+ LAY // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance.
+};
+
+// define a type containing as many tapdance states as you need
+typedef enum {
+ SINGLE_TAP,
+ SINGLE_HOLD,
+} td_state_t;
+
+// create a global instance of the tapdance state type
+static td_state_t td_state;
+
+// declare your tapdance functions:
+
+// function to determine the current tapdance state
+int cur_dance (qk_tap_dance_state_t *state);
+
+// `finished` and `reset` functions for each tapdance keycode
+void altlp_finished (qk_tap_dance_state_t *state, void *user_data);
+void altlp_reset (qk_tap_dance_state_t *state, void *user_data);
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case M801:
+ if (record->event.pressed) {
+ SEND_STRING("M801" SS_TAP(X_ENTER));
+ }
+ break;
+ case M802:
+ if (record->event.pressed) {
+ SEND_STRING("M802" SS_TAP(X_ENTER));
+ }
+ break;
+ case M803:
+ if (record->event.pressed) {
+ SEND_STRING("M803" SS_TAP(X_ENTER));
+ }
+ break;
+ case M804:
+ if (record->event.pressed) {
+ SEND_STRING("M804" SS_TAP(X_ENTER));
+ }
+ break;
+ case M805:
+ if (record->event.pressed) {
+ SEND_STRING("M805" SS_TAP(X_ENTER));
+ }
+ break;
+ case M806:
+ if (record->event.pressed) {
+ SEND_STRING("M806" SS_TAP(X_ENTER));
+ }
+ break;
+ case MAIL_C:
+ if (record->event.pressed) {
+ SEND_STRING(SS_TAP(X_ENTER) SS_TAP(X_DOWN) SS_TAP(X_DOWN) SS_TAP(X_ENTER));
+ }
+ break;
+ }
+
+ return true;
+};
+
+#define EX_ARR LCTL(LSFT(KC_ENTER))
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+ KC_MUTE, KC_UP, TD(LAY),
+ // ├────────┼────────┼────────┤
+ KC_LEFT, KC_DOWN, KC_RGHT,
+ // ├────────┼────────┼────────┤
+ KC_NO, KC_NO, KC_NO
+ // └────────┴────────┴────────┘
+ ),
+ [_MACRO] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+ _______, KC_SPC, TG(_MACRO),
+ // ├────────┼────────┼────────┤
+ M801, M802, M803,
+ // ├────────┼────────┼────────┤
+ MAIL_C, KC_NO, EX_ARR
+ // └────────┴────────┴────────┘
+ ),
+ [_MOD] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+ _______, BL_STEP,TG(_MOD),
+ // ├────────┼────────┼────────┤
+ KC_NO, RGB_MOD, KC_NO,
+ // ├────────┼────────┼────────┤
+ KC_NO, KC_NO, KC_NO
+ // └────────┴────────┴────────┘
+ )
+};
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_VOLD);
+ } else {
+ tap_code(KC_VOLU);
+ }
+ }
+}
+
+// determine the tapdance state to return
+int cur_dance (qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) { return SINGLE_TAP; }
+ else { return SINGLE_HOLD; }
+ } else { return 3; } // any number higher than the maximum state value you return above
+}
+
+// handle the possible states for each tapdance keycode you define:
+
+void altlp_finished (qk_tap_dance_state_t *state, void *user_data) {
+ td_state = cur_dance(state);
+ switch (td_state) {
+ case SINGLE_TAP:
+ layer_on(_MACRO);
+ break;
+ case SINGLE_HOLD:
+ layer_on(_MOD);
+ break;
+ }
+}
+
+void altlp_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (td_state) {
+ case SINGLE_TAP:
+ break;
+ case SINGLE_HOLD:
+ layer_off(_MOD);
+ break;
+ }
+}
+
+// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [LAY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset)
+};
diff --git a/keyboards/keebio/bdn9/keymaps/eosti/readme.md b/keyboards/keebio/bdn9/keymaps/eosti/readme.md
new file mode 100644
index 0000000000..d93ce1e5f4
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/eosti/readme.md
@@ -0,0 +1,9 @@
+# EosTi's BDN9 Macropad Layout
+
+## Features
+
+- Single encoder in the top left to control volume, push to mute
+- Arrow keys on home layer
+- Tap upper right to toggle to macro layer
+- Hold upper right to change keyboard functions (aka RGB)
+- 520 entire bytes free!
diff --git a/keyboards/keebio/bdn9/keymaps/eosti/rules.mk b/keyboards/keebio/bdn9/keymaps/eosti/rules.mk
new file mode 100644
index 0000000000..31e0fcf293
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/eosti/rules.mk
@@ -0,0 +1 @@
+TAP_DANCE_ENABLE=yes
diff --git a/keyboards/keebio/bdn9/keymaps/rishka/config.h b/keyboards/keebio/bdn9/keymaps/rishka/config.h
new file mode 100644
index 0000000000..05f1bada99
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/rishka/config.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#define QMK_ESC_OUTPUT B4
+#define QMK_ESC_INPUT F7
+#define QMK_LED B0
diff --git a/keyboards/keebio/bdn9/keymaps/rishka/keymap.c b/keyboards/keebio/bdn9/keymaps/rishka/keymap.c
new file mode 100644
index 0000000000..dec371d173
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/rishka/keymap.c
@@ -0,0 +1,66 @@
+/* Copyright 2019 Danny Nguyen <danny@keeb.io>
+ *
+ * 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] = {
+ /*
+ | Knob 1: Vol Dn/Up | | Knob 2: Page Dn/Up |
+ | Press: Mute | Home | Press: Play/Pause |
+ | Hold: Layer 2 | Up | RGB Mode |
+ | Left | Down | Right |
+ */
+ [0] = LAYOUT(
+ KC_MUTE, KC_UP, TO(0),
+ KC_F12 , _______ , KC_F1,
+ KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ /*
+ | RESET | N/A | Media Stop |
+ | Held: Layer 2 | Home | RGB Mode |
+ | Media Previous | End | Media Next |
+ */
+ [1] = LAYOUT(
+ RESET , KC_HOME, _______,
+ _______, _______, _______,
+ KC_MPRV, KC_END , KC_MNXT
+ ),
+};
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_VOLD);
+ } else {
+ tap_code(KC_VOLU);
+ }
+ }
+ else if (index == 1) {
+ int mod = 0;
+ if (clockwise) {
+ mod = 1;
+ } else {
+ mod = -1;
+ }
+ int n = 2; //sizeof(PROGMEM);
+ int new_layer = ((layer_state + mod) % n + n) % n;
+ uprintf("new: %d\n", new_layer);
+ layer_on(new_layer);
+ for(int i=0; i < n; i++) {
+ if (new_layer != i) {
+ layer_off(i);
+ }
+ }
+ }
+}
diff --git a/keyboards/keebio/bdn9/keymaps/rishka/rules.mk b/keyboards/keebio/bdn9/keymaps/rishka/rules.mk
new file mode 100644
index 0000000000..0613ea8667
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/rishka/rules.mk
@@ -0,0 +1 @@
+BOOTLOADER = qmk-dfu
diff --git a/keyboards/keebio/bdn9/rules.mk b/keyboards/keebio/bdn9/rules.mk
index 3ab8491089..a548334074 100644
--- a/keyboards/keebio/bdn9/rules.mk
+++ b/keyboards/keebio/bdn9/rules.mk
@@ -1,11 +1,5 @@
+# MCU name
MCU = atmega32u4
-F_CPU = 16000000
-ARCH = AVR8
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
# Bootloader selection
# Teensy halfkay
@@ -13,20 +7,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
-# atmega32a bootloadHID
+# ATmega32A bootloadHID
+# ATmega328P USBasp
BOOTLOADER = caterina
-
-# If you don't know the bootloader type, then you can specify the
-# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-# OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
# Build Options
# change yes to no to disable
#
@@ -47,4 +31,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
-ENCODER_ENABLE = yes
+ENCODER_ENABLE = yes \ No newline at end of file