From 73883425a55f23a319eb1522c2e3ce52b8e2f042 Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 8 Nov 2018 23:17:41 +0000 Subject: relocate 40percent.club boards to new parent folder (#4380) * Initial move of 40percent.club boards to common parent folder. * Refactor readme files to be consistent * Refactor readme files to be consistent - fix make command examples. * Refactor readme files to be consistent - align readme filenames. * Refactor readme files to be consistent - fix repo url. * Disable Community keymap builds as they are currently failing due to missing functionality * Move more of 40percent.club boards to common parent folder. * Refactor readme files to be consistent - align readme filenames. * Refactor readme files to be consistent - fix make command examples. --- keyboards/40percentclub/4x4/4x4.c | 29 ++ keyboards/40percentclub/4x4/4x4.h | 62 +++ keyboards/40percentclub/4x4/config.h | 202 ++++++++++ .../40percentclub/4x4/keymaps/default/config.h | 5 + .../40percentclub/4x4/keymaps/default/keymap.c | 124 ++++++ keyboards/40percentclub/4x4/readme.md | 24 ++ keyboards/40percentclub/4x4/rules.mk | 74 ++++ keyboards/40percentclub/5x5/5x5.c | 29 ++ keyboards/40percentclub/5x5/5x5.h | 57 +++ keyboards/40percentclub/5x5/config.h | 208 ++++++++++ .../40percentclub/5x5/keymaps/default/config.h | 5 + .../40percentclub/5x5/keymaps/default/keymap.c | 139 +++++++ keyboards/40percentclub/5x5/readme.md | 24 ++ keyboards/40percentclub/5x5/rules.mk | 74 ++++ keyboards/40percentclub/6lit/6lit.c | 53 +++ keyboards/40percentclub/6lit/6lit.h | 55 +++ keyboards/40percentclub/6lit/config.h | 230 +++++++++++ keyboards/40percentclub/6lit/info.json | 23 ++ .../40percentclub/6lit/keymaps/default/config.h | 19 + .../40percentclub/6lit/keymaps/default/keymap.c | 39 ++ .../40percentclub/6lit/keymaps/default/readme.md | 1 + .../40percentclub/6lit/keymaps/macro/config.h | 19 + .../40percentclub/6lit/keymaps/macro/keymap.c | 39 ++ .../40percentclub/6lit/keymaps/macro/readme.md | 1 + keyboards/40percentclub/6lit/readme.md | 18 + keyboards/40percentclub/6lit/rules.mk | 83 ++++ keyboards/40percentclub/foobar/config.h | 230 +++++++++++ keyboards/40percentclub/foobar/foobar.c | 55 +++ keyboards/40percentclub/foobar/foobar.h | 66 ++++ keyboards/40percentclub/foobar/info.json | 25 ++ .../40percentclub/foobar/keymaps/default/config.h | 19 + .../40percentclub/foobar/keymaps/default/keymap.c | 49 +++ .../40percentclub/foobar/keymaps/default/readme.md | 1 + .../40percentclub/foobar/keymaps/macro/config.h | 19 + .../40percentclub/foobar/keymaps/macro/keymap.c | 40 ++ .../40percentclub/foobar/keymaps/macro/readme.md | 1 + keyboards/40percentclub/foobar/readme.md | 18 + keyboards/40percentclub/foobar/rules.mk | 83 ++++ keyboards/40percentclub/gherkin/config.h | 54 +++ keyboards/40percentclub/gherkin/gherkin.c | 1 + keyboards/40percentclub/gherkin/gherkin.h | 18 + keyboards/40percentclub/gherkin/info.json | 13 + .../gherkin/keymaps/bbaserdem/README.md | 11 + .../gherkin/keymaps/bbaserdem/config.h | 13 + .../gherkin/keymaps/bbaserdem/keymap.c | 36 ++ .../gherkin/keymaps/bbaserdem/rules.mk | 17 + .../40percentclub/gherkin/keymaps/default/keymap.c | 74 ++++ .../gherkin/keymaps/itsaferbie/config.h | 15 + .../gherkin/keymaps/itsaferbie/keymap.c | 152 ++++++++ .../gherkin/keymaps/itsaferbie/rules.mk | 7 + .../40percentclub/gherkin/keymaps/mjt/config.h | 169 +++++++++ .../40percentclub/gherkin/keymaps/mjt/keymap.c | 279 ++++++++++++++ .../40percentclub/gherkin/keymaps/mjt/rules.mk | 29 ++ .../40percentclub/gherkin/keymaps/steno/config.h | 12 + .../40percentclub/gherkin/keymaps/steno/keymap.c | 13 + .../40percentclub/gherkin/keymaps/steno/readme.md | 9 + .../40percentclub/gherkin/keymaps/steno/rules.mk | 16 + .../gherkin/keymaps/talljoe-gherkin/config.h | 6 + .../gherkin/keymaps/talljoe-gherkin/keymap.c | 58 +++ .../gherkin/keymaps/talljoe-gherkin/rules.mk | 6 + keyboards/40percentclub/gherkin/readme.md | 21 ++ keyboards/40percentclub/gherkin/rules.mk | 59 +++ keyboards/40percentclub/luddite/config.h | 48 +++ .../40percentclub/luddite/keymaps/default/keymap.c | 32 ++ keyboards/40percentclub/luddite/luddite.c | 1 + keyboards/40percentclub/luddite/luddite.h | 21 ++ keyboards/40percentclub/luddite/readme.md | 21 ++ keyboards/40percentclub/luddite/rules.mk | 59 +++ keyboards/40percentclub/mf68/config.h | 162 ++++++++ keyboards/40percentclub/mf68/info.json | 12 + .../40percentclub/mf68/keymaps/default/keymap.c | 68 ++++ .../40percentclub/mf68/keymaps/factory/keymap.c | 74 ++++ keyboards/40percentclub/mf68/mf68.c | 8 + keyboards/40percentclub/mf68/mf68.h | 40 ++ keyboards/40percentclub/mf68/readme.md | 18 + keyboards/40percentclub/mf68/rules.mk | 68 ++++ keyboards/40percentclub/mf68_ble/config.h | 162 ++++++++ keyboards/40percentclub/mf68_ble/info.json | 12 + .../mf68_ble/keymaps/default/keymap.c | 68 ++++ keyboards/40percentclub/mf68_ble/mf68_ble.c | 8 + keyboards/40percentclub/mf68_ble/mf68_ble.h | 40 ++ keyboards/40percentclub/mf68_ble/readme.md | 29 ++ keyboards/40percentclub/mf68_ble/rules.mk | 67 ++++ keyboards/40percentclub/nano/config.h | 45 +++ keyboards/40percentclub/nano/info.json | 12 + .../40percentclub/nano/keymaps/default/keymap.c | 19 + .../40percentclub/nano/keymaps/default/rules.mk | 0 .../40percentclub/nano/keymaps/spooka/config.h | 25 ++ .../40percentclub/nano/keymaps/spooka/keymap.c | 12 + .../40percentclub/nano/keymaps/spooka/rules.mk | 1 + keyboards/40percentclub/nano/matrix.c | 159 ++++++++ keyboards/40percentclub/nano/nano.c | 5 + keyboards/40percentclub/nano/nano.h | 14 + keyboards/40percentclub/nano/readme.md | 16 + keyboards/40percentclub/nano/rules.mk | 70 ++++ keyboards/40percentclub/readme.md | 4 + keyboards/40percentclub/tomato/config.h | 48 +++ keyboards/40percentclub/tomato/info.json | 13 + .../40percentclub/tomato/keymaps/default/keymap.c | 158 ++++++++ keyboards/40percentclub/tomato/readme.md | 22 ++ keyboards/40percentclub/tomato/rules.mk | 58 +++ keyboards/40percentclub/tomato/tomato.c | 1 + keyboards/40percentclub/tomato/tomato.h | 18 + keyboards/40percentclub/ut47/LED_controls.ino | 420 +++++++++++++++++++++ keyboards/40percentclub/ut47/config.h | 87 +++++ keyboards/40percentclub/ut47/info.json | 13 + .../40percentclub/ut47/keymaps/default/config.h | 24 ++ .../40percentclub/ut47/keymaps/default/keymap.c | 136 +++++++ .../40percentclub/ut47/keymaps/default/readme.md | 19 + .../40percentclub/ut47/keymaps/non-us/config.h | 24 ++ .../40percentclub/ut47/keymaps/non-us/keymap.c | 136 +++++++ .../40percentclub/ut47/keymaps/non-us/readme.md | 19 + .../40percentclub/ut47/keymaps/nordic/config.h | 17 + .../40percentclub/ut47/keymaps/nordic/keymap.c | 179 +++++++++ .../40percentclub/ut47/keymaps/nordic/readme.md | 33 ++ keyboards/40percentclub/ut47/keymaps/rgb/config.h | 27 ++ keyboards/40percentclub/ut47/keymaps/rgb/keymap.c | 88 +++++ keyboards/40percentclub/ut47/keymaps/rgb/readme.md | 1 + keyboards/40percentclub/ut47/keymaps/rgb/rules.mk | 1 + keyboards/40percentclub/ut47/led.c | 38 ++ keyboards/40percentclub/ut47/matrix.c | 213 +++++++++++ keyboards/40percentclub/ut47/readme.md | 40 ++ keyboards/40percentclub/ut47/rules.mk | 70 ++++ keyboards/40percentclub/ut47/ut47.c | 50 +++ keyboards/40percentclub/ut47/ut47.h | 49 +++ 125 files changed, 6732 insertions(+) create mode 100644 keyboards/40percentclub/4x4/4x4.c create mode 100644 keyboards/40percentclub/4x4/4x4.h create mode 100644 keyboards/40percentclub/4x4/config.h create mode 100644 keyboards/40percentclub/4x4/keymaps/default/config.h create mode 100644 keyboards/40percentclub/4x4/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/4x4/readme.md create mode 100644 keyboards/40percentclub/4x4/rules.mk create mode 100644 keyboards/40percentclub/5x5/5x5.c create mode 100644 keyboards/40percentclub/5x5/5x5.h create mode 100644 keyboards/40percentclub/5x5/config.h create mode 100644 keyboards/40percentclub/5x5/keymaps/default/config.h create mode 100644 keyboards/40percentclub/5x5/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/5x5/readme.md create mode 100644 keyboards/40percentclub/5x5/rules.mk create mode 100644 keyboards/40percentclub/6lit/6lit.c create mode 100644 keyboards/40percentclub/6lit/6lit.h create mode 100644 keyboards/40percentclub/6lit/config.h create mode 100644 keyboards/40percentclub/6lit/info.json create mode 100644 keyboards/40percentclub/6lit/keymaps/default/config.h create mode 100644 keyboards/40percentclub/6lit/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/6lit/keymaps/default/readme.md create mode 100644 keyboards/40percentclub/6lit/keymaps/macro/config.h create mode 100644 keyboards/40percentclub/6lit/keymaps/macro/keymap.c create mode 100644 keyboards/40percentclub/6lit/keymaps/macro/readme.md create mode 100644 keyboards/40percentclub/6lit/readme.md create mode 100644 keyboards/40percentclub/6lit/rules.mk create mode 100644 keyboards/40percentclub/foobar/config.h create mode 100644 keyboards/40percentclub/foobar/foobar.c create mode 100644 keyboards/40percentclub/foobar/foobar.h create mode 100644 keyboards/40percentclub/foobar/info.json create mode 100644 keyboards/40percentclub/foobar/keymaps/default/config.h create mode 100644 keyboards/40percentclub/foobar/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/foobar/keymaps/default/readme.md create mode 100644 keyboards/40percentclub/foobar/keymaps/macro/config.h create mode 100644 keyboards/40percentclub/foobar/keymaps/macro/keymap.c create mode 100644 keyboards/40percentclub/foobar/keymaps/macro/readme.md create mode 100644 keyboards/40percentclub/foobar/readme.md create mode 100644 keyboards/40percentclub/foobar/rules.mk create mode 100644 keyboards/40percentclub/gherkin/config.h create mode 100644 keyboards/40percentclub/gherkin/gherkin.c create mode 100644 keyboards/40percentclub/gherkin/gherkin.h create mode 100644 keyboards/40percentclub/gherkin/info.json create mode 100644 keyboards/40percentclub/gherkin/keymaps/bbaserdem/README.md create mode 100644 keyboards/40percentclub/gherkin/keymaps/bbaserdem/config.h create mode 100644 keyboards/40percentclub/gherkin/keymaps/bbaserdem/keymap.c create mode 100644 keyboards/40percentclub/gherkin/keymaps/bbaserdem/rules.mk create mode 100644 keyboards/40percentclub/gherkin/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h create mode 100644 keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c create mode 100644 keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk create mode 100644 keyboards/40percentclub/gherkin/keymaps/mjt/config.h create mode 100644 keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c create mode 100644 keyboards/40percentclub/gherkin/keymaps/mjt/rules.mk create mode 100644 keyboards/40percentclub/gherkin/keymaps/steno/config.h create mode 100644 keyboards/40percentclub/gherkin/keymaps/steno/keymap.c create mode 100644 keyboards/40percentclub/gherkin/keymaps/steno/readme.md create mode 100644 keyboards/40percentclub/gherkin/keymaps/steno/rules.mk create mode 100644 keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/config.h create mode 100644 keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c create mode 100644 keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/rules.mk create mode 100644 keyboards/40percentclub/gherkin/readme.md create mode 100644 keyboards/40percentclub/gherkin/rules.mk create mode 100644 keyboards/40percentclub/luddite/config.h create mode 100644 keyboards/40percentclub/luddite/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/luddite/luddite.c create mode 100644 keyboards/40percentclub/luddite/luddite.h create mode 100644 keyboards/40percentclub/luddite/readme.md create mode 100644 keyboards/40percentclub/luddite/rules.mk create mode 100644 keyboards/40percentclub/mf68/config.h create mode 100644 keyboards/40percentclub/mf68/info.json create mode 100644 keyboards/40percentclub/mf68/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/mf68/keymaps/factory/keymap.c create mode 100644 keyboards/40percentclub/mf68/mf68.c create mode 100644 keyboards/40percentclub/mf68/mf68.h create mode 100644 keyboards/40percentclub/mf68/readme.md create mode 100644 keyboards/40percentclub/mf68/rules.mk create mode 100644 keyboards/40percentclub/mf68_ble/config.h create mode 100644 keyboards/40percentclub/mf68_ble/info.json create mode 100644 keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/mf68_ble/mf68_ble.c create mode 100644 keyboards/40percentclub/mf68_ble/mf68_ble.h create mode 100644 keyboards/40percentclub/mf68_ble/readme.md create mode 100644 keyboards/40percentclub/mf68_ble/rules.mk create mode 100644 keyboards/40percentclub/nano/config.h create mode 100644 keyboards/40percentclub/nano/info.json create mode 100644 keyboards/40percentclub/nano/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/nano/keymaps/default/rules.mk create mode 100644 keyboards/40percentclub/nano/keymaps/spooka/config.h create mode 100644 keyboards/40percentclub/nano/keymaps/spooka/keymap.c create mode 100644 keyboards/40percentclub/nano/keymaps/spooka/rules.mk create mode 100644 keyboards/40percentclub/nano/matrix.c create mode 100644 keyboards/40percentclub/nano/nano.c create mode 100644 keyboards/40percentclub/nano/nano.h create mode 100644 keyboards/40percentclub/nano/readme.md create mode 100644 keyboards/40percentclub/nano/rules.mk create mode 100644 keyboards/40percentclub/readme.md create mode 100644 keyboards/40percentclub/tomato/config.h create mode 100644 keyboards/40percentclub/tomato/info.json create mode 100644 keyboards/40percentclub/tomato/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/tomato/readme.md create mode 100644 keyboards/40percentclub/tomato/rules.mk create mode 100644 keyboards/40percentclub/tomato/tomato.c create mode 100644 keyboards/40percentclub/tomato/tomato.h create mode 100644 keyboards/40percentclub/ut47/LED_controls.ino create mode 100644 keyboards/40percentclub/ut47/config.h create mode 100644 keyboards/40percentclub/ut47/info.json create mode 100644 keyboards/40percentclub/ut47/keymaps/default/config.h create mode 100644 keyboards/40percentclub/ut47/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/ut47/keymaps/default/readme.md create mode 100644 keyboards/40percentclub/ut47/keymaps/non-us/config.h create mode 100644 keyboards/40percentclub/ut47/keymaps/non-us/keymap.c create mode 100644 keyboards/40percentclub/ut47/keymaps/non-us/readme.md create mode 100644 keyboards/40percentclub/ut47/keymaps/nordic/config.h create mode 100644 keyboards/40percentclub/ut47/keymaps/nordic/keymap.c create mode 100644 keyboards/40percentclub/ut47/keymaps/nordic/readme.md create mode 100644 keyboards/40percentclub/ut47/keymaps/rgb/config.h create mode 100644 keyboards/40percentclub/ut47/keymaps/rgb/keymap.c create mode 100644 keyboards/40percentclub/ut47/keymaps/rgb/readme.md create mode 100644 keyboards/40percentclub/ut47/keymaps/rgb/rules.mk create mode 100644 keyboards/40percentclub/ut47/led.c create mode 100644 keyboards/40percentclub/ut47/matrix.c create mode 100644 keyboards/40percentclub/ut47/readme.md create mode 100644 keyboards/40percentclub/ut47/rules.mk create mode 100644 keyboards/40percentclub/ut47/ut47.c create mode 100644 keyboards/40percentclub/ut47/ut47.h (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/4x4/4x4.c b/keyboards/40percentclub/4x4/4x4.c new file mode 100644 index 000000000..963b6d00d --- /dev/null +++ b/keyboards/40percentclub/4x4/4x4.c @@ -0,0 +1,29 @@ + +#include "4x4.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/40percentclub/4x4/4x4.h b/keyboards/40percentclub/4x4/4x4.h new file mode 100644 index 000000000..ec75c3e28 --- /dev/null +++ b/keyboards/40percentclub/4x4/4x4.h @@ -0,0 +1,62 @@ + +#ifndef FOURX4_H +#define FOURX4_H + +#include "quantum.h" +#define ___ KC_NO + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) \ +{ \ + { K00, K01, K02, K03, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___}, \ + { K10, K11, K12, K13, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___}, \ + { K20, K21, K22, K23, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___}, \ + { K30, K31, K32, K33, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___} \ +} +#define LAYOUT_ortho_4x8( \ + K00, K01, K02, K03, K04, K05, K06, K07, \ + K10, K11, K12, K13, K14, K15, K16, K17, \ + K20, K21, K22, K23, K24, K25, K26, K27, \ + K30, K31, K32, K33, K34, K35, K36, K37\ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, ___, ___, ___, ___, ___, ___, ___, ___}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, ___, ___, ___, ___, ___, ___, ___, ___}, \ + { K20, K21, K22, K23, K24, K25, K26, K27, ___, ___, ___, ___, ___, ___, ___, ___}, \ + { K30, K31, K32, K33, K34, K35, K35, K37, ___, ___, ___, ___, ___, ___, ___, ___} \ +} +#define LAYOUT_ortho_4x12( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, ___, ___, ___, ___}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, ___, ___, ___, ___}, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, ___, ___, ___, ___}, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, ___, ___, ___, ___} \ +} + +#define LAYOUT_ortho_4x16( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, K0f, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, K1f, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, K2f, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e, K3f \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, K0f }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, K1f }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, K2f }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e, K3f } \ +} + +#endif diff --git a/keyboards/40percentclub/4x4/config.h b/keyboards/40percentclub/4x4/config.h new file mode 100644 index 000000000..e66e9433a --- /dev/null +++ b/keyboards/40percentclub/4x4/config.h @@ -0,0 +1,202 @@ + + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x4444 +#define MANUFACTURER di0ib +#define PRODUCT The 4x4 Keyboard +#define DESCRIPTION A modular compact keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B2, D1, D0, D4 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 } +#define UNUSED_PINS + + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN C7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + diff --git a/keyboards/40percentclub/4x4/keymaps/default/config.h b/keyboards/40percentclub/4x4/keymaps/default/config.h new file mode 100644 index 000000000..d533d806c --- /dev/null +++ b/keyboards/40percentclub/4x4/keymaps/default/config.h @@ -0,0 +1,5 @@ + + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/4x4/keymaps/default/keymap.c b/keyboards/40percentclub/4x4/keymaps/default/keymap.c new file mode 100644 index 000000000..144ec05c1 --- /dev/null +++ b/keyboards/40percentclub/4x4/keymaps/default/keymap.c @@ -0,0 +1,124 @@ + +#include QMK_KEYBOARD_H + +#define PAD 0 +#define _QW 1 +#define NUM 2 +#define DIR 3 + +// Readability keycodes +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Single 4x4 board only + * .-----------------------------------. + * | 7 | 8 | 9 | / | + * |--------+--------+--------+--------| + * | 4 | 5 | 6 | * | + * |--------+--------+--------+--------| + * | 1 | 2 | 3 | - | + * |--------+--------+--------+--------| + * | 0 | QWERTY | . | + | + * '-----------------------------------' + */ + + [PAD] = LAYOUT_ortho_4x4( + KC_KP_7, KC_KP_8, KC_KP_9, KC_PSLS, + KC_KP_4, KC_KP_5, KC_KP_6, KC_PAST, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PMNS, + KC_KP_0, DF(_QW), KC_KP_DOT, KC_PPLS + ), + +/* QWERTY + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | Q | W | E | R | T | Y | U | I | O | P | BACKSP | 7 | 8 | 9 | / | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | A | S | D | F | G | H | J | K | L | ; | ' | 4 | 5 | 6 | * | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / | ENT/SFT| 1 | 2 | 3 | - | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LCTRL | LGUI | ALT | ALT | NUM | SHIFT | SPACE | DIR | RGUI | RALT | DEL | CTRL | 0 | 0 | . | + | + * '-----------------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = LAYOUT_ortho_4x16( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_KP_7, KC_KP_8, KC_KP_9, KC_PSLS, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_KP_4, KC_KP_5, KC_KP_6, KC_PAST, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), KC_KP_1, KC_KP_2, KC_KP_3, KC_PMNS, + KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, MO(NUM), KC_LSFT, KC_SPC, MO(DIR), KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_KP_0, KC_KP_0, KC_KP_DOT, KC_PPLS + ), + +/* NUMBERS + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | NUMLOCK| / | * | - | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | + | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F11 | F12 | | | | ENTER | SHIFT | RGUI | ./ALT | BKSC | | | | ENTER | | + * | | | | | | | | | | |CTRLhold| | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | + * | | | | | | | ENTER | SHIFT | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------------------------' + */ + + [NUM] = LAYOUT_ortho_4x16( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_PPLS, _______, + _______, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC), _______, _______, _______, KC_PENT, _______, + _______, _______, _______, _______, _______, _______, KC_ENT, KC_RSFT, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* DIRECTIONS + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | RESET | TAB | up | | INS | CTRL | SHIFT | PgUp | Home | - | = | DEL | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | CAPSLK | left | down | right | PrScr | SHIFT | CTRL | PgDn | End | [ | ] | \ | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | P-Brk | | | | | | | RGUI | ALT | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | KEYPAD | | | | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------------------------' + */ + + [DIR] = LAYOUT_ortho_4x16( + RESET, KC_TAB, KC_UP, _______, KC_INS, KC_LCTL, KC_LSFT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_DEL, _______, _______, _______, _______, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_LCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, + _______, KC_PAUS, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_RALT, _______, _______, _______, _______, _______, _______, + DF(PAD), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + + +const uint16_t PROGMEM fn_actions[] = { + +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + keyevent_t event = record->event; + (void)event; + + switch (id) { + + } + return MACRO_NONE; +} + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/4x4/readme.md b/keyboards/40percentclub/4x4/readme.md new file mode 100644 index 000000000..077a2049b --- /dev/null +++ b/keyboards/40percentclub/4x4/readme.md @@ -0,0 +1,24 @@ +# 4x4 + +![4x4](https://2.bp.blogspot.com/-xRZOpwlTT4c/WlOwRIVAecI/AAAAAAACKo4/d75juHTX2W0Nrch7NigssMbagvl3I4w_ACEwYBhgL/s1600/e.jpg) +=== + +**Modular keypad/keyboard** +The basic unit is a 4x4 matrix with 16 keys. Up to 4 of these can be connected to each other side by side. +4x4, 4x8, 4x12 and 4x16 are possible. +There are pads for header pins on each side that complete the circuits from board to board. These can be permanently connected with solder bridges or temporarily with pin headers and shunt jumpers. +**_All configurations are powered by a SINGLE Arduino Micro or clone (NOT a Pro Micro)._** + +* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/4x4) + +Keyboard Maintainer: QMK Community +Hardware Supported: 4x4 PCB +Hardware Availability: [4x4x4x4x4 project on 40% Keyboards](http://www.40percent.club/2018/01/4x4x4x4x4.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/4x4: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). + +First pass at adding support for the 4x4 keyboard. Compiles but completely untested. Intended to kick-start development. diff --git a/keyboards/40percentclub/4x4/rules.mk b/keyboards/40percentclub/4x4/rules.mk new file mode 100644 index 000000000..d572e7244 --- /dev/null +++ b/keyboards/40percentclub/4x4/rules.mk @@ -0,0 +1,74 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +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) + +#FIXME: Community keymap build are currently failing due to missing functionality +#LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16 diff --git a/keyboards/40percentclub/5x5/5x5.c b/keyboards/40percentclub/5x5/5x5.c new file mode 100644 index 000000000..20e524609 --- /dev/null +++ b/keyboards/40percentclub/5x5/5x5.c @@ -0,0 +1,29 @@ + +#include "5x5.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/40percentclub/5x5/5x5.h b/keyboards/40percentclub/5x5/5x5.h new file mode 100644 index 000000000..45fb80a4f --- /dev/null +++ b/keyboards/40percentclub/5x5/5x5.h @@ -0,0 +1,57 @@ + +#ifndef FIVEX5_H +#define FIVEX5_H + +#include "quantum.h" +#define ___ KC_NO + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_ortho_5x5( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14, \ + K20, K21, K22, K23, K24, \ + K30, K31, K32, K33, K34, \ + K40, K41, K42, K43, K44 \ +) \ +{ \ + { K00, K01, K02, K03, K04, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___}, \ + { K10, K11, K12, K13, K14, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___}, \ + { K20, K21, K22, K23, K24, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___}, \ + { K30, K31, K32, K33, K34, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___}, \ + { K40, K41, K42, K43, K44, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___} \ +} + +#define LAYOUT_ortho_5x10( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, ___, ___, ___, ___, ___}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, ___, ___, ___, ___, ___}, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, ___, ___, ___, ___, ___}, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, ___, ___, ___, ___, ___}, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, ___, ___, ___, ___, ___} \ +} + +#define LAYOUT_ortho_5x15( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4a, K4b, K4c, K4d, K4e \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e}, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e}, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e}, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4a, K4b, K4c, K4d, K4e} \ +} + +#endif diff --git a/keyboards/40percentclub/5x5/config.h b/keyboards/40percentclub/5x5/config.h new file mode 100644 index 000000000..bc609934e --- /dev/null +++ b/keyboards/40percentclub/5x5/config.h @@ -0,0 +1,208 @@ + + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x05B5 +#define MANUFACTURER di0ib +#define PRODUCT The 5x5 Keyboard +#define DESCRIPTION A 25 or 50 or 75 key keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B2, D1, D0, D4, C6 } +#define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ diff --git a/keyboards/40percentclub/5x5/keymaps/default/config.h b/keyboards/40percentclub/5x5/keymaps/default/config.h new file mode 100644 index 000000000..d533d806c --- /dev/null +++ b/keyboards/40percentclub/5x5/keymaps/default/config.h @@ -0,0 +1,5 @@ + + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/5x5/keymaps/default/keymap.c b/keyboards/40percentclub/5x5/keymaps/default/keymap.c new file mode 100644 index 000000000..a2c525d08 --- /dev/null +++ b/keyboards/40percentclub/5x5/keymaps/default/keymap.c @@ -0,0 +1,139 @@ + +#include QMK_KEYBOARD_H + +#define PAD 0 +#define _QW 1 +#define NUM 2 +#define DIR 3 + +// Readability keycodes +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Single 5x5 board only + * .--------------------------------------------. + * | QWERTY | / | * | - | | + * |--------+--------+--------+--------+--------| + * | 7 | 8 | 9 | + | | + * |--------+--------+--------+--------+--------| + * | 4 | 5 | 6 | + | | + * |--------+--------+--------+--------+--------| + * | 1 | 2 | 3 | ENTER | | + * |--------+--------+--------+--------+--------| + * | 0 | 0 | . | ENTER | | + * '--------------------------------------------' + */ + + [PAD] = LAYOUT_ortho_5x5( + DF(_QW), KC_PSLS, KC_PAST, KC_PMNS, _______, + KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, + KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, + KC_KP_0, KC_KP_0, KC_KP_DOT, KC_PENT, _______ + ), + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ESC | Q | W | E | R | T | Y | U | I | O | P | BACKSP | 7 | 8 | 9 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | A | S | D | F | G | H | J | K | L | ; | ' | 4 | 5 | 6 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / | ENT/SFT| 1 | 2 | 3 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LCTRL | LGUI | ALT | ALT | NUM | SHIFT | SPACE | DIR | RGUI | RALT | DEL | CTRL | 0 | 0 | . | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = LAYOUT_ortho_5x15( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_KP_7, KC_KP_8, KC_KP_9, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_KP_4, KC_KP_5, KC_KP_6, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), KC_KP_1, KC_KP_2, KC_KP_3, + KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, MO(NUM), KC_LSFT, KC_SPC, MO(DIR), KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_KP_0, KC_KP_0, KC_KP_DOT + ), + +/* NUMBERS + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | NUMLOCK| / | * | - | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | + | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F11 | F12 | | | | ENTER | SHIFT | RGUI | ./ALT | BKSC | | | | ENTER | + * | | | | | | | | | | |CTRLhold| | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | ENTER | SHIFT | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [NUM] = LAYOUT_ortho_5x15( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_PPLS, + _______, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC), _______, _______, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_ENT, KC_RSFT, _______, _______, _______, _______, _______, _______, _______ + ), + +/* DIRECTIONS + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RESET | TAB | up | | INS | CTRL | SHIFT | PgUp | Home | - | = | DEL | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | CAPSLK | left | down | right | PrScr | SHIFT | CTRL | PgDn | End | [ | ] | \ | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | P-Brk | | | | | | | RGUI | ALT | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | KEYPAD | | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [DIR] = LAYOUT_ortho_5x15( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, KC_TAB, KC_UP, _______, KC_INS, KC_LCTL, KC_LSFT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_DEL, _______, _______, _______, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_LCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, + _______, KC_PAUS, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_RALT, _______, _______, _______, _______, _______, + DF(PAD), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/5x5/readme.md b/keyboards/40percentclub/5x5/readme.md new file mode 100644 index 000000000..8f0d8e166 --- /dev/null +++ b/keyboards/40percentclub/5x5/readme.md @@ -0,0 +1,24 @@ +# 5x5 + +![5x5](https://3.bp.blogspot.com/-bKOfUyMtdrE/WqGA_03kGZI/AAAAAAACPtY/DsHDTQS0IlMD3ie8HHlf1ATRUAwpZdcSgCLcBGAs/s1600/c.jpg) +=== + +**Modular Keypad/Keyboard** +The basic unit is a 5x5 matrix with 25 keys. Up to 3 of these can be connected to each other side by side. +5x5, 5x10, and 5x15 matrices are possible. +There are pads for header pins on each side that complete the circuits from board to board. These can be permanently connected with solder bridges or temporarily with pin headers and shunt jumpers. +**_All configurations are powered by a SINGLE Arduino Micro or clone (NOT a Pro Micro)._** + +* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/5x5) + +Keyboard Maintainer: QMK Community +Hardware Supported: 5x5 PCB +Hardware Availability: [5x5 project on 40% Keyboards](http://www.40percent.club/2018/04/5x5.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/5x5: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). + +First pass at adding support for the 4x4 keyboard. Compiles but completely untested. Intended to kick-start development. diff --git a/keyboards/40percentclub/5x5/rules.mk b/keyboards/40percentclub/5x5/rules.mk new file mode 100644 index 000000000..abc961a86 --- /dev/null +++ b/keyboards/40percentclub/5x5/rules.mk @@ -0,0 +1,74 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +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) + +#FIXME: Community keymap build are currently failing due to missing functionality +#LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15 diff --git a/keyboards/40percentclub/6lit/6lit.c b/keyboards/40percentclub/6lit/6lit.c new file mode 100644 index 000000000..fd3ae7d00 --- /dev/null +++ b/keyboards/40percentclub/6lit/6lit.c @@ -0,0 +1,53 @@ +/* Copyright 2018 + * + * 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 . + */ +#include "6lit.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{2, 2}, {1, 2}, {0, 2}}, + {{2, 3}, {1, 3}, {0, 3}}, + {{0, 0}, {1, 0}, {2, 0}}, + {{0, 1}, {1, 1}, {2, 1}}, +}; +#endif diff --git a/keyboards/40percentclub/6lit/6lit.h b/keyboards/40percentclub/6lit/6lit.h new file mode 100644 index 000000000..ae0beea35 --- /dev/null +++ b/keyboards/40percentclub/6lit/6lit.h @@ -0,0 +1,55 @@ +/* Copyright 2018 + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ________ KC_NO + +#ifndef FLIP_HALF +#define LAYOUT_split( \ + L00, L01, L02, R00, R01, R02, \ + L10, L11, L12, R10, R11, R12 \ +) { \ + { L00, L01, L02 }, \ + { L10, L11, L12 }, \ + { R02, R01, R00 }, \ + { R12, R11, R10 }, \ +} +#else +#define LAYOUT_split( \ + L00, L01, L02, R00, R01, R02, \ + L10, L11, L12, R10, R11, R12 \ +) { \ + { L00, L01, L02 }, \ + { L10, L11, L12 }, \ + { R00, R01, R02 }, \ + { R10, R11, R12 }, \ +} +#endif + +#define LAYOUT_macro( \ + L00, L01, L02, \ + L10, L11, L12 \ +) { \ + { L00, L01, L02 }, \ + { L10, L11, L12 }, \ +} + +#define LAYOUT LAYOUT_macro + +#ifdef USE_I2C + #error "I2C not Supported" +#endif diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h new file mode 100644 index 000000000..8397818a6 --- /dev/null +++ b/keyboards/40percentclub/6lit/config.h @@ -0,0 +1,230 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x0F61 +#define MANUFACTURER di0ib +#define PRODUCT The 6lit Macropad +#define DESCRIPTION A split 12 key Macropad + +#define USE_SERIAL + +/* Select hand configuration */ +#define MASTER_LEFT +//#define MASTER_RIGHT +//#define EE_HANDS + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 2*2 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D7, E6 } +#define MATRIX_COL_PINS { F6, F7, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ diff --git a/keyboards/40percentclub/6lit/info.json b/keyboards/40percentclub/6lit/info.json new file mode 100644 index 000000000..ce1a7d6e1 --- /dev/null +++ b/keyboards/40percentclub/6lit/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "6lit", + "url": "", + "maintainer": "qmk", + "width": 6, + "height": 2, + "layouts": { + "LAYOUT_macro": { + "key_count": 6, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1} + ] + }, + "LAYOUT_split": { + "key_count": 12, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1} + ] + } + } +} diff --git a/keyboards/40percentclub/6lit/keymaps/default/config.h b/keyboards/40percentclub/6lit/keymaps/default/config.h new file mode 100644 index 000000000..6173b6327 --- /dev/null +++ b/keyboards/40percentclub/6lit/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/6lit/keymaps/default/keymap.c b/keyboards/40percentclub/6lit/keymaps/default/keymap.c new file mode 100644 index 000000000..6864c72f7 --- /dev/null +++ b/keyboards/40percentclub/6lit/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2018 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split( /* Base */ + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, \ + KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/6lit/keymaps/default/readme.md b/keyboards/40percentclub/6lit/keymaps/default/readme.md new file mode 100644 index 000000000..b3acc3f58 --- /dev/null +++ b/keyboards/40percentclub/6lit/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default split keymap for 6lit diff --git a/keyboards/40percentclub/6lit/keymaps/macro/config.h b/keyboards/40percentclub/6lit/keymaps/macro/config.h new file mode 100644 index 000000000..6173b6327 --- /dev/null +++ b/keyboards/40percentclub/6lit/keymaps/macro/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/6lit/keymaps/macro/keymap.c b/keyboards/40percentclub/6lit/keymaps/macro/keymap.c new file mode 100644 index 000000000..6b10ac133 --- /dev/null +++ b/keyboards/40percentclub/6lit/keymaps/macro/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2018 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_macro( /* Base */ + KC_F19, KC_F20, KC_F21, \ + KC_F22, KC_F23, KC_F24 \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/6lit/keymaps/macro/readme.md b/keyboards/40percentclub/6lit/keymaps/macro/readme.md new file mode 100644 index 000000000..9f883b821 --- /dev/null +++ b/keyboards/40percentclub/6lit/keymaps/macro/readme.md @@ -0,0 +1 @@ +# The default single board macro keymap for 6lit diff --git a/keyboards/40percentclub/6lit/readme.md b/keyboards/40percentclub/6lit/readme.md new file mode 100644 index 000000000..3d28df2d7 --- /dev/null +++ b/keyboards/40percentclub/6lit/readme.md @@ -0,0 +1,18 @@ +# 6lit + +![6lit](https://1.bp.blogspot.com/-Pa8RgYZ0hy8/Wbmr4bjuV0I/AAAAAAACDbI/WLKQMDlcDVAVf1lAIRMN51usR1XcCCVNgCLcBGAs/s1600/a.JPG) +=== + +6 key macropad that fits within the 100mm x 100mm PCB size. Can be used singly as a regular 6 key macropad as well. + +* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/6lit) + +Keyboard Maintainer: QMK Community +Hardware Supported: 6lit PCB +Hardware Availability: [6lit project on 40% Keyboards](http://www.40percent.club/2017/09/6lit.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/6lit: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/40percentclub/6lit/rules.mk b/keyboards/40percentclub/6lit/rules.mk new file mode 100644 index 000000000..327565165 --- /dev/null +++ b/keyboards/40percentclub/6lit/rules.mk @@ -0,0 +1,83 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +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) + +# Enable generic behavior for split boards +SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h new file mode 100644 index 000000000..89219c460 --- /dev/null +++ b/keyboards/40percentclub/foobar/config.h @@ -0,0 +1,230 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x0F00 +#define MANUFACTURER di0ib +#define PRODUCT The foobar Keyboard +#define DESCRIPTION A split 30 key keyboard + +#define USE_SERIAL + +/* Select hand configuration */ +#define MASTER_LEFT +//#define MASTER_RIGHT +//#define EE_HANDS + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 3*2 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D7, E6, B4 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ diff --git a/keyboards/40percentclub/foobar/foobar.c b/keyboards/40percentclub/foobar/foobar.c new file mode 100644 index 000000000..c032056a1 --- /dev/null +++ b/keyboards/40percentclub/foobar/foobar.c @@ -0,0 +1,55 @@ +/* Copyright 2018 + * + * 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 . + */ +#include "foobar.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, + {{4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, + {{4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}}, +}; +#endif diff --git a/keyboards/40percentclub/foobar/foobar.h b/keyboards/40percentclub/foobar/foobar.h new file mode 100644 index 000000000..fc49c72aa --- /dev/null +++ b/keyboards/40percentclub/foobar/foobar.h @@ -0,0 +1,66 @@ +/* Copyright 2018 + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ___ KC_NO + +#ifndef FLIP_HALF +#define LAYOUT_split( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24 \ +) { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 } \ +} +#else +#define LAYOUT_split( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24 \ +) { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 } \ +} +#endif + +#define LAYOUT_macro( \ + L00, L01, L02, L03, L04, \ + L10, L11, L12, L13, L14, \ + L20, L21, L22, L23, L24 \ +) { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___ } \ +} + +#define LAYOUT LAYOUT_macro + +#ifdef USE_I2C + #error "I2C not Supported" +#endif diff --git a/keyboards/40percentclub/foobar/info.json b/keyboards/40percentclub/foobar/info.json new file mode 100644 index 000000000..cb7f29b25 --- /dev/null +++ b/keyboards/40percentclub/foobar/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "foobar", + "url": "", + "maintainer": "qmk", + "width": 6, + "height": 2, + "layouts": { + "LAYOUT_macro": { + "key_count": 15, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2} + ] + }, + "LAYOUT_split": { + "key_count": 30, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2} + ] + } + } +} diff --git a/keyboards/40percentclub/foobar/keymaps/default/config.h b/keyboards/40percentclub/foobar/keymaps/default/config.h new file mode 100644 index 000000000..6173b6327 --- /dev/null +++ b/keyboards/40percentclub/foobar/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/foobar/keymaps/default/keymap.c b/keyboards/40percentclub/foobar/keymaps/default/keymap.c new file mode 100644 index 000000000..b750c6185 --- /dev/null +++ b/keyboards/40percentclub/foobar/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2018 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _______ KC_TRNS +#define FN1_Q LT(1, KC_Q) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split( + FN1_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ESC, + KC_Z, KC_X, KC_C, KC_V, KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT + ), + + [1] = LAYOUT_split( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/foobar/keymaps/default/readme.md b/keyboards/40percentclub/foobar/keymaps/default/readme.md new file mode 100644 index 000000000..7113469e7 --- /dev/null +++ b/keyboards/40percentclub/foobar/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default split keymap for foobar diff --git a/keyboards/40percentclub/foobar/keymaps/macro/config.h b/keyboards/40percentclub/foobar/keymaps/macro/config.h new file mode 100644 index 000000000..6173b6327 --- /dev/null +++ b/keyboards/40percentclub/foobar/keymaps/macro/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/foobar/keymaps/macro/keymap.c b/keyboards/40percentclub/foobar/keymaps/macro/keymap.c new file mode 100644 index 000000000..1e7ec905f --- /dev/null +++ b/keyboards/40percentclub/foobar/keymaps/macro/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2018 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_macro( /* Base */ + KC_F13, KC_F14, KC_F15, KC_F16, KC_INT1, \ + KC_F17, KC_F18, KC_F19, KC_F20, KC_INT2, \ + KC_F21, KC_F22, KC_F23, KC_F14, KC_INT5 \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/foobar/keymaps/macro/readme.md b/keyboards/40percentclub/foobar/keymaps/macro/readme.md new file mode 100644 index 000000000..4cc59e7e5 --- /dev/null +++ b/keyboards/40percentclub/foobar/keymaps/macro/readme.md @@ -0,0 +1 @@ +# The default single board macro keymap for foobar diff --git a/keyboards/40percentclub/foobar/readme.md b/keyboards/40percentclub/foobar/readme.md new file mode 100644 index 000000000..0acdf7252 --- /dev/null +++ b/keyboards/40percentclub/foobar/readme.md @@ -0,0 +1,18 @@ +# foobar + +![foobar](https://2.bp.blogspot.com/-rr8TK6xg2N0/WbwVL2O7EfI/AAAAAAACDc8/209wN69ju0wAFICYYPNLIEGQhat5-5MbwCLcBGAs/s640/a.JPG) +=== + +Split 30% keyboard that fits within the 100mm x 100mm PCB size. Can be used together as a split keyboard or as a single 15 key macropad. + +* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/foobar) + +Keyboard Maintainer: QMK Community +Hardware Supported: foobar PCB +Hardware Availability: [foobar project on 40% Keyboards](http://www.40percent.club/2017/09/foobar-10.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/foobar: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/40percentclub/foobar/rules.mk b/keyboards/40percentclub/foobar/rules.mk new file mode 100644 index 000000000..327565165 --- /dev/null +++ b/keyboards/40percentclub/foobar/rules.mk @@ -0,0 +1,83 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +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) + +# Enable generic behavior for split boards +SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/gherkin/config.h b/keyboards/40percentclub/gherkin/config.h new file mode 100644 index 000000000..34f38e35c --- /dev/null +++ b/keyboards/40percentclub/gherkin/config.h @@ -0,0 +1,54 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 40 Percent Club +#define PRODUCT Gherkin +#define DESCRIPTION A 30 key ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 6 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B5 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/40percentclub/gherkin/gherkin.c b/keyboards/40percentclub/gherkin/gherkin.c new file mode 100644 index 000000000..2952d842c --- /dev/null +++ b/keyboards/40percentclub/gherkin/gherkin.c @@ -0,0 +1 @@ +#include "gherkin.h" diff --git a/keyboards/40percentclub/gherkin/gherkin.h b/keyboards/40percentclub/gherkin/gherkin.h new file mode 100644 index 000000000..f8674be40 --- /dev/null +++ b/keyboards/40percentclub/gherkin/gherkin.h @@ -0,0 +1,18 @@ +#ifndef GHERKIN_H +#define GHERKIN_H + +#include "quantum.h" + +#define LAYOUT_ortho_3x10( \ + K00, K01, K02, K03, K04, K05, K10, K11, K12, K13 , \ + K14, K15, K20, K21, K22, K23, K24, K25, K30, K31 , \ + K32, K33, K34, K35, K40, K41, K42, K43, K44, K45 \ +) { \ + { K00, K01, K02, K03, K04, K05 }, \ + { K10, K11, K12, K13, K14, K15 }, \ + { K20, K21, K22, K23, K24, K25 }, \ + { K30, K31, K32, K33, K34, K35 }, \ + { K40, K41, K42, K43, K44, K45 } \ +} + +#endif diff --git a/keyboards/40percentclub/gherkin/info.json b/keyboards/40percentclub/gherkin/info.json new file mode 100644 index 000000000..7ebbfb04b --- /dev/null +++ b/keyboards/40percentclub/gherkin/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Gherkin", + "url": "", + "maintainer": "qmk", + "width": 10, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x10": { + "key_count": 30, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}] + } + } +} diff --git a/keyboards/40percentclub/gherkin/keymaps/bbaserdem/README.md b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/README.md new file mode 100644 index 000000000..3c9a5e98b --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/README.md @@ -0,0 +1,11 @@ +# Gherkin Layout +This is my gherkin layout. +It is used as a game pad, and key layout is inspired by spare keys I had lying around. +The firmware is very simple, and only includes one layer keymap, and RGB effects. + +# Flashing +The following command should be used from the main qmk directory. +``` +make gherkin:bbaserdem +sudo avrdude -p atmgea34u4 -P `ls /dev/ttyACM*` -c avr109 -U flash:.build/gherkin_bbaserdem.hex +``` diff --git a/keyboards/40percentclub/gherkin/keymaps/bbaserdem/config.h b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/config.h new file mode 100644 index 000000000..37d7113e7 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/config.h @@ -0,0 +1,13 @@ +#ifndef CONFIG_KEYMAP_H +#define CONFIG_KEYMAP_H + +#include "../../config.h" +#define RGB_DI_PIN F6 +#define RGBLED_NUM 10 +#define RGBLIGHT_ANIMATIONS +#ifdef BACKLIGHT_LEVELS +#undef BACKLIGHT_LEVELS +#endif +#define BACKLIGHT_LEVELS 3 + +#endif diff --git a/keyboards/40percentclub/gherkin/keymaps/bbaserdem/keymap.c b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/keymap.c new file mode 100644 index 000000000..0d3c8557c --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/keymap.c @@ -0,0 +1,36 @@ +// This is a game-pad gherkin layout with RGB and LED lights + +#include QMK_KEYBOARD_H + +backlight_config_t backlight_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Game pad + * ,-----------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | Ctl | Alt | ~ | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | E | R | T | |^| | ; | ' | / | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | Shf | A | S | D | F | <-- | |v| | --> | , | . | + * `-----------------------------------------------------------' + */ + LAYOUT_ortho_3x10( + KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_LCTRL, KC_LALT, KC_GRAVE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, KC_SCLN, KC_QUOTE, KC_SLASH, + KC_LSHIFT, KC_A, KC_S, KC_D, KC_F, KC_LEFT, KC_DOWN, KC_RIGHT, KC_COMMA, KC_DOT + ) +}; + +void matrix_init_user(void) { + // Set LED's to max + _delay_us(300); + backlight_config.level = 2; + backlight_config.enable = 1; + eeconfig_update_backlight(backlight_config.raw); + backlight_set(backlight_config.level); + // Set RGB to rainbow mood light + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(120,255,255); + rgblight_mode(6); +} diff --git a/keyboards/40percentclub/gherkin/keymaps/bbaserdem/rules.mk b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/rules.mk new file mode 100644 index 000000000..cd1cddebf --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/rules.mk @@ -0,0 +1,17 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +USER_NAME := bbaserdem-nouserspace + +STENO_ENABLE = no # Additional protocols for Stenography(+1700), requires VIRTSER +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +AUDIO_ENABLE = no # Enable audio output from keyboard + +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable RBG light strips +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c new file mode 100644 index 000000000..f01820030 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +#include QMK_KEYBOARD_H + +#define _______ KC_TRNS +#define FN1_Q LT(1, KC_Q) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_3x10( + FN1_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ESC, + KC_Z, KC_X, KC_C, KC_V, KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT + ), + + [1] = LAYOUT_ortho_3x10( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_INC, + _______, _______, _______, _______, _______, _______, RESET, _______, _______, BL_DEC + ), + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + keyevent_t event = record->event; + (void)event; + + switch (id) { + + } + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + DDRD |= (1 << 5); PORTD &= ~(1 << 5); + } else { + DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 0); PORTB &= ~(1 << 0); + } else { + DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h new file mode 100644 index 000000000..71c0cb8b5 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h @@ -0,0 +1,15 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#undef RGB_DI_PIN +#undef RGBLED_NUM +#define RGB_DI_PIN D2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c new file mode 100644 index 000000000..580b041c9 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c @@ -0,0 +1,152 @@ +#include QMK_KEYBOARD_H + +extern rgblight_config_t rgblight_config; +extern keymap_config_t keymap_config; + +#define _PS 0 // This is the Photoshop Layer +#define _AI 1 // This is the Illustrator Layer +#define _PR 2 // This is the Premier Layer +#define _XD 3 // This is the Experience Design Layer + +enum custom_keycodes { + PS = SAFE_RANGE, + AI, + PR, +}; + +#define _______ KC_TRNS + +#define PS TO(0) +#define AI TO(1) +#define PR TO(2) +#define XD TO(3) + +// Mix of Photoshop, Illustrator, Premiere, and Experience Design shortcuts. +#define SAVE LCTL(KC_S) +#define OPEN LCTL(KC_O) +#define COPY LCTL(KC_C) +#define PAST LCTL(KC_V) +#define CUNDO LCTL(LALT(KC_Z)) +#define INVERT LCTL(LSFT(KC_I)) +#define NLAYER LSFT(LCTL(KC_N)) +#define UNDO LCTL(KC_Z) +#define TRANS LCTL(KC_T) +#define ALIGNL LCTL(LSFT(KC_L)) +#define ALIGNC LCTL(LSFT(KC_C)) +#define ALIGNR LCTL(LSFT(KC_R)) +#define BRINGF LCTL(KC_RBRC) +#define BRINGB LCTL(KC_LBRC) + +// Illustrator layer shortcuts. +#define SHAPE LSFT(KC_M) +#define RULER LCTL(LALT(KC_R)) + +// Premiere layer shortcuts. +#define REDO LCTL(LSFT(KC_Z)) +#define EXPORT LCTL(KC_M) +#define IMPORT LCTL(KC_I) +#define PCOPY LCTL(KC_V) +#define PPASTE LCTL(LSFT(KC_V)) + +// Experience Design layer shortcuts. (can be used with others too.) +#define NEW LCTL(KC_N) +#define LOCK LCTL(KC_L) +#define SYMB LCTL(KC_K) +#define HIDE LCTL(KC_SCLN) +#define REPEAT LCTL(KC_R) +#define MASK LCTL(LSFT(KC_M)) +#define GROUP LCTL(KC_G) +#define UNGRP LCTL(LSFT(KC_G)) +#define VIEW LCTL(KC_TAB) +#define HORZ LSFT(KC_C) +#define VERT LSFT(KC_M) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Photoshop layer + [_PS] = LAYOUT_ortho_3x10( + SAVE, KC_W, KC_E, KC_T, KC_U, KC_I, KC_P, INVERT, CUNDO, NLAYER, + UNDO, KC_H, KC_L, TRANS, ALIGNL, ALIGNC, ALIGNR, BRINGB, BRINGF, OPEN, + KC_LSFT, COPY, PAST, KC_Z, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, AI + ), + + // Illustrator layer + [_AI] = LAYOUT_ortho_3x10( + _______, M(0), RULER, _______, KC_G, _______, _______, KC_Q, KC_MINS, KC_PLUS, + _______, _______, _______, KC_E, _______, _______, _______, SHAPE, KC_O, OPEN, + _______, _______, _______, _______, _______, _______, _______, KC_M, KC_SLSH, PR + ), + + // Premiere layer + [_PR] = LAYOUT_ortho_3x10( + _______, KC_Q, KC_W, KC_I, KC_O, KC_P, IMPORT, EXPORT, KC_MINS, KC_EQL, + _______, REDO, KC_D, KC_F, KC_H, KC_M, KC_ENT, KC_LBRC, KC_RBRC, OPEN, + _______, PCOPY, PPASTE, KC_SPC, KC_Z, KC_C, KC_V, KC_LEFT, KC_RIGHT, XD + ), + + // Experience Design layer + [_XD] = LAYOUT_ortho_3x10( + _______, KC_E, KC_R, KC_T, KC_P, KC_A, KC_L, KC_V, KC_DEL, NEW, + _______, REDO, GROUP, UNGRP, VIEW, HORZ, VERT, KC_Z, KC_ENT, OPEN, + _______, KC_LCTL, COPY, PAST, SYMB, LOCK, MASK, HIDE, REPEAT, PS + ), + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +void matrix_init_user(void) { + rgblight_enable(); +} + +void matrix_scan_user(void) { + #ifdef RGBLIGHT_ENABLE + + static uint8_t old_layer = 255; + uint8_t new_layer = biton32(layer_state); + + // Color of the Icons. + if (old_layer != new_layer) { + switch (new_layer) { + case _PS: + // #31C5F0 + rgblight_setrgb(49, 197, 240); + break; + case _AI: + // #FF8011 + rgblight_setrgb(255, 128, 17); + break; + case _PR: + // #E788FF + rgblight_setrgb(231, 136, 255); + break; + case _XD: + // #FF2BC2 + rgblight_setrgb(255, 43, 194); + break; + } + old_layer = new_layer; + } + #endif +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + keyevent_t event = record->event; + (void)event; + + switch (id) { + case 0: + // Save for Web Macro. + return MACRO(D(LSFT), D(LALT), D(LCTL), T(S), U(LCTL), U(LALT), U(LSFT), END); + } + return MACRO_NONE; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + } + return true; +} diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk new file mode 100644 index 000000000..ed0af7b8b --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk @@ -0,0 +1,7 @@ +BACKLIGHT_ENABLE = yes +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/mjt/config.h b/keyboards/40percentclub/gherkin/keymaps/mjt/config.h new file mode 100644 index 000000000..bb59ec213 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/mjt/config.h @@ -0,0 +1,169 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Some Guy +#define PRODUCT Gherkin +#define DESCRIPTION 30 percent disaster + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +// These are with USB on the left. +// #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +// original from TMK: #define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4 } +// #define MATRIX_COL_PINS { D0, D4, F6, D7, E6, B4 } + +// these are with USB on the right. +#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { B4, E6, D7, F6, D4, D0 } + +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_PIN B5 + +/* 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 AUDIO_VOICES + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c b/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c new file mode 100644 index 000000000..2b4369c34 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c @@ -0,0 +1,279 @@ +#include QMK_KEYBOARD_H +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +extern keymap_config_t keymap_config; + +//Tap Dance Declarations +enum { + TD_Z_LCTL = 0, + TD_X_LGUI = 1, + TD_C_LALT = 2, + TD_A_TAB = 3, + TD_Q_ESC = 4, +// M(0) +}; + +//Friendly Layer Names +enum gherkin_layers { + _QWERTY, + _SONGS, + _NUMBERS, + _SYMBOLS, + _PLOVER, + _ADJUST +}; + +// custom keycodes +enum gherkin_keycodes { + QWERTY = SAFE_RANGE, + NUMBERS, + SYMBOLS, + SONGS, + PLOVER, + BACKLIT, + MACSLEEP, + EXT_PLV +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_ortho_3x10( + TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + TD(TD_A_TAB), LT(_SYMBOLS,KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_ADJUST,KC_SPC), + TD(TD_Z_LCTL), TD(TD_X_LGUI), TD(TD_C_LALT), KC_V, KC_B, LT(_NUMBERS, KC_N), KC_M, KC_COMM, KC_DOT, SFT_T(KC_ENT) + ), + [_NUMBERS] = LAYOUT_ortho_3x10( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_HOME, KC_PGDN, KC_PGUP, KC_END , + KC_F7, KC_F8, KC_F9, KC_F10, LT(_ADJUST,KC_F11), _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [_SYMBOLS] = LAYOUT_ortho_3x10( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_GRV, _______, XXXXXXX, KC_LBRC, KC_RBRC, KC_BSLS, KC_MINS, KC_EQL , KC_SCLN, KC_QUOT, + KC_TILD, MO(_ADJUST), XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, KC_UNDS, KC_PLUS, S(KC_SCLN), S(KC_QUOT) + ), + [_PLOVER] = LAYOUT_ortho_3x10( + KC_Q, KC_W, KC_E, KC_R, KC_1, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX + ), + [_ADJUST] = LAYOUT_ortho_3x10( + RESET, _______, _______, _______, _______, QWERTY, NUMBERS, SYMBOLS, PLOVER, SONGS, + MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, MACSLEEP, _______, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case NUMBERS: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistant_default_layer_set(1UL<<_NUMBERS); + } + return false; + break; + case SYMBOLS: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistant_default_layer_set(1UL<<_SYMBOLS); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(tone_plover); + #endif + layer_off(_NUMBERS); + layer_off(_SYMBOLS); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_plover_gb); + #endif + layer_off(_PLOVER); + } + return false; + break; + case MACSLEEP: + if (record->event.pressed) { + // ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER); + register_code(KC_RSFT); + register_code(KC_RCTL); + register_code(KC_POWER); + unregister_code(KC_POWER); + unregister_code(KC_RCTL); + unregister_code(KC_RSFT); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +} + + +/* +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + keyevent_t event = record->event; + + switch (id) { + case 0: { + if (record->event.pressed) { + key_timer = timer_read(); // if the key is being pressed, we start the timer. + } + else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down"). + if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap. + return MACRO( D(LSFT), END ); + } + else { + return MACRO( T(N), END ); + } + } + break; + } + } + return MACRO_NONE; +}*/ + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_SONG(tone_startup); +} + +void shutdown_user() +{ + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_SONG(music_scale); +} + +#endif + +void matrix_scan_user(void) { +} + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_Z_LCTL] = ACTION_TAP_DANCE_DOUBLE(KC_Z, KC_LCTL), + [TD_X_LGUI] = ACTION_TAP_DANCE_DOUBLE(KC_X, KC_LGUI), + [TD_C_LALT] = ACTION_TAP_DANCE_DOUBLE(KC_C, KC_LALT), + [TD_A_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_A, KC_TAB), + [TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC) +}; + +// don't know what this is doing... +/* +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + DDRD |= (1 << 5); PORTD &= ~(1 << 5); + } else { + DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 0); PORTB &= ~(1 << 0); + } else { + DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} +*/ diff --git a/keyboards/40percentclub/gherkin/keymaps/mjt/rules.mk b/keyboards/40percentclub/gherkin/keymaps/mjt/rules.mk new file mode 100644 index 000000000..afb93b674 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/mjt/rules.mk @@ -0,0 +1,29 @@ +## not sure where this stuff goes ## +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE=yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/40percentclub/gherkin/keymaps/steno/config.h b/keyboards/40percentclub/gherkin/keymaps/steno/config.h new file mode 100644 index 000000000..abacefa01 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/steno/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define NO_ACTION_LAYER +#define NO_ACTION_TAPPING +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#endif \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/steno/keymap.c b/keyboards/40percentclub/gherkin/keymaps/steno/keymap.c new file mode 100644 index 000000000..c7ee63d12 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/steno/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H +#include "keymap_steno.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_ortho_3x10( + STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + STN_NUM, STN_NUM, STN_A, STN_O, STN_NUM, STN_E, STN_U, STN_NUM, STN_NUM, STN_NUM), +}; + +void matrix_init_user() { + steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT +} \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/steno/readme.md b/keyboards/40percentclub/gherkin/keymaps/steno/readme.md new file mode 100644 index 000000000..6536ed7ab --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/steno/readme.md @@ -0,0 +1,9 @@ +# Gherkin Steno + +This is a stenography-only keymap. It boots by default into GeminiPR mode. All the excess stuff is stripped away (I'd remove normal keyboard support if I could). + +> Note: The number bar has been moved to the bottom row in all the left-over spaces. + + | S | T | P | H | * | F | P | L | T | D | + | S | K | W | R | * | R | B | G | S | Z | + | # | # | A | O | # | E | U | # | # | # | diff --git a/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk b/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk new file mode 100644 index 000000000..fa813f209 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk @@ -0,0 +1,16 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/config.h b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/config.h new file mode 100644 index 000000000..7fa3bf328 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/config.h @@ -0,0 +1,6 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#endif diff --git a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c new file mode 100644 index 000000000..ea2921924 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H +#include "keymap_steno.h" + +#define ST_BOLT QK_STENO_BOLT +#define ST_GEM QK_STENO_GEMINI + +#define XXXXXXX KC_NO + +enum keyboard_layers { + _QWERTY, + _RAISE, + _LOWER, + _PLOVER, + _ADJUST +}; + +#define ADJ_Z LT(_ADJUST, KC_Z) +#define RS_BSPC LT(_RAISE, KC_BSPC) +#define LW_SPC LT(_LOWER, KC_SPC) +#define MO_ADJ MO(_ADJUST) +#define TG_PLV TG(_PLOVER) +#define OS_LCTL OSM(MOD_LCTL) +#define OS_LALT OSM(MOD_LALT) +#define OS_LGUI OSM(MOD_LGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_ortho_3x10( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RSFT, + ADJ_Z, KC_X, KC_C, KC_V, RS_BSPC, LW_SPC, KC_B, KC_N, KC_M, KC_ENT + ), + + [_RAISE] = LAYOUT_ortho_3x10( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_7, KC_9, KC_0, + KC_ESC, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC, _______, KC_QUOT, KC_SCLN, _______, + OS_LCTL, OS_LGUI, OS_LALT, KC_GRV, _______, KC_TAB, KC_BSLS, KC_COMM, KC_DOT, KC_SLSH + ), + + [_LOWER] = LAYOUT_ortho_3x10( + KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, + KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, + KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, OS_LALT, OS_LGUI, OS_LCTL, KC_CAPS + ), + + [_PLOVER] = LAYOUT_ortho_3x10( + STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + MO_ADJ, STN_NUM, STN_A, STN_O, STN_NUM, STN_E, STN_U, STN_NUM, STN_NUM, XXXXXXX + ), + + [_ADJUST] = LAYOUT_ortho_3x10( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ST_BOLT, ST_GEM, TG_PLV, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET + ), + +}; diff --git a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/rules.mk b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/rules.mk new file mode 100644 index 000000000..02216ecb3 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/rules.mk @@ -0,0 +1,6 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER diff --git a/keyboards/40percentclub/gherkin/readme.md b/keyboards/40percentclub/gherkin/readme.md new file mode 100644 index 000000000..a6680d720 --- /dev/null +++ b/keyboards/40percentclub/gherkin/readme.md @@ -0,0 +1,21 @@ +# Gherkin + +![Gherkin](https://4.bp.blogspot.com/-sQ18-lNZXOc/WCzlTde-4PI/AAAAAAAB_JQ/qQrehAMG6DMKf3i4oj4mkmLGOfTUvb3KgCLcB/s640/IMG_20161116_122926.jpg) +=== + +A 30 key keyboard. + +* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin) + +Keyboard Maintainer: QMK Community +Hardware Supported: Gherkin PCB +Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/gherkin: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). + +First pass at adding support for the gherkin keyboard. Compiles but completely +untested. Intended to kick-start development. diff --git a/keyboards/40percentclub/gherkin/rules.mk b/keyboards/40percentclub/gherkin/rules.mk new file mode 100644 index 000000000..416ca5e5f --- /dev/null +++ b/keyboards/40percentclub/gherkin/rules.mk @@ -0,0 +1,59 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no + +LAYOUTS = ortho_3x10 diff --git a/keyboards/40percentclub/luddite/config.h b/keyboards/40percentclub/luddite/config.h new file mode 100644 index 000000000..62ff72bb0 --- /dev/null +++ b/keyboards/40percentclub/luddite/config.h @@ -0,0 +1,48 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x1001 +#define MANUFACTURER di0ib +#define PRODUCT Luddite +#define DESCRIPTION Luddite Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* number of backlight levels */ +#define BACKLIGHT_PIN B5 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 4 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 // Number of LEDs +// #define RGBLIGHT_HUE_STEP 10 +// #define RGBLIGHT_SAT_STEP 17 +// #define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/40percentclub/luddite/keymaps/default/keymap.c b/keyboards/40percentclub/luddite/keymaps/default/keymap.c new file mode 100644 index 000000000..4d6ae0d52 --- /dev/null +++ b/keyboards/40percentclub/luddite/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_60_ansi( + KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT , KC_RGUI , MO(_FN1) , KC_RCTL + ), + + [_FN1] = LAYOUT_60_ansi( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, \ + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_GRV, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/40percentclub/luddite/luddite.c b/keyboards/40percentclub/luddite/luddite.c new file mode 100644 index 000000000..3e720ad57 --- /dev/null +++ b/keyboards/40percentclub/luddite/luddite.c @@ -0,0 +1 @@ +#include "luddite.h" diff --git a/keyboards/40percentclub/luddite/luddite.h b/keyboards/40percentclub/luddite/luddite.h new file mode 100644 index 000000000..1ba743e9e --- /dev/null +++ b/keyboards/40percentclub/luddite/luddite.h @@ -0,0 +1,21 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K10, K11, K12, K13, K14, K15, \ + K16, K17, K20, K21, K22, K23, K24, K25, K26, K27, K30, K31, K32, K33, \ + K34, K35, K36, K37, K40, K41, K42, K43, K44, K45, K46, K47, K50, \ + K51, K52, K53, K54, K55, K56, K57, K60, K61, K62, K63, K64, \ + K65, K66, K67, K70, K71, K72, K73, K74\ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74 }, \ +} + diff --git a/keyboards/40percentclub/luddite/readme.md b/keyboards/40percentclub/luddite/readme.md new file mode 100644 index 000000000..928b6de8f --- /dev/null +++ b/keyboards/40percentclub/luddite/readme.md @@ -0,0 +1,21 @@ +# Luddite + +![Luddite](https://1.bp.blogspot.com/-GAAa-sMU_WU/W7uYLJJ8x1I/AAAAAAACS44/31n2z69BSboM4KT48YkNMJRYciC8LUMWgCLcBGAs/s640/a.jpg) +=== + +Luddite 60% keyboard with backlight and RGB underglow. + +* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/luddite) + +Keyboard Maintainer: QMK Community +Hardware Supported: Luddite PCB +Hardware Availability: [Luddite project on 40% Keyboards](http://www.40percent.club/search/label/luddite) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/luddite: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). + +First pass at adding support for the luddite keyboard. Compiles but completely +untested. Intended to kick-start development. diff --git a/keyboards/40percentclub/luddite/rules.mk b/keyboards/40percentclub/luddite/rules.mk new file mode 100644 index 000000000..2f7d847bf --- /dev/null +++ b/keyboards/40percentclub/luddite/rules.mk @@ -0,0 +1,59 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes + +LAYOUTS = 60_ansi diff --git a/keyboards/40percentclub/mf68/config.h b/keyboards/40percentclub/mf68/config.h new file mode 100644 index 000000000..07d787eac --- /dev/null +++ b/keyboards/40percentclub/mf68/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x0510 +#define DEVICE_VER 0x0101 +#define MANUFACTURER di0ib +#define PRODUCT MF68 +#define DESCRIPTION Magicforce 68 with programmable PCB replacement + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } +#define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/40percentclub/mf68/info.json b/keyboards/40percentclub/mf68/info.json new file mode 100644 index 000000000..fae15aaf5 --- /dev/null +++ b/keyboards/40percentclub/mf68/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "MF68", + "url": "", + "maintainer": "qmk", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT_68_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"x":15.25, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}] + } + } +} diff --git a/keyboards/40percentclub/mf68/keymaps/default/keymap.c b/keyboards/40percentclub/mf68/keymaps/default/keymap.c new file mode 100644 index 000000000..73045f310 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + +#define _QWERTY 0 +#define _FN1 1 +#define _FN2 2 +#define KC_ KC_TRNS +#define KC_X0 LT(_FN2, KC_GRV) +#define KC_X1 MO(_FN1) +#define KC_X2 BL_STEP + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, + /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ + TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, + /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ + X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , + /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , + /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ + LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT + /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ + ), + + [_FN1] = LAYOUT_kc( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, + /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ + , , , UP , , , , , , , , , X2 , , VOLD,END, + /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ + , ,LEFT,DOWN,RGHT, , , , , , , , , + /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ + , , , , , , ,MUTE, , , , , MUTE, + /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ + , , , , , , , MPRV,MPLY,MNXT + /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + ), + + [_FN2] = LAYOUT_kc( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, + /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ + , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END, + /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ + , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , , + /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ + , , , , , , 0 , 1 , 2 , 3 , , , MUTE, + /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ + , , , , , , , MPRV,MPLY,MNXT + /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + ) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/40percentclub/mf68/keymaps/factory/keymap.c b/keyboards/40percentclub/mf68/keymaps/factory/keymap.c new file mode 100644 index 000000000..0c5305e51 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/factory/keymap.c @@ -0,0 +1,74 @@ +#include QMK_KEYBOARD_H + +#define _QWERTY 0 +#define _FN1 1 +#define _FN2 2 +#define KC_ KC_TRNS +#define KC_X0 LT(_FN2, KC_CAPS) +#define KC_X1 MO(_FN1) +#define KC_X2 BL_STEP +#define KC_X3 BL_BRTG +#define KC_X4 BL_TOGG +#define KC_X5 BL_INC +#define KC_X6 BL_DEC + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, + /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ + TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, + /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ + X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , + /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , + /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ + LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT + /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ + ), + + [_FN1] = LAYOUT_kc( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , ,HOME, + /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ + , , UP , , , , , , ,PSCR,SLCK,PAUS, X2 , , ,END, + /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ + X0 ,LEFT,DOWN,RGHT, , X6 , X5 , X4 , X3 , X2 ,HOME, , , + /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ + , ,MPLY,MSTP,MPRV,MNXT,VOLD,VOLU,MUTE, ,END , , X5 , + /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ + , , , , , , , X3 , X6 , X4 + /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + ), + + [_FN2] = LAYOUT_kc( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, + /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ + , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END, + /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ + , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , , + /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ + , , , , , , 0 , 1 , 2 , 3 , , , MUTE, + /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ + , , , , , , , MPRV,MPLY,MNXT + /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + ) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/40percentclub/mf68/mf68.c b/keyboards/40percentclub/mf68/mf68.c new file mode 100644 index 000000000..1da522e7e --- /dev/null +++ b/keyboards/40percentclub/mf68/mf68.c @@ -0,0 +1,8 @@ +#include "mf68.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/40percentclub/mf68/mf68.h b/keyboards/40percentclub/mf68/mf68.h new file mode 100644 index 000000000..a55c1d60b --- /dev/null +++ b/keyboards/40percentclub/mf68/mf68.h @@ -0,0 +1,40 @@ +#ifndef MF68_H +#define MF68_H + +#include "quantum.h" + +#define LAYOUT_68_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ + K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ + K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ + K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, K74 } \ +} + +#define LAYOUT_kc( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ + K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ + K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ + K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ +) LAYOUT_68_ansi( \ + KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \ + KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \ + KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \ + KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \ + KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \ + KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \ + KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \ + KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \ +) + +#endif diff --git a/keyboards/40percentclub/mf68/readme.md b/keyboards/40percentclub/mf68/readme.md new file mode 100644 index 000000000..825c265f1 --- /dev/null +++ b/keyboards/40percentclub/mf68/readme.md @@ -0,0 +1,18 @@ +# mf68 + +![mf68](https://3.bp.blogspot.com/-0YCA3Hx2Rq0/WD3U3GWhyvI/AAAAAAAB_Uo/RWTeyCPblGcxDrDwT9WL9ck2ZRuR26DgACLcB/s640/IMG_20161129_063741.jpg) +=== + +Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib). + +* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) + +Keyboard Maintainer: QMK Community +Hardware Supported: Pro Micro +Hardware Availability: [PCB files](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68/pcb) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/mf68: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/40percentclub/mf68/rules.mk b/keyboards/40percentclub/mf68/rules.mk new file mode 100644 index 000000000..9f6445686 --- /dev/null +++ b/keyboards/40percentclub/mf68/rules.mk @@ -0,0 +1,68 @@ + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# 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 +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# 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 ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +LAYOUTS = 68_ansi \ No newline at end of file diff --git a/keyboards/40percentclub/mf68_ble/config.h b/keyboards/40percentclub/mf68_ble/config.h new file mode 100644 index 000000000..83c0a7a5a --- /dev/null +++ b/keyboards/40percentclub/mf68_ble/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x0510 +#define DEVICE_VER 0x0101 +#define MANUFACTURER di0ib +#define PRODUCT MF68 +#define DESCRIPTION Magicforce 68 BLE + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D1, D0, C6, D7, B5, B6, B7, D6 } +#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 } +#define UNUSED_PINS {B5} + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW +/* +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +*/ + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/40percentclub/mf68_ble/info.json b/keyboards/40percentclub/mf68_ble/info.json new file mode 100644 index 000000000..4cd9b2c83 --- /dev/null +++ b/keyboards/40percentclub/mf68_ble/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "MF68 BLE", + "url": "", + "maintainer": "qmk", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT_68_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"x":15.25, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}] + } + } +} diff --git a/keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c b/keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c new file mode 100644 index 000000000..73045f310 --- /dev/null +++ b/keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + +#define _QWERTY 0 +#define _FN1 1 +#define _FN2 2 +#define KC_ KC_TRNS +#define KC_X0 LT(_FN2, KC_GRV) +#define KC_X1 MO(_FN1) +#define KC_X2 BL_STEP + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, + /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ + TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, + /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ + X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , + /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , + /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ + LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT + /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ + ), + + [_FN1] = LAYOUT_kc( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, + /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ + , , , UP , , , , , , , , , X2 , , VOLD,END, + /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ + , ,LEFT,DOWN,RGHT, , , , , , , , , + /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ + , , , , , , ,MUTE, , , , , MUTE, + /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ + , , , , , , , MPRV,MPLY,MNXT + /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + ), + + [_FN2] = LAYOUT_kc( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, + /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ + , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END, + /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ + , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , , + /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ + , , , , , , 0 , 1 , 2 , 3 , , , MUTE, + /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ + , , , , , , , MPRV,MPLY,MNXT + /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + ) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/40percentclub/mf68_ble/mf68_ble.c b/keyboards/40percentclub/mf68_ble/mf68_ble.c new file mode 100644 index 000000000..95f8592f8 --- /dev/null +++ b/keyboards/40percentclub/mf68_ble/mf68_ble.c @@ -0,0 +1,8 @@ +#include "mf68_ble.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/40percentclub/mf68_ble/mf68_ble.h b/keyboards/40percentclub/mf68_ble/mf68_ble.h new file mode 100644 index 000000000..8ef14c98d --- /dev/null +++ b/keyboards/40percentclub/mf68_ble/mf68_ble.h @@ -0,0 +1,40 @@ +#ifndef MF68_BLE_H +#define MF68_BLE_H + +#include "quantum.h" + +#define LAYOUT_68_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ + K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ + K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ + K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, K74 } \ +} + +#define LAYOUT_kc( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ + K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ + K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ + K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ +) LAYOUT_68_ansi( \ + KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \ + KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \ + KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \ + KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \ + KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \ + KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \ + KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \ + KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \ +) + +#endif diff --git a/keyboards/40percentclub/mf68_ble/readme.md b/keyboards/40percentclub/mf68_ble/readme.md new file mode 100644 index 000000000..0e0f4b90d --- /dev/null +++ b/keyboards/40percentclub/mf68_ble/readme.md @@ -0,0 +1,29 @@ +# mf68_ble + +![mf68_ble](https://3.bp.blogspot.com/-0YCA3Hx2Rq0/WD3U3GWhyvI/AAAAAAAB_Uo/RWTeyCPblGcxDrDwT9WL9ck2ZRuR26DgACLcB/s640/IMG_20161129_063741.jpg) +=== + +Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib). + +Keyboard Maintainer: QMK Community +Hardware Supported: [Feather 32u4 Bluefruit](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/) +Please note: This is 32u4 and not M0 +Hardware Availability: [PCB files](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68/pcb) +[MF68 thicc case files](https://github.com/harshitgoel96/mf68-case-thicc) +Story +----- + +The story and the idea behind this mod is available on [my reddit post](https://www.reddit.com/r/MechanicalKeyboards/comments/7eiiht/guide_i_built_a_bluetooth_enabled_magicforce68_no/) + +Wiring +------ + +Below is how you wire the Feather to PCB + +![wire map](https://i.imgur.com/zYOjlTA.png) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/mf68_ble: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/40percentclub/mf68_ble/rules.mk b/keyboards/40percentclub/mf68_ble/rules.mk new file mode 100644 index 000000000..07b59d785 --- /dev/null +++ b/keyboards/40percentclub/mf68_ble/rules.mk @@ -0,0 +1,67 @@ + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 8000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# 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 +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# 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 ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 +BLUETOOTH = AdafruitBLE \ No newline at end of file diff --git a/keyboards/40percentclub/nano/config.h b/keyboards/40percentclub/nano/config.h new file mode 100644 index 000000000..088fafcaa --- /dev/null +++ b/keyboards/40percentclub/nano/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x0007 +#define DEVICE_VER 0x0001 +#define MANUFACTURER di0ib +#define PRODUCT Nano +#define DESCRIPTION 8 key microswitch board + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 // Number of LEDs + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define TAPPING_TERM 200 + +#endif diff --git a/keyboards/40percentclub/nano/info.json b/keyboards/40percentclub/nano/info.json new file mode 100644 index 000000000..b135a2d09 --- /dev/null +++ b/keyboards/40percentclub/nano/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Nano", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}] + } + } +} diff --git a/keyboards/40percentclub/nano/keymaps/default/keymap.c b/keyboards/40percentclub/nano/keymaps/default/keymap.c new file mode 100644 index 000000000..cd9d4549d --- /dev/null +++ b/keyboards/40percentclub/nano/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +#define _MAIN 0 +#define _FN 1 + +#define _______ KC_TRNS +#define KC_X0 LT(_FN, KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT( + KC_VOLU, KC_MPLY, KC_MPRV, KC_PGUP, + KC_VOLD, KC_MUTE, KC_MNXT, KC_PGDN + ), + + [_FN] = LAYOUT( + KC_F, _______, RGB_HUI, _______, + RGB_TOG, RGB_MOD, RGB_HUD, _______ + ) +}; diff --git a/keyboards/40percentclub/nano/keymaps/default/rules.mk b/keyboards/40percentclub/nano/keymaps/default/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/40percentclub/nano/keymaps/spooka/config.h b/keyboards/40percentclub/nano/keymaps/spooka/config.h new file mode 100644 index 000000000..05900a215 --- /dev/null +++ b/keyboards/40percentclub/nano/keymaps/spooka/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2018 Danny Nguyen + +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 . +*/ + +#pragma once + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/40percentclub/nano/keymaps/spooka/keymap.c b/keyboards/40percentclub/nano/keymaps/spooka/keymap.c new file mode 100644 index 000000000..63b90da09 --- /dev/null +++ b/keyboards/40percentclub/nano/keymaps/spooka/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +#define _MAIN 0 + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT( + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD + ) +}; diff --git a/keyboards/40percentclub/nano/keymaps/spooka/rules.mk b/keyboards/40percentclub/nano/keymaps/spooka/rules.mk new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/keyboards/40percentclub/nano/keymaps/spooka/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/40percentclub/nano/matrix.c b/keyboards/40percentclub/nano/matrix.c new file mode 100644 index 000000000..fa2461af5 --- /dev/null +++ b/keyboards/40percentclub/nano/matrix.c @@ -0,0 +1,159 @@ +/* + +Note for ErgoDox EZ customizers: Here be dragons! +This is not a file you want to be messing with. +All of the interesting stuff for you is under keymaps/ :) +Love, Erez + +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "nano.h" +#include + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_stage[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static uint16_t debouncing_time; +static bool debouncing = false; + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + + DDRF &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7); + PORTF |= (1<<4 | 1<<5 | 1<<6 | 1<<7); + DDRC &= ~(1<<6); + PORTC |= (1<<6); + DDRD &= ~(1<<0 | 1<<1 | 1<<4); + PORTD |= (1<<0 | 1<<1 | 1<<4); + + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + matrix_stage[i] = 0; + } + + matrix_init_quantum(); + +} + +uint8_t matrix_scan(void) +{ + matrix_stage[0] = + (PINF&(1<<4) ? 0 : (1<<0)) | + (PINF&(1<<5) ? 0 : (1<<1)) | + (PINF&(1<<6) ? 0 : (1<<2)) | + (PINF&(1<<7) ? 0 : (1<<3)); + matrix_stage[1] = + (PIND&(1<<1) ? 0 : (1<<0)) | + (PIND&(1<<0) ? 0 : (1<<1)) | + (PIND&(1<<4) ? 0 : (1<<2)) | + (PINC&(1<<6) ? 0 : (1<<3)); + + if (memcmp(matrix_debouncing, matrix_stage, sizeof(matrix)) != 0) { + debouncing = true; + debouncing_time = timer_read(); + } + + matrix_debouncing[0] = matrix_stage[0]; + matrix_debouncing[1] = matrix_stage[1]; + + if (debouncing && (timer_elapsed(debouncing_time) > 20)) { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + debouncing = false; + } + + matrix_scan_quantum(); + + return 1; +} + +bool matrix_is_modified(void) +{ + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* eliminate lag on space cadet mods */ +#define PERMISSIVE_HOLD + +/* setup lighting */ +#define RGB_DI_PIN B5 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 30 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/40percentclub/tomato/info.json b/keyboards/40percentclub/tomato/info.json new file mode 100644 index 000000000..f01f5e7e0 --- /dev/null +++ b/keyboards/40percentclub/tomato/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Tomato", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 10, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x10": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}] + } + } +} diff --git a/keyboards/40percentclub/tomato/keymaps/default/keymap.c b/keyboards/40percentclub/tomato/keymaps/default/keymap.c new file mode 100644 index 000000000..94bfca202 --- /dev/null +++ b/keyboards/40percentclub/tomato/keymaps/default/keymap.c @@ -0,0 +1,158 @@ +#include QMK_KEYBOARD_H + +#define SPC_F1 LT(1,KC_SPC) +#define BS_F2 LT(2,KC_BSPC) +#define C_F3 LT(3,KC_C) +#define V_F4 LT(4,KC_V) +#define B_F5 LT(5,KC_B) +#define Z_CTL MT(MOD_LCTL, KC_Z) +#define X_ALT MT(MOD_LALT, KC_X) +#define N_ALT MT(MOD_RALT, KC_N) +#define M_CTL MT(MOD_RCTL, KC_M) +#define ENT_SFT MT(MOD_RSFT, KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Level 0: Default Layer + * ,-------------------------------------------------------------------------------. + * | Q | W | E | R | T | Y | U | I | O | P | + * |-------------------------------------------------------------------------------| + * | A | S | D | F | G | H | J | K | L | ESC | + * |-------------------------------------------------------------------------------| + * | Z | X | C | V | BSPC | SPC | B | N | M | ENT | + * '-------------------------------------------------------------------------------' + */ + LAYOUT_ortho_3x10 + ( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P + , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ESC + , Z_CTL, X_ALT, C_F3, V_F4, BS_F2, SPC_F1, B_F5, N_ALT, M_CTL, ENT_SFT + ), + /* Level 1: Numbers Layer + * ,-------------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + * |-------------------------------------------------------------------------------| + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | + * |-------------------------------------------------------------------------------| + * | | | | | DEL | | | | | | + * '-------------------------------------------------------------------------------' + */ + LAYOUT_ortho_3x10 + ( KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 + , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + , KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_DEL, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + /* Level 2: Symbols Layer + * ,-------------------------------------------------------------------------------. + * | ! | @ | # | $ | % | ^ | & | * | ( | ) | + * |-------------------------------------------------------------------------------| + * | F11 | F12 | | | | | | | | ` | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | + * '-------------------------------------------------------------------------------' + */ + LAYOUT_ortho_3x10 + ( KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN + , KC_F11, KC_F12,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_GRAVE + , KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + /* Level 3: RGB Layer + * ,-------------------------------------------------------------------------------. + * | | | | | | - | = | [ | ] | \ | + * |-------------------------------------------------------------------------------| + * | Tab | | | | | , | . | / | ; | ' | + * |-------------------------------------------------------------------------------| + * | | | | | | | Left | Down | Up | Right | + * '-------------------------------------------------------------------------------' + */ + LAYOUT_ortho_3x10 + ( KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS + , KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_COMM,KC_DOT, KC_SLSH,KC_SCLN,KC_QUOT + , KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT + ), + /* Level 4: RGB Layer + * ,-------------------------------------------------------------------------------. + * | | | | | | _ | + | { | } | | | + * |-------------------------------------------------------------------------------| + * | Tab | | | | | < | > | ? | : | " | + * |-------------------------------------------------------------------------------| + * | | | | | | | Home | PgDn | PgUp | End | + * '-------------------------------------------------------------------------------' + */ + LAYOUT_ortho_3x10 + ( KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE + , KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_LT, KC_GT, KC_QUES,KC_COLN,KC_DQUO + , KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_HOME,KC_PGUP,KC_PGDN,KC_END + ), + /* Level 5: RGB Layer + * ,-------------------------------------------------------------------------------. + * | Calc | Web | Mail |Explore| | | | | | | + * |-------------------------------------------------------------------------------| + * |RGB_TOG|RGB_MOD|RGB_HUI|RGB_HUD|xxxxxxx|xxxxxxx|RGB_SAI|RGB_SAD|RGB_VAI|RGB_VAD| + * |-------------------------------------------------------------------------------| + * | | | | | Flash | | | | | | + * '-------------------------------------------------------------------------------' + */ + LAYOUT_ortho_3x10 + ( KC_CALC,KC_WSCH,KC_MAIL,KC_MYCM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + , RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,KC_NO, KC_NO, RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD + , KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/40percentclub/tomato/readme.md b/keyboards/40percentclub/tomato/readme.md new file mode 100644 index 000000000..f93105ffd --- /dev/null +++ b/keyboards/40percentclub/tomato/readme.md @@ -0,0 +1,22 @@ +# Tomato + +![Tomato](https://2.bp.blogspot.com/-k6lyvfZz2WA/WXYyr508D7I/AAAAAAACB8A/UCNP2WCfvWAT8UWsCDICMRXwip5tAZsOwCLcBGAs/s640/a.JPG) +=== + +A 30 key keyboard with programmable rgb backlighting. + +* [The fluff](http://www.40percent.club/2017/07/tomato-in-gherkin.html) +* [The meat](https://github.com/di0ib/Misc/tree/master/tomato) + +Keyboard Maintainer: QMK Community +Hardware Supported: Tomato PCB +Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2017/07/tomato-in-gherkin.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/tomato: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). + +First pass at adding support for the tomato keyboard. Completely +untested. Intended to kick-start development. diff --git a/keyboards/40percentclub/tomato/rules.mk b/keyboards/40percentclub/tomato/rules.mk new file mode 100644 index 000000000..cbb2b0519 --- /dev/null +++ b/keyboards/40percentclub/tomato/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +BOOTLOADER = caterina + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes + +LAYOUTS = ortho_3x10 diff --git a/keyboards/40percentclub/tomato/tomato.c b/keyboards/40percentclub/tomato/tomato.c new file mode 100644 index 000000000..dbf8bfe12 --- /dev/null +++ b/keyboards/40percentclub/tomato/tomato.c @@ -0,0 +1 @@ +#include "tomato.h" diff --git a/keyboards/40percentclub/tomato/tomato.h b/keyboards/40percentclub/tomato/tomato.h new file mode 100644 index 000000000..f8674be40 --- /dev/null +++ b/keyboards/40percentclub/tomato/tomato.h @@ -0,0 +1,18 @@ +#ifndef GHERKIN_H +#define GHERKIN_H + +#include "quantum.h" + +#define LAYOUT_ortho_3x10( \ + K00, K01, K02, K03, K04, K05, K10, K11, K12, K13 , \ + K14, K15, K20, K21, K22, K23, K24, K25, K30, K31 , \ + K32, K33, K34, K35, K40, K41, K42, K43, K44, K45 \ +) { \ + { K00, K01, K02, K03, K04, K05 }, \ + { K10, K11, K12, K13, K14, K15 }, \ + { K20, K21, K22, K23, K24, K25 }, \ + { K30, K31, K32, K33, K34, K35 }, \ + { K40, K41, K42, K43, K44, K45 } \ +} + +#endif diff --git a/keyboards/40percentclub/ut47/LED_controls.ino b/keyboards/40percentclub/ut47/LED_controls.ino new file mode 100644 index 000000000..dd50300eb --- /dev/null +++ b/keyboards/40percentclub/ut47/LED_controls.ino @@ -0,0 +1,420 @@ +#include +#include + +int iByte; +byte col = 0; +byte leds[12][4]; +byte pass = 1; +int fadecount = 1; +const int fadelimit = 3000; +const int fadelimitshort = 1000; +byte mode = 4; +byte brightness = 2; +boolean changemode = 0; +int rain = 0; +const int rainlimit = 5000; +const int rainfade = 5000; +byte rx = 0; +byte ry = 0; + +// pin[xx] on led matrix connected to nn on Arduino (-1 is dummy to make array start at pos 1) +int pins[17] = { + -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16, 14, 15, 18, 19, 20, 21 +}; + +// col[xx] of leds = pin yy on led matrix +int cols[12] = { + pins[8], pins[7], pins[6], pins[5], pins[9], pins[10], pins[11], pins[12], pins[13], pins[14], pins[15], pins[16] +}; + +// row[xx] of leds = pin yy on led matrix +int rows[4] = { + pins[1], pins[2], pins[3], pins[4] +}; + + +#define DELAY 0 +extern byte leds[12][4]; + +void setup() { + Serial1.begin(9600); + setupLeds(); + for (int s = 0; s < 5; s++) { + for ( int r = 1; r < 9; r++) { + delayMicroseconds(65000); + delayMicroseconds(65000); + for (int j = 0; j < 4; j++) { + for (int i = 0; i < 12; i++) { + leds[i][j] = 1; + for (int p = 0; p < 25; p++) { + } + leds[i][j] = r; + } + } + } + for ( int r = 9; r > 0; r--) { + delayMicroseconds(65000); + delayMicroseconds(65000); + delayMicroseconds(65000); + for (int j = 0; j < 4; j++) { + for (int i = 0; i < 12; i++) { + leds[i][j] = 1; + for (int p = 0; p < 25; p++) { + } + leds[i][j] = r; + } + } + } + } +} + +void loop() { + + switch (mode) { + case 0: + //Blacklight + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + leds[i][j] = brightness; + } + } + checkserial(); + break; + case 1: + //Breathing + for ( int r = 1; r < 9; r++) { + checkserial(); + if (changemode == 0) { + delayMicroseconds(65000); + delayMicroseconds(65000); + delayMicroseconds(65000); + for (int j = 0; j < 4; j++) { + for (int i = 0; i < 12; i++) { + leds[i][j] = 1; + for (int p = 0; p < 25; p++) { + } + leds[i][j] = r; + } + } + } + else { + break; + } + } + for ( int r = 9; r > 0; r--) { + checkserial(); + if (changemode == 0) { + delayMicroseconds(65000); + delayMicroseconds(65000); + delayMicroseconds(65000); + delayMicroseconds(65000); + for (int j = 0; j < 4; j++) { + for (int i = 0; i < 12; i++) { + leds[i][j] = 1; + for (int p = 0; p < 25; p++) { + } + leds[i][j] = r; + } + } + } + else { + break; + } + } + for ( int r = 1; r < 30; r++) { + checkserial(); + if (changemode == 0) { + delayMicroseconds(65000); + delayMicroseconds(65000); + } + else { + break; + } + } + break; + case 2: + //Random + leds[random(12)][random(4)] = random(8); + delayMicroseconds(10000); + checkserial(); + break; + case 3: + //Rain + rain++; + if (rain > rainlimit) { + rain = 0; + rx = random(12); + ry = random(4); + if (leds[rx][ry] == 0) { + leds[rx][ry] = 18; + } + } + fadecount++; + if (fadecount > rainfade) { + fadecount = 1; + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + if (leds[i][j] > 0) { + leds[i][j] = leds[i][j] - 1; + } + } + } + } + checkserial(); + break; + case 4: + //Reactive + fadecount++; + if (fadecount > fadelimit) { + fadecount = 1; + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + if (leds[i][j] > 0) { + leds[i][j] = leds[i][j] - 1; + } + } + } + } + checkserial(); + break; + case 5: + //Reactive Target + fadecount++; + if (fadecount > fadelimitshort) { + fadecount = 1; + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + if (leds[i][j] > 0) { + leds[i][j] = leds[i][j] - 1; + } + } + } + } + checkserial(); + break; + default: + mode = 0; + break; + } + changemode = 0; +} + +void checkserial() { + if (Serial1.available() > 0) { + iByte = Serial1.read(); + if (iByte == 100) { + brightness++; + if (brightness > 9) { + brightness = 1; + } + } + if (iByte == 101) { + mode++; + } + if (iByte < 100) { + if (mode == 4) { + byte row = iByte / 16; + byte col = iByte % 16; + leds[col][row] = 18; + } + if (mode == 5) { + byte row = iByte / 16; + byte col = iByte % 16; + for (byte i = 0; i < 12; i++) { + leds[i][row] = 18; + } + for (byte p = 0; p < 4; p++) { + leds[col][p] = 18; + } + } + } + } +} + +void setupLeds() { + // sets the pins as output + FastGPIO::Pin<2>::setOutputLow(); + FastGPIO::Pin<3>::setOutputLow(); + FastGPIO::Pin<4>::setOutputLow(); + FastGPIO::Pin<5>::setOutputLow(); + FastGPIO::Pin<6>::setOutputLow(); + FastGPIO::Pin<7>::setOutputLow(); + FastGPIO::Pin<8>::setOutputLow(); + FastGPIO::Pin<9>::setOutputLow(); + FastGPIO::Pin<10>::setOutputLow(); + FastGPIO::Pin<16>::setOutputLow(); + FastGPIO::Pin<14>::setOutputLow(); + FastGPIO::Pin<15>::setOutputLow(); + FastGPIO::Pin<18>::setOutputLow(); + FastGPIO::Pin<19>::setOutputLow(); + FastGPIO::Pin<20>::setOutputLow(); + FastGPIO::Pin<21>::setOutputLow(); + + // set up Cols + FastGPIO::Pin<6>::setOutputValueLow(); + FastGPIO::Pin<7>::setOutputValueLow(); + FastGPIO::Pin<8>::setOutputValueLow(); + FastGPIO::Pin<9>::setOutputValueLow(); + FastGPIO::Pin<10>::setOutputValueLow(); + FastGPIO::Pin<16>::setOutputValueLow(); + FastGPIO::Pin<14>::setOutputValueLow(); + FastGPIO::Pin<15>::setOutputValueLow(); + FastGPIO::Pin<18>::setOutputValueLow(); + FastGPIO::Pin<19>::setOutputValueLow(); + FastGPIO::Pin<20>::setOutputValueLow(); + FastGPIO::Pin<21>::setOutputValueLow(); + + // set up Rows + FastGPIO::Pin<2>::setOutputValueLow(); + FastGPIO::Pin<3>::setOutputValueLow(); + FastGPIO::Pin<4>::setOutputValueLow(); + FastGPIO::Pin<5>::setOutputValueLow(); + + clearLeds(); + Timer1.initialize(25); + Timer1.attachInterrupt(display); + +} + +void clearLeds() { + // Clear display array + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + leds[i][j] = 0; + } + } +} + +void onLeds() { + // Clear display array + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + leds[i][j] = 7; + } + } +} + +// Interrupt routine +void display() { + + switch (col) { // Turn whole previous column off + case 0: + FastGPIO::Pin<6>::setOutputValueLow(); + break; + case 1: + FastGPIO::Pin<7>::setOutputValueLow(); + break; + case 2: + FastGPIO::Pin<8>::setOutputValueLow(); + break; + case 3: + FastGPIO::Pin<9>::setOutputValueLow(); + break; + case 4: + FastGPIO::Pin<10>::setOutputValueLow(); + break; + case 5: + FastGPIO::Pin<16>::setOutputValueLow(); + break; + case 6: + FastGPIO::Pin<14>::setOutputValueLow(); + break; + case 7: + FastGPIO::Pin<15>::setOutputValueLow(); + break; + case 8: + FastGPIO::Pin<18>::setOutputValueLow(); + break; + case 9: + FastGPIO::Pin<19>::setOutputValueLow(); + break; + case 10: + FastGPIO::Pin<20>::setOutputValueLow(); + break; + case 11: + FastGPIO::Pin<21>::setOutputValueLow(); + break; + } + + col++; + if (col == 12) { + col = 0; + pass++; + if (pass > 8) { + pass = 1; + } + } + for (int row = 0; row < 4; row++) { + if (leds[col][row] > pass) { + switch (row) { // Turn on this led + case 0: + FastGPIO::Pin<2>::setOutputValueLow(); + break; + case 1: + FastGPIO::Pin<3>::setOutputValueLow(); + break; + case 2: + FastGPIO::Pin<4>::setOutputValueLow(); + break; + case 3: + FastGPIO::Pin<5>::setOutputValueLow(); + break; + } + } + else { + switch (row) { // Turn off this led + case 0: + FastGPIO::Pin<2>::setOutputValueHigh(); + break; + case 1: + FastGPIO::Pin<3>::setOutputValueHigh(); + break; + case 2: + FastGPIO::Pin<4>::setOutputValueHigh(); + break; + case 3: + FastGPIO::Pin<5>::setOutputValueHigh(); + break; + } + } + } + switch (col) { // Turn column on + case 0: + FastGPIO::Pin<6>::setOutputValueHigh(); + break; + case 1: + FastGPIO::Pin<7>::setOutputValueHigh(); + break; + case 2: + FastGPIO::Pin<8>::setOutputValueHigh(); + break; + case 3: + FastGPIO::Pin<9>::setOutputValueHigh(); + break; + case 4: + FastGPIO::Pin<10>::setOutputValueHigh(); + break; + case 5: + FastGPIO::Pin<16>::setOutputValueHigh(); + break; + case 6: + FastGPIO::Pin<14>::setOutputValueHigh(); + break; + case 7: + FastGPIO::Pin<15>::setOutputValueHigh(); + break; + case 8: + FastGPIO::Pin<18>::setOutputValueHigh(); + break; + case 9: + FastGPIO::Pin<19>::setOutputValueHigh(); + break; + case 10: + FastGPIO::Pin<20>::setOutputValueHigh(); + break; + case 11: + FastGPIO::Pin<21>::setOutputValueHigh(); + break; + } + +} diff --git a/keyboards/40percentclub/ut47/config.h b/keyboards/40percentclub/ut47/config.h new file mode 100644 index 000000000..4335e3edd --- /dev/null +++ b/keyboards/40percentclub/ut47/config.h @@ -0,0 +1,87 @@ +/* +Copyright 2018 Carlos Filoteo + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 40percent.club +#define PRODUCT ut47 +#define DESCRIPTION An awesome 40% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { D1, D0, D4, C6 } +#define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Enable GNAP matrix serial output */ +#define GNAP_ENABLE + +/* USART configuration */ +#ifdef __AVR_ATmega32U4__ +# define SERIAL_UART_BAUD 9600 +# define SERIAL_UART_DATA UDR1 +# define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +# define SERIAL_UART_RXD_VECT USART1_RX_vect +# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +# define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX */ \ + UCSR1B = _BV(TXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + sei(); \ + } while(0) +# else +# error "USART configuration is needed." +#endif + +#endif diff --git a/keyboards/40percentclub/ut47/info.json b/keyboards/40percentclub/ut47/info.json new file mode 100644 index 000000000..59bffe99a --- /dev/null +++ b/keyboards/40percentclub/ut47/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "UT47", + "url": "", + "maintainer": "qmk", + "width": 12.5, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 47, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Backspace", "x":11, "y":0, "w":1.5}, {"label":"LT(3) / Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1, "w":1.25}, {"label":"Shift", "x":0, "y":2, "w":1.5}, {"label":"Z", "x":1.5, "y":2}, {"label":"X", "x":2.5, "y":2}, {"label":"C", "x":3.5, "y":2}, {"label":"V", "x":4.5, "y":2}, {"label":"B", "x":5.5, "y":2}, {"label":"N", "x":6.5, "y":2}, {"label":"M", "x":7.5, "y":2}, {"label":"<", "x":8.5, "y":2}, {"label":">", "x":9.5, "y":2}, {"label":"?", "x":10.5, "y":2}, {"label":"Shift / Enter", "x":11.5, "y":2}, {"label":"Ctrl", "x":0, "y":3}, {"label":"Alt", "x":1, "y":3}, {"label":"GUI", "x":2, "y":3}, {"label":"Menu", "x":3, "y":3}, {"label":"MO(2)", "x":4, "y":3, "w":1.25}, {"x":5.25, "y":3, "w":2}, {"label":"MO(1)", "x":7.25, "y":3, "w":1.25}, {"label":"\u2190", "x":8.5, "y":3}, {"label":"\u2193", "x":9.5, "y":3}, {"label":"\u2191", "x":10.5, "y":3}, {"label":"\u2192", "x":11.5, "y":3}] + } + } +} diff --git a/keyboards/40percentclub/ut47/keymaps/default/config.h b/keyboards/40percentclub/ut47/keymaps/default/config.h new file mode 100644 index 000000000..46098a22f --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/40percentclub/ut47/keymaps/default/keymap.c b/keyboards/40percentclub/ut47/keymaps/default/keymap.c new file mode 100644 index 000000000..6b6bb025b --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/default/keymap.c @@ -0,0 +1,136 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ +#include QMK_KEYBOARD_H +#ifdef LED_ENABLE + #include "protocol/serial.h" +#endif + +#define _______ KC_TRNS +#define LT3_TAB LT(3, KC_TAB) +#define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) + +enum custom_keycodes { + LED_TOG = SAFE_RANGE, + LED_CHG +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * ,-------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P |Bspace | + * |-------------------------------------------------------------------------+ + * |Tab/L3| A | S | D | F | G | H | J | K | L | ; | ' | + * |-------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Sh/En| + * |-------------------------------------------------------------------------+ + * | Ctrl| Alt | Gui | App | L2 | Space | L1 | Left| Down| Up |Right| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_TAB, 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, MT_RSFT_ENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* FN Layer 1 + * ,-------------------------------------------------------------------------. + * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | - | = | [ | ] | \ | + * |-------------------------------------------------------------------------+ + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Right */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | _ | + | { | } | | | + * |-------------------------------------------------------------------------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Left */ + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | Esc | Calc|Webhm| Mail| Comp| | | | | |PrtSc| | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | |LEDtg|LEDch| | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | | | | | | | |MousL|MousD|MousU|MousR| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Tab */ + KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, LED_TOG, LED_CHG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), +}; + +//LED keymap functions + #ifdef LED_ENABLE +void led_chmode(void) { + serial_send(101); +} + +void led_toggle(void) { + serial_send(100); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case LED_TOG: + #ifdef LED_ENABLE + led_toggle(); + #endif + return false; + case LED_CHG: + #ifdef LED_ENABLE + led_chmode(); + #endif + return false; + } + } + return true; +}; +#endif diff --git a/keyboards/40percentclub/ut47/keymaps/default/readme.md b/keyboards/40percentclub/ut47/keymaps/default/readme.md new file mode 100644 index 000000000..e09dc73fa --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/default/readme.md @@ -0,0 +1,19 @@ +# UT47 default keymap + +![UT47 layout image](https://i.imgur.com/Tsz5qsF.png) + +[KLE](http://www.keyboard-layout-editor.com/##@@_y:0%3B&=Esc&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_w:1.5%3B&=Back%20Space&_x:0.25&a:4&f:4&w:4&h:4&d:true%3B&=%3Cb%3EGNAP!%3C%2F%2Fb%3E%3Cp%3E%3Cp%3EMinimum%20stagger%3Cp%3E47%20key%20layout%3B&@_a:7&f:3&w:1.25%3B&=Tab&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F%3B&_w:1.25%3B&=%27%3B&@_w:1.5%3B&=Shift&=Z&=X&=C&=V&=B&=N&=M&=,&=.&=%2F%2F&=Return%3B&@=Ctrl&=Alt&=Super&=Menu&_w:1.25%3B&=%2F&dArr%2F%3B&_w:2%3B&=&_w:1.25%3B&=%2F&uArr%2F%3B&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&uarr%2F%3B&=%2F&rarr%2F%3B%3B&=undefined) + +### LED Controls + +Use TAB+Z to cycle through brightness (8 steps) + +Use TAB+X to cycle through the following LED modes: + +- solid +- breathing +- random +- rain +- reactive +- poptang +- off diff --git a/keyboards/40percentclub/ut47/keymaps/non-us/config.h b/keyboards/40percentclub/ut47/keymaps/non-us/config.h new file mode 100644 index 000000000..46098a22f --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/non-us/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/40percentclub/ut47/keymaps/non-us/keymap.c b/keyboards/40percentclub/ut47/keymaps/non-us/keymap.c new file mode 100644 index 000000000..1cb537b7d --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/non-us/keymap.c @@ -0,0 +1,136 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ +#include QMK_KEYBOARD_H +#ifdef LED_ENABLE + #include "protocol/serial.h" +#endif + +#define _______ KC_TRNS +#define LT3_TAB LT(3, KC_TAB) +#define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) + +enum custom_keycodes { + LED_TOG = SAFE_RANGE, + LED_CHG +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * ,-------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P |Bspace | + * |-------------------------------------------------------------------------+ + * |Tab/L3| A | S | D | F | G | H | J | K | L | ; | ' | + * |-------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Sh/En| + * |-------------------------------------------------------------------------+ + * | Ctrl| Alt | Gui | App | L2 | Space | L1 | Left| Down| Up |Right| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_TAB, 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, MT_RSFT_ENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* FN Layer 1 + * ,-------------------------------------------------------------------------. + * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | # | - | = | [ | ] | \ | + * |-------------------------------------------------------------------------+ + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Right */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE, + _______, _______, _______, _______, _______, _______, KC_NUHS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NUBS, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | _ | + | { | } | | | + * |-------------------------------------------------------------------------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Left */ + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | Esc | Calc|Webhm| Mail| Comp| | | | | |PrtSc| | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | |LEDtg|LEDch| | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | | | | | | | |MousL|MousD|MousU|MousR| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Tab */ + KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, LED_TOG, LED_CHG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), +}; + +//LED keymap functions + #ifdef LED_ENABLE +void led_chmode(void) { + serial_send(101); +} + +void led_toggle(void) { + serial_send(100); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case LED_TOG: + #ifdef LED_ENABLE + led_toggle(); + #endif + return false; + case LED_CHG: + #ifdef LED_ENABLE + led_chmode(); + #endif + return false; + } + } + return true; +}; +#endif diff --git a/keyboards/40percentclub/ut47/keymaps/non-us/readme.md b/keyboards/40percentclub/ut47/keymaps/non-us/readme.md new file mode 100644 index 000000000..e09dc73fa --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/non-us/readme.md @@ -0,0 +1,19 @@ +# UT47 default keymap + +![UT47 layout image](https://i.imgur.com/Tsz5qsF.png) + +[KLE](http://www.keyboard-layout-editor.com/##@@_y:0%3B&=Esc&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_w:1.5%3B&=Back%20Space&_x:0.25&a:4&f:4&w:4&h:4&d:true%3B&=%3Cb%3EGNAP!%3C%2F%2Fb%3E%3Cp%3E%3Cp%3EMinimum%20stagger%3Cp%3E47%20key%20layout%3B&@_a:7&f:3&w:1.25%3B&=Tab&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F%3B&_w:1.25%3B&=%27%3B&@_w:1.5%3B&=Shift&=Z&=X&=C&=V&=B&=N&=M&=,&=.&=%2F%2F&=Return%3B&@=Ctrl&=Alt&=Super&=Menu&_w:1.25%3B&=%2F&dArr%2F%3B&_w:2%3B&=&_w:1.25%3B&=%2F&uArr%2F%3B&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&uarr%2F%3B&=%2F&rarr%2F%3B%3B&=undefined) + +### LED Controls + +Use TAB+Z to cycle through brightness (8 steps) + +Use TAB+X to cycle through the following LED modes: + +- solid +- breathing +- random +- rain +- reactive +- poptang +- off diff --git a/keyboards/40percentclub/ut47/keymaps/nordic/config.h b/keyboards/40percentclub/ut47/keymaps/nordic/config.h new file mode 100644 index 000000000..fcdd2c232 --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/nordic/config.h @@ -0,0 +1,17 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ + +#pragma once diff --git a/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c b/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c new file mode 100644 index 000000000..cc3f43650 --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c @@ -0,0 +1,179 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ +#include QMK_KEYBOARD_H +#ifdef LED_ENABLE + #include "protocol/serial.h" + +#endif + +#include "keymap_norwegian.h" + +#define _______ KC_TRNS +#define LT3_TAB LT(3, KC_TAB) +#define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) +#define CTRADEL LALT(LCTL(KC_DEL)) +#define ALTTAB LALT(KC_TAB) + +enum custom_keycodes { + LED_TOG = SAFE_RANGE, + LED_CHG +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer - L0 + * ,-------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P |Bspace | + * |-------------------------------------------------------------------------+ + * |Tab/L3| A | S | D | F | G | H | J | K | L | ' |Ent/RS| + * |-------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | Up | L4 | + * |-------------------------------------------------------------------------+ + * | Ctrl| Gui | L4 | Alt | L2 | Space | L1 | Ctrl| Left| Down|Right| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Base - L0 */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_APOS, MT_RSFT_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MO(4), + KC_LCTL, KC_LGUI, MO(4), KC_LALT, MO(2), KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +), + + /* FN Layer 1 + * ,-------------------------------------------------------------------------. + * | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | | + | = | * | / | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | - | _ | PgUp| | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | | Home| PgDn| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Right modifier - L1 */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, _______, NO_PLUS, NO_EQL, NO_ASTR, NO_SLSH, + _______, _______, _______, _______, _______, _______, _______, _______, NO_MINS, NO_UNDS, KC_PGUP, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | § | ! | " | # | ¤ | % | & | / | = | + | \ | Delete| + * |-------------------------------------------------------------------------+ + * | | | ? | { | [ | ( | ) | ] | } | F10 | F11 | F12 | + * |-------------------------------------------------------------------------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | PgUp| | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | | Home| PgDn| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Left modifier - L2 */ + NO_SECT, KC_EXCLAIM, NO_QUO2, KC_HASH, NO_BULT, KC_PERCENT, NO_AMPR, NO_SLSH, NO_EQL, NO_PLUS, NO_BSLS, KC_DELETE, + _______, _______, NO_QUES, NO_LCBR, NO_LBRC, NO_LPRN, NO_RPRN, NO_RBRC, NO_RCBR, KC_F10, KC_F11, KC_F12, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_PGUP, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END +), + + /* FN Layer 3 + * ,-------------------------------------------------------------------------. + * | Esc | Calc|Webhm| Comp|Webrf| | | | | |PrtSc|CtrAlDl| + * |-------------------------------------------------------------------------+ + * | | | | | | | |VolDn|VolUp| | | | + * |-------------------------------------------------------------------------+ + * | |LEDtg|LEDch| | |RESET| | Mute| |MouB1|MousU|MouB2| + * |-------------------------------------------------------------------------+ + * | | | | | | | | |MousL|MousD|MousR| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Hold Tab down - L3 */ + KC_ESC, KC_CALC, KC_WHOM, KC_MYCM, KC_WREF, _______, _______, _______, _______, _______, KC_PSCR, CTRADEL, + _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, LED_TOG, LED_CHG, _______, _______, RESET, _______, KC_MUTE, _______, KC_MS_BTN1, KC_MS_U, KC_MS_BTN2, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R +), + + /* FN Layer 4 + * ,-------------------------------------------------------------------------. + * | | | @ | £ | $ | ~ | | ¨ | ´ | ` | Å | | + * |-------------------------------------------------------------------------+ + * | | | | € | | | | | ^ | Ø | Æ | | + * |-------------------------------------------------------------------------+ + * | | < | | | | | | µ | | | | | + * |-------------------------------------------------------------------------+ + * | | | | | | | | L5 | | | | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Norsk - L4 */ + _______, _______, NO_AT, NO_PND, NO_DLR, NO_TILD, _______, NO_QUOT, NO_ACUT, NO_GRV, NO_AA, _______, + _______, _______, _______, NO_EURO, _______, _______, _______, _______, NO_CIRC, NO_OSLH, NO_AE, _______, + _______, NO_LESS, _______, _______, _______, _______, _______, NO_MU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, TO(5), _______, _______, _______ +), + + /* GAMING Layer (toggle on and off) + * ,-------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | F1 | F2 | F3 | F4 |Alt+Tab| + * |-------------------------------------------------------------------------+ + * | Tab | A | S | D | F | G | H | F5 | F6 | F7 | F8 | Enter| + * |-------------------------------------------------------------------------+ + * | Shift | 1 | 2 | 3 | 4 | 5 | 6 | F9 | F10 | F11 | Up |TOGGL| + * |-------------------------------------------------------------------------+ + * | Ctrl| Z | X | C | B | Space | M | V |Left |Down |Right| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* GAMING, toggled on and off - L5 */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_F1, KC_F2, KC_F3, KC_F4, ALTTAB, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_F5, KC_F6, KC_F7, KC_F8, KC_ENT, + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_UP, TO(0), + KC_LCTL, KC_Z, KC_X, KC_C, KC_B, KC_SPC, KC_M, KC_V, KC_LEFT, KC_DOWN, KC_RGHT +), +}; + +//LED keymap functions + #ifdef LED_ENABLE +void led_chmode(void) { + serial_send(101); +} + +void led_toggle(void) { + serial_send(100); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case LED_TOG: + #ifdef LED_ENABLE + led_toggle(); + #endif + return false; + case LED_CHG: + #ifdef LED_ENABLE + led_chmode(); + #endif + return false; + } + } + return true; +}; +#endif diff --git a/keyboards/40percentclub/ut47/keymaps/nordic/readme.md b/keyboards/40percentclub/ut47/keymaps/nordic/readme.md new file mode 100644 index 000000000..4b0d0eb12 --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/nordic/readme.md @@ -0,0 +1,33 @@ +# UT47 Nordic keymap + + +![UT47 Nordic layout image](https://i.imgur.com/ZNtF4wA.png) + +[KLE - Nordic layout](http://www.keyboard-layout-editor.com/##@_name=UT47%20-%20Nordic%20layout&author=neonSpork%3B&@_a:7%3B&=Esc&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_w:1.5%3B&=Backspace%3B&@_c=%23c75656&a:4&w:1.25%3B&=%0A%0A%0AL3%0A%0A%0A%0A%0A%0ATab&_c=%23cccccc&a:7%3B&=A&=S&=D&=F&=G&=H&=J&=K&=L&='&_a:4&w:1.25%3B&=Enter%0A%0A%0ARShift%3B&@_a:7&w:1.5%3B&=LShift&=Z&=X&=C&=V&=B&=N&=M&=,&=.&=%2F&uarr%2F%3B&_c=%23bb45c4%3B&=L4%3B&@_c=%23cccccc%3B&=LCtrl&=LGUI&_c=%23bb45c4%3B&=L4&_c=%23cccccc%3B&=LAlt&_c=%2333aaff&w:1.25%3B&=L2&_c=%23cccccc&w:2%3B&=Space&_c=%23f5b047&w:1.25%3B&=L1&_c=%23cccccc%3B&=RCtrl&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&rarr%2F%3B%3B&@_y:0.25&c=%23f5b047%3B&=%7C&=1&=2&=3&=4&=5&=6&=7&=8&=9&=0&_w:1.5%3B&=Delete%3B&@_w:1.25%3B&=&=&=&=&=&=&=&=&=+&=%2F=&=*&_w:1.25%3B&=%2F%2F%3B&@_w:1.5%3B&=&=&=&=&=&=&=&=&=-&=%2F_&=PgUp&=%3B&@=&=&=&=Caps&_w:1.25%3B&=&_w:2%3B&=&_w:1.25%3B&=&=&=Home&=PgDn&=End%3B&@_y:0.25&c=%2333aaff%3B&=%C2%A7&=!&=%22&=%23&=%C2%A4&=%25&=%2F&&=%2F%2F&=%2F=&=+&=%5C&_w:1.5%3B&=Delete%3B&@_w:1.25%3B&=&=&=%3F&=%7B&=%5B&=(&=)&=%5D&=%7D&=F10&=F11&_w:1.25%3B&=F12%3B&@_w:1.5%3B&=&=F1&=F2&=F3&=F4&=F5&=F6&=F7&=F8&=F9&=PgUp&=%3B&@=&=&=&=Caps&_w:1.25%3B&=&_w:2%3B&=&_w:1.25%3B&=&=&=Home&=PgDn&=End%3B&@_y:0.25&c=%23c75656%3B&=Esc&=Calc&_a:5%3B&=www%0A%0A%0A%0A%0A%0Ahome&=My%0A%0A%0A%0A%0A%0AComp&=www%0A%0A%0A%0A%0A%0ARefresh&_a:7%3B&=&=&=&=&=&=PrtScr&_w:1.5%3B&=Ctr%20Alt%20Del%3B&@_w:1.25%3B&=&=&=&=&=&=&=&=VolDn&=VolUp&=&=&_w:1.25%3B&=%3B&@_w:1.5%3B&=&=LEDtg&=LEDch&=&=&=RESET&=&=Mute&=&_a:5%3B&=Mouse%0AClick%0A%0A%0A%0A%0ALeft&=Mouse%0A%0A%0A%0A%0A%0AUp&=Mouse%0AClick%0A%0A%0A%0A%0ARight%3B&@_a:7%3B&=&=&=&=&_w:1.25%3B&=&_w:2%3B&=&_w:1.25%3B&=&=&_a:5%3B&=Mouse%0A%0A%0A%0A%0A%0ALeft&=Mouse%0A%0A%0A%0A%0A%0ADown&=Mouse%0A%0A%0A%0A%0A%0ARight%3B&@_y:0.25&c=%23bb45c4&a:7%3B&=&=&=%2F@&=%C2%A3&=$&=~&=&=%C2%A8&=%C2%B4&=%60&=%C3%85&_w:1.5%3B&=%3B&@_w:1.25%3B&=&=&=&=%E2%82%AC&=&=&=&=&=%5E&=%C3%98&=%C3%86&_w:1.25%3B&=%3B&@_w:1.5%3B&=&=%3C&=&=&=&=&=&=%C2%B5&=&=&=&=%3B&@=&=&=&=&_w:1.25%3B&=&_w:2%3B&=&_w:1.25%3B&=&_c=%2345b564&a:5%3B&=L5%0A%0A%0A%0A%0A%0AON&_c=%23bb45c4&a:7%3B&=&=&=%3B&@_y:0.25&c=%2345b564%3B&=Esc&=Q&=W&=E&=R&=T&=Y&=F1&=F2&=F3&=F4&_w:1.5%3B&=Alt%20Tab%3B&@_w:1.25%3B&=Tab&=A&=S&=D&=F&=G&=H&=F5&=F6&=F7&=F8&_w:1.25%3B&=Enter%3B&@_w:1.5%3B&=Shift&=1&=2&=3&=4&=5&=6&=F9&=F10&=F11&=%2F&uarr%2F%3B&_c=%23cccccc&a:5%3B&=L5%0A%0A%0A%0A%0A%0AOFF%3B&@_c=%2345b564&a:7%3B&=LCtrl&=Z&=X&=C&_w:1.25%3B&=B&_w:2%3B&=Space&_w:1.25%3B&=M&=V&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&rarr%2F) + + +Chose to modify the layout to include dedicated arrows on the bottom right. Layers 1-4 are modifiers, layer 5 is a toggle on gaming mode. Tab is dual function: Tap for Tab and hold for L3. So is enter: tap for Enter and hold for Right shift. + +### Nordic characters +On its own modifier layer, accessed from left (between left GUI and ALT) or right (above Right arrow) + +### Gaming layer +Toggled on/off, accessed via the Nordic layer. + +Toggle on: L4+RCtrl + +Toggle off: L4 (above ) + +### LED Controls + +Use TAB+Z to cycle through brightness (8 steps) + +Use TAB+X to cycle through the following LED modes: + +- solid +- breathing +- random +- rain +- reactive +- poptang +- off diff --git a/keyboards/40percentclub/ut47/keymaps/rgb/config.h b/keyboards/40percentclub/ut47/keymaps/rgb/config.h new file mode 100644 index 000000000..0eb010a3a --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/rgb/config.h @@ -0,0 +1,27 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here +#define RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN D3 // The pin the LED strip is connected to +#define RGBLED_NUM 7 // Number of LEDs in your strip + +#endif diff --git a/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c b/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c new file mode 100644 index 000000000..58d11031a --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c @@ -0,0 +1,88 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ +#include QMK_KEYBOARD_H +#ifdef LED_ENABLE + #include "protocol/serial.h" +#endif + +#define _______ KC_TRNS +#define LT3_TAB LT(3, KC_TAB) +#define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) + +enum custom_keycodes { + LED_TOG = SAFE_RANGE, + LED_CHG +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_TAB, 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, MT_RSFT_ENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +LAYOUT( + KC_FN6, KC_FN7, KC_FN8, KC_FN9, KC_FN10, KC_FN11, KC_FN12, KC_FN13, KC_FN14, KC_FN15, KC_FN16, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_FN17, KC_FN18, KC_FN19, KC_FN20, KC_FN21, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +LAYOUT( /* Tab */ + KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), +}; + +//LED keymap functions + #ifdef LED_ENABLE +void led_chmode(void) { + serial_send(101); +} + +void led_toggle(void) { + serial_send(100); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case LED_TOG: + #ifdef LED_ENABLE + led_toggle(); + #endif + return false; + case LED_CHG: + #ifdef LED_ENABLE + led_chmode(); + #endif + return false; + } + } + return true; +}; +#endif diff --git a/keyboards/40percentclub/ut47/keymaps/rgb/readme.md b/keyboards/40percentclub/ut47/keymaps/rgb/readme.md new file mode 100644 index 000000000..00076bfc4 --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/rgb/readme.md @@ -0,0 +1 @@ +WS2812B LED added and connected to pin D3 as described here: https://www.40percent.club/2018/04/gnap-underglow.html diff --git a/keyboards/40percentclub/ut47/keymaps/rgb/rules.mk b/keyboards/40percentclub/ut47/keymaps/rgb/rules.mk new file mode 100644 index 000000000..1e3cebb14 --- /dev/null +++ b/keyboards/40percentclub/ut47/keymaps/rgb/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/40percentclub/ut47/led.c b/keyboards/40percentclub/ut47/led.c new file mode 100644 index 000000000..9458c038f --- /dev/null +++ b/keyboards/40percentclub/ut47/led.c @@ -0,0 +1,38 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#include +#include "stdint.h" +#include "led.h" + + +void led_set(uint8_t usb_led) +{ + if (usb_led & (1<. +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#ifdef LED_ENABLE + #include "protocol/serial.h" +#endif + + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif +static uint8_t debouncing = DEBOUNCE; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + // initialize row and col + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + +#ifdef LED_ENABLE + serial_init(); +#endif +} + +uint8_t matrix_scan(void) +{ + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i] != cols) { + matrix_debouncing[i] = cols; + if (debouncing) { + debug("bounce!: "); debug_hex(debouncing); debug("\n"); + } + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + return 1; +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<The reason this is an "opt-in" feature is to prevent sending serial communication over the pin, in case it ends up being used for something else (like RGB underglow). + +### Layout + +Go to the [default layout README](keymaps/default/readme.md) for more information. + +### Additional info + +Credit: Forked from [di0ib TMK version](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gnap) + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +### Build Guide + +[u/network_operations' build guide thread](https://www.reddit.com/r/MechanicalKeyboards/comments/7wqktu/gnap_the_cheap_40/) diff --git a/keyboards/40percentclub/ut47/rules.mk b/keyboards/40percentclub/ut47/rules.mk new file mode 100644 index 000000000..b04659866 --- /dev/null +++ b/keyboards/40percentclub/ut47/rules.mk @@ -0,0 +1,70 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader +BOOTLOADER = caterina + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC += matrix.c protocol/serial_uart.c + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +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 + +ifeq ($(strip $(LED_ENABLE)), yes) + OPT_DEFS += -DLED_ENABLE + SRC += led.c +endif diff --git a/keyboards/40percentclub/ut47/ut47.c b/keyboards/40percentclub/ut47/ut47.c new file mode 100644 index 000000000..f467fd130 --- /dev/null +++ b/keyboards/40percentclub/ut47/ut47.c @@ -0,0 +1,50 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ +#include "ut47.h" +#ifdef LED_ENABLE + #include "protocol/serial.h" +#endif + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + if (record->event.pressed) { + #ifdef LED_ENABLE + serial_send((record->event.key.row*16)+record->event.key.col); + #endif + } + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/40percentclub/ut47/ut47.h b/keyboards/40percentclub/ut47/ut47.h new file mode 100644 index 000000000..a4507dd34 --- /dev/null +++ b/keyboards/40percentclub/ut47/ut47.h @@ -0,0 +1,49 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ +#ifndef UT47_H +#define UT47_H + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ + K30, K31, K32, K33, K34, K35, K37, K38, K39, K3a, K3b \ +) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b }, \ + { K30, K31, K32, K33, K34, K35, K35, K37, K38, K39, K3a, K3b } \ + } + +#define LAYOUT_kc( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ + K30, K31, K32, K33, K34, K35, K37, K38, K39, K3a, K3b \ +) \ + LAYOUT( \ + KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0a, KC_##K0b, \ + KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1a, KC_##K1b, \ + KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2a, KC_##K2b, \ + KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K37, KC_##K38, KC_##K39, KC_##K3a, KC_##K3b \ + ) + +#define LAYOUT_kc_ut47 LAYOUT_kc + +#endif -- cgit v1.2.3 From 746005acba3a3522eaa2bf1c8014644e1a60c5df Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 12 Nov 2018 20:00:45 +0000 Subject: Keyboard: Initial 25 port (#4394) * Initial 25 port * Initial 25 port - fix info.json and hand_swap_config * Review comments - fix layout macros, copyright comments, and duplicated use of layering macros --- keyboards/40percentclub/25/25.c | 60 ++++++ keyboards/40percentclub/25/25.h | 85 ++++++++ keyboards/40percentclub/25/config.h | 230 +++++++++++++++++++++ keyboards/40percentclub/25/info.json | 29 +++ .../40percentclub/25/keymaps/default/config.h | 19 ++ .../40percentclub/25/keymaps/default/keymap.c | 87 ++++++++ .../40percentclub/25/keymaps/default/readme.md | 1 + keyboards/40percentclub/25/keymaps/macro/config.h | 19 ++ keyboards/40percentclub/25/keymaps/macro/keymap.c | 42 ++++ keyboards/40percentclub/25/keymaps/macro/readme.md | 1 + keyboards/40percentclub/25/readme.md | 18 ++ keyboards/40percentclub/25/rules.mk | 85 ++++++++ 12 files changed, 676 insertions(+) create mode 100644 keyboards/40percentclub/25/25.c create mode 100644 keyboards/40percentclub/25/25.h create mode 100644 keyboards/40percentclub/25/config.h create mode 100644 keyboards/40percentclub/25/info.json create mode 100644 keyboards/40percentclub/25/keymaps/default/config.h create mode 100644 keyboards/40percentclub/25/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/25/keymaps/default/readme.md create mode 100644 keyboards/40percentclub/25/keymaps/macro/config.h create mode 100644 keyboards/40percentclub/25/keymaps/macro/keymap.c create mode 100644 keyboards/40percentclub/25/keymaps/macro/readme.md create mode 100644 keyboards/40percentclub/25/readme.md create mode 100644 keyboards/40percentclub/25/rules.mk (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/25/25.c b/keyboards/40percentclub/25/25.c new file mode 100644 index 000000000..54a42d263 --- /dev/null +++ b/keyboards/40percentclub/25/25.c @@ -0,0 +1,60 @@ +/* Copyright 2018 + * + * 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 . + */ +#include "25.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, + {{4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, + {{4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}}, + {{4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}}, + {{4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}}, + + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}}, + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}}, +}; +#endif diff --git a/keyboards/40percentclub/25/25.h b/keyboards/40percentclub/25/25.h new file mode 100644 index 000000000..db9c48b52 --- /dev/null +++ b/keyboards/40percentclub/25/25.h @@ -0,0 +1,85 @@ +/* Copyright 2018 + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ___ KC_NO + +#ifndef FLIP_HALF +#define LAYOUT_ortho_5x10( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, \ + L40, L41, L42, L43, L44, R40, R41, R42, R43, R44 \ +) { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34 }, \ + { L40, L41, L42, L43, L44 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R34, R33, R32, R31, R30 }, \ + { R44, R43, R42, R41, R40 } \ +} +#else +#define LAYOUT_ortho_5x10( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, \ + L40, L41, L42, L43, L44, R40, R41, R42, R43, R44 \ +) { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34 }, \ + { L40, L41, L42, L43, L44 }, \ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 }, \ + { R30, R31, R32, R33, R34 }, \ + { R40, R41, R42, R43, R44 } \ +} +#endif + +#define LAYOUT_ortho_5x5( \ + L00, L01, L02, L03, L04, \ + L10, L11, L12, L13, L14, \ + L20, L21, L22, L23, L24, \ + L30, L31, L32, L33, L34, \ + L40, L41, L42, L43, L44 \ +) { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34 }, \ + { L40, L41, L42, L43, L44 }, \ + { ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___ } \ +} + +#define LAYOUT_macro LAYOUT_ortho_5x5 +#define LAYOUT_split LAYOUT_ortho_5x10 + +#ifdef USE_I2C + #error "I2C not Supported" +#endif diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h new file mode 100644 index 000000000..23b768e15 --- /dev/null +++ b/keyboards/40percentclub/25/config.h @@ -0,0 +1,230 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x0F25 +#define MANUFACTURER di0ib +#define PRODUCT The 5x5 Keyboard +#define DESCRIPTION A split 50 key keyboard + +#define USE_SERIAL + +/* Select hand configuration */ +#define MASTER_LEFT +//#define MASTER_RIGHT +//#define EE_HANDS + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 5*2 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ diff --git a/keyboards/40percentclub/25/info.json b/keyboards/40percentclub/25/info.json new file mode 100644 index 000000000..abb77a067 --- /dev/null +++ b/keyboards/40percentclub/25/info.json @@ -0,0 +1,29 @@ +{ + "keyboard_name": "foobar", + "url": "", + "maintainer": "qmk", + "width": 6, + "height": 2, + "layouts": { + "LAYOUT_macro": { + "key_count": 15, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, + {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4} + ] + }, + "LAYOUT_split": { + "key_count": 30, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, + {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4} + ] + } + } +} diff --git a/keyboards/40percentclub/25/keymaps/default/config.h b/keyboards/40percentclub/25/keymaps/default/config.h new file mode 100644 index 000000000..6173b6327 --- /dev/null +++ b/keyboards/40percentclub/25/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/25/keymaps/default/keymap.c b/keyboards/40percentclub/25/keymaps/default/keymap.c new file mode 100644 index 000000000..ccb54c82a --- /dev/null +++ b/keyboards/40percentclub/25/keymaps/default/keymap.c @@ -0,0 +1,87 @@ +/* Copyright 2018 + * + * 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 . + */ +#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. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _LOWER 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty + * ,---------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------+------+------+------+------+------| + * | Q | W | E | R | T | Y | U | I | O | P | + * |------+------+------+------+-------------+------+------+------+------| + * | A | S | D | F | G | H | J | K | L | Bksp | + * |------+------+------+------+------|------+------+------+------+------| + * | Z | X | C | V | B | N | M | , | . |Enter | + * |------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |Lower |Space | Shift| Left | Down | Up |Right | + * `---------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_split( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_BSPC, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_LSFT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,---------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | ` | / | _ | + | + * |------+------+------+------+------|------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 | ~ | [ | ] | \ | + * |------+------+------+------+-------------+------+------+------+------| + * | Esc | | | | | | | ; | " | Del | + * |------+------+------+------+------|------+------+------+------+------| + * | Tab | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Home | PgDn | PgUp | End | + * `---------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_split( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_GRV, KC_SLSH, KC_UNDS, KC_PLUS, \ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TILD, KC_LBRC, KC_RBRC, KC_PIPE, \ + KC_ESC, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, KC_DEL, \ + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/25/keymaps/default/readme.md b/keyboards/40percentclub/25/keymaps/default/readme.md new file mode 100644 index 000000000..7558c42ec --- /dev/null +++ b/keyboards/40percentclub/25/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default split keymap for 25 diff --git a/keyboards/40percentclub/25/keymaps/macro/config.h b/keyboards/40percentclub/25/keymaps/macro/config.h new file mode 100644 index 000000000..6173b6327 --- /dev/null +++ b/keyboards/40percentclub/25/keymaps/macro/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/25/keymaps/macro/keymap.c b/keyboards/40percentclub/25/keymaps/macro/keymap.c new file mode 100644 index 000000000..80d227710 --- /dev/null +++ b/keyboards/40percentclub/25/keymaps/macro/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2018 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_macro( + KC_ESC, KC_1, KC_2, KC_3, KC_4, \ + KC_GRV, KC_Q, KC_W, KC_E, KC_R, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/25/keymaps/macro/readme.md b/keyboards/40percentclub/25/keymaps/macro/readme.md new file mode 100644 index 000000000..6645f93dd --- /dev/null +++ b/keyboards/40percentclub/25/keymaps/macro/readme.md @@ -0,0 +1 @@ +# The default macro keymap for 25 diff --git a/keyboards/40percentclub/25/readme.md b/keyboards/40percentclub/25/readme.md new file mode 100644 index 000000000..b1685b618 --- /dev/null +++ b/keyboards/40percentclub/25/readme.md @@ -0,0 +1,18 @@ +# 25 + +![25](https://2.bp.blogspot.com/-lBK_ZlB3a9Q/WcAM0B_vwdI/AAAAAAACDgs/qnI9YB53pzck4Bw0v5QRvypDMs80CxWVQCLcBGAs/s640/IMG_0695.JPG) +=== + +Split 50 key keyboard - it is the largest keybad that fits within the 100mm x 100mm PCB size. Can be used together as a split keyboard or as a single 25 key macropad. + +* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/25) + +Keyboard Maintainer: QMK Community +Hardware Supported: 25 PCB +Hardware Availability: [25 project on 40% Keyboards](http://www.40percent.club/2017/09/25.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/25: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/40percentclub/25/rules.mk b/keyboards/40percentclub/25/rules.mk new file mode 100644 index 000000000..bfcdce7c9 --- /dev/null +++ b/keyboards/40percentclub/25/rules.mk @@ -0,0 +1,85 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +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) + +# Enable generic behavior for split boards +SPLIT_KEYBOARD = yes + +LAYOUTS = ortho_5x5 ortho_5x10 -- cgit v1.2.3 From b173c05cc25e9394c6e50081c1af707443950104 Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 12 Nov 2018 20:02:28 +0000 Subject: Tidy 40percentclub boards (#4403) * Remove unnecessary re-definitions for XXXXXXX and _______ * Update 6lit to use KC_NO in layout macros * Update rules.mk to follow current template * Remove use of deprecated function action_get_macro - unused and contents were from old template * Remove use of deprecated function action_get_macro - all code was commented out * Remove use of deprecated function action_get_macro - convert macro to use process_record_user * Convert keymap to consistent use of _______ * fix use of old style header guards * Swap KC_NO for XXXXXXX macro since the swap to the macro for KC_TRANS * Resolve use of ?= in rules.mk files * Remove duplication of rules.mk and config.h in gherkin mjt keymap * Remove unnecessary #includes * Align layout macros so foobar can use gherkin keymaps * Align 6lit layout macros with foobar * Remove ifndef QUANTUM_DIR from keymaps --- keyboards/40percentclub/4x4/4x4.h | 6 +- .../40percentclub/4x4/keymaps/default/keymap.c | 22 +-- keyboards/40percentclub/4x4/rules.mk | 32 ++-- keyboards/40percentclub/5x5/5x5.h | 6 +- .../40percentclub/5x5/keymaps/default/keymap.c | 24 +-- keyboards/40percentclub/5x5/rules.mk | 33 ++-- keyboards/40percentclub/6lit/6lit.h | 13 +- keyboards/40percentclub/foobar/foobar.h | 9 +- .../40percentclub/foobar/keymaps/default/keymap.c | 1 - keyboards/40percentclub/foobar/rules.mk | 2 + keyboards/40percentclub/gherkin/config.h | 5 +- keyboards/40percentclub/gherkin/gherkin.h | 5 +- .../gherkin/keymaps/bbaserdem/config.h | 6 +- .../gherkin/keymaps/bbaserdem/rules.mk | 4 - .../40percentclub/gherkin/keymaps/default/keymap.c | 11 -- .../gherkin/keymaps/itsaferbie/config.h | 7 +- .../gherkin/keymaps/itsaferbie/keymap.c | 31 ++-- .../gherkin/keymaps/itsaferbie/rules.mk | 4 - .../40percentclub/gherkin/keymaps/mjt/config.h | 168 +-------------------- .../40percentclub/gherkin/keymaps/mjt/keymap.c | 29 ---- .../40percentclub/gherkin/keymaps/mjt/rules.mk | 31 +--- .../40percentclub/gherkin/keymaps/steno/config.h | 7 +- .../40percentclub/gherkin/keymaps/steno/rules.mk | 8 +- .../gherkin/keymaps/talljoe-gherkin/config.h | 7 +- .../gherkin/keymaps/talljoe-gherkin/keymap.c | 2 - .../gherkin/keymaps/talljoe-gherkin/rules.mk | 4 - keyboards/40percentclub/gherkin/rules.mk | 39 +++-- keyboards/40percentclub/luddite/rules.mk | 39 +++-- keyboards/40percentclub/mf68/config.h | 5 +- .../40percentclub/mf68/keymaps/default/keymap.c | 15 -- .../40percentclub/mf68/keymaps/factory/keymap.c | 15 -- keyboards/40percentclub/mf68/mf68.h | 5 +- keyboards/40percentclub/mf68/rules.mk | 54 ++++--- keyboards/40percentclub/mf68_ble/config.h | 5 +- .../mf68_ble/keymaps/default/keymap.c | 15 -- keyboards/40percentclub/mf68_ble/mf68_ble.h | 5 +- keyboards/40percentclub/mf68_ble/rules.mk | 54 ++++--- keyboards/40percentclub/nano/config.h | 5 +- .../40percentclub/nano/keymaps/default/keymap.c | 1 - .../40percentclub/nano/keymaps/spooka/keymap.c | 2 - keyboards/40percentclub/nano/nano.h | 5 +- keyboards/40percentclub/nano/rules.mk | 34 +++-- keyboards/40percentclub/tomato/config.h | 5 +- .../40percentclub/tomato/keymaps/default/keymap.c | 39 ++--- keyboards/40percentclub/tomato/rules.mk | 32 +++- keyboards/40percentclub/tomato/tomato.h | 5 +- keyboards/40percentclub/ut47/config.h | 5 +- .../40percentclub/ut47/keymaps/default/config.h | 5 +- .../40percentclub/ut47/keymaps/default/keymap.c | 1 - .../40percentclub/ut47/keymaps/non-us/config.h | 5 +- .../40percentclub/ut47/keymaps/non-us/keymap.c | 1 - .../40percentclub/ut47/keymaps/nordic/keymap.c | 1 - keyboards/40percentclub/ut47/keymaps/rgb/config.h | 5 +- keyboards/40percentclub/ut47/keymaps/rgb/keymap.c | 1 - keyboards/40percentclub/ut47/rules.mk | 31 +++- keyboards/40percentclub/ut47/ut47.h | 5 +- 56 files changed, 299 insertions(+), 617 deletions(-) (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/4x4/4x4.h b/keyboards/40percentclub/4x4/4x4.h index ec75c3e28..8cc5a150a 100644 --- a/keyboards/40percentclub/4x4/4x4.h +++ b/keyboards/40percentclub/4x4/4x4.h @@ -1,6 +1,4 @@ - -#ifndef FOURX4_H -#define FOURX4_H +#pragma once #include "quantum.h" #define ___ KC_NO @@ -58,5 +56,3 @@ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, K2f }, \ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e, K3f } \ } - -#endif diff --git a/keyboards/40percentclub/4x4/keymaps/default/keymap.c b/keyboards/40percentclub/4x4/keymaps/default/keymap.c index 144ec05c1..1f52b2066 100644 --- a/keyboards/40percentclub/4x4/keymaps/default/keymap.c +++ b/keyboards/40percentclub/4x4/keymaps/default/keymap.c @@ -6,9 +6,6 @@ #define NUM 2 #define DIR 3 -// Readability keycodes -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Single 4x4 board only @@ -65,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [NUM] = LAYOUT_ortho_4x16( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_PPLS, _______, - _______, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC), _______, _______, _______, KC_PENT, _______, + _______, KC_F11, KC_F12, _______, _______, _______, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC), _______, _______, _______, KC_PENT, _______, _______, _______, _______, _______, _______, _______, KC_ENT, KC_RSFT, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -90,23 +87,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; - (void)event; - - switch (id) { - - } - return MACRO_NONE; -} - - void matrix_init_user(void) { } diff --git a/keyboards/40percentclub/4x4/rules.mk b/keyboards/40percentclub/4x4/rules.mk index d572e7244..a51335798 100644 --- a/keyboards/40percentclub/4x4/rules.mk +++ b/keyboards/40percentclub/4x4/rules.mk @@ -36,24 +36,30 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID 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 # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -68,7 +74,7 @@ UNICODE_ENABLE = no # Unicode 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) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) #FIXME: Community keymap build are currently failing due to missing functionality #LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16 diff --git a/keyboards/40percentclub/5x5/5x5.h b/keyboards/40percentclub/5x5/5x5.h index 45fb80a4f..182e9e819 100644 --- a/keyboards/40percentclub/5x5/5x5.h +++ b/keyboards/40percentclub/5x5/5x5.h @@ -1,6 +1,4 @@ - -#ifndef FIVEX5_H -#define FIVEX5_H +#pragma once #include "quantum.h" #define ___ KC_NO @@ -53,5 +51,3 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e}, \ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4a, K4b, K4c, K4d, K4e} \ } - -#endif diff --git a/keyboards/40percentclub/5x5/keymaps/default/keymap.c b/keyboards/40percentclub/5x5/keymaps/default/keymap.c index a2c525d08..56ddbb23f 100644 --- a/keyboards/40percentclub/5x5/keymaps/default/keymap.c +++ b/keyboards/40percentclub/5x5/keymaps/default/keymap.c @@ -6,9 +6,6 @@ #define NUM 2 #define DIR 3 -// Readability keycodes -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Single 5x5 board only @@ -74,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_PPLS, - _______, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC), _______, _______, _______, KC_PENT, + _______, KC_F11, KC_F12, _______, _______, _______, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC), _______, _______, _______, KC_PENT, _______, _______, _______, _______, _______, _______, KC_ENT, KC_RSFT, _______, _______, _______, _______, _______, _______, _______ ), @@ -102,25 +99,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - void matrix_init_user(void) { diff --git a/keyboards/40percentclub/5x5/rules.mk b/keyboards/40percentclub/5x5/rules.mk index abc961a86..ae0414126 100644 --- a/keyboards/40percentclub/5x5/rules.mk +++ b/keyboards/40percentclub/5x5/rules.mk @@ -36,24 +36,31 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID 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 # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -68,7 +75,7 @@ UNICODE_ENABLE = no # Unicode 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) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) #FIXME: Community keymap build are currently failing due to missing functionality #LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15 diff --git a/keyboards/40percentclub/6lit/6lit.h b/keyboards/40percentclub/6lit/6lit.h index ae0beea35..af01d44c2 100644 --- a/keyboards/40percentclub/6lit/6lit.h +++ b/keyboards/40percentclub/6lit/6lit.h @@ -16,10 +16,10 @@ #pragma once #include "quantum.h" -#define ________ KC_NO +#define ___ KC_NO #ifndef FLIP_HALF -#define LAYOUT_split( \ +#define LAYOUT_ortho_2x6( \ L00, L01, L02, R00, R01, R02, \ L10, L11, L12, R10, R11, R12 \ ) { \ @@ -29,7 +29,7 @@ { R12, R11, R10 }, \ } #else -#define LAYOUT_split( \ +#define LAYOUT_ortho_2x6( \ L00, L01, L02, R00, R01, R02, \ L10, L11, L12, R10, R11, R12 \ ) { \ @@ -40,15 +40,18 @@ } #endif -#define LAYOUT_macro( \ +#define LAYOUT_ortho_2x3( \ L00, L01, L02, \ L10, L11, L12 \ ) { \ { L00, L01, L02 }, \ { L10, L11, L12 }, \ + { ___, ___, ___ }, \ + { ___, ___, ___ }, \ } -#define LAYOUT LAYOUT_macro +#define LAYOUT_macro LAYOUT_ortho_2x3 +#define LAYOUT_split LAYOUT_ortho_2x6 #ifdef USE_I2C #error "I2C not Supported" diff --git a/keyboards/40percentclub/foobar/foobar.h b/keyboards/40percentclub/foobar/foobar.h index fc49c72aa..8cf2e384f 100644 --- a/keyboards/40percentclub/foobar/foobar.h +++ b/keyboards/40percentclub/foobar/foobar.h @@ -19,7 +19,7 @@ #define ___ KC_NO #ifndef FLIP_HALF -#define LAYOUT_split( \ +#define LAYOUT_ortho_3x10( \ L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ L20, L21, L22, L23, L24, R20, R21, R22, R23, R24 \ @@ -32,7 +32,7 @@ { R24, R23, R22, R21, R20 } \ } #else -#define LAYOUT_split( \ +#define LAYOUT_ortho_3x10( \ L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ L20, L21, L22, L23, L24, R20, R21, R22, R23, R24 \ @@ -46,7 +46,7 @@ } #endif -#define LAYOUT_macro( \ +#define LAYOUT_ortho_3x5( \ L00, L01, L02, L03, L04, \ L10, L11, L12, L13, L14, \ L20, L21, L22, L23, L24 \ @@ -59,7 +59,8 @@ { ___, ___, ___, ___, ___ } \ } -#define LAYOUT LAYOUT_macro +#define LAYOUT_macro LAYOUT_ortho_3x5 +#define LAYOUT_split LAYOUT_ortho_3x10 #ifdef USE_I2C #error "I2C not Supported" diff --git a/keyboards/40percentclub/foobar/keymaps/default/keymap.c b/keyboards/40percentclub/foobar/keymaps/default/keymap.c index b750c6185..774f1e854 100644 --- a/keyboards/40percentclub/foobar/keymaps/default/keymap.c +++ b/keyboards/40percentclub/foobar/keymaps/default/keymap.c @@ -15,7 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS #define FN1_Q LT(1, KC_Q) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/40percentclub/foobar/rules.mk b/keyboards/40percentclub/foobar/rules.mk index 327565165..155a7daac 100644 --- a/keyboards/40percentclub/foobar/rules.mk +++ b/keyboards/40percentclub/foobar/rules.mk @@ -81,3 +81,5 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) # Enable generic behavior for split boards SPLIT_KEYBOARD = yes + +LAYOUTS = ortho_3x10 diff --git a/keyboards/40percentclub/gherkin/config.h b/keyboards/40percentclub/gherkin/config.h index 34f38e35c..3ed638b66 100644 --- a/keyboards/40percentclub/gherkin/config.h +++ b/keyboards/40percentclub/gherkin/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -50,5 +49,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/40percentclub/gherkin/gherkin.h b/keyboards/40percentclub/gherkin/gherkin.h index f8674be40..70bffee30 100644 --- a/keyboards/40percentclub/gherkin/gherkin.h +++ b/keyboards/40percentclub/gherkin/gherkin.h @@ -1,5 +1,4 @@ -#ifndef GHERKIN_H -#define GHERKIN_H +#pragma once #include "quantum.h" @@ -14,5 +13,3 @@ { K30, K31, K32, K33, K34, K35 }, \ { K40, K41, K42, K43, K44, K45 } \ } - -#endif diff --git a/keyboards/40percentclub/gherkin/keymaps/bbaserdem/config.h b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/config.h index 37d7113e7..5c9ca52d7 100644 --- a/keyboards/40percentclub/gherkin/keymaps/bbaserdem/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/config.h @@ -1,7 +1,5 @@ -#ifndef CONFIG_KEYMAP_H -#define CONFIG_KEYMAP_H +#pragma once -#include "../../config.h" #define RGB_DI_PIN F6 #define RGBLED_NUM 10 #define RGBLIGHT_ANIMATIONS @@ -9,5 +7,3 @@ #undef BACKLIGHT_LEVELS #endif #define BACKLIGHT_LEVELS 3 - -#endif diff --git a/keyboards/40percentclub/gherkin/keymaps/bbaserdem/rules.mk b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/rules.mk index cd1cddebf..07a20a421 100644 --- a/keyboards/40percentclub/gherkin/keymaps/bbaserdem/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/bbaserdem/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - USER_NAME := bbaserdem-nouserspace STENO_ENABLE = no # Additional protocols for Stenography(+1700), requires VIRTSER diff --git a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c index f01820030..ae6f15862 100644 --- a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS #define FN1_Q LT(1, KC_Q) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -19,16 +18,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; - (void)event; - - switch (id) { - - } - return MACRO_NONE; -} - void matrix_init_user(void) { } diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h index 71c0cb8b5..6849bbdd2 100644 --- a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/config.h @@ -1,7 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #undef RGB_DI_PIN #undef RGBLED_NUM @@ -11,5 +8,3 @@ #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c index 580b041c9..950b6e86b 100644 --- a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c @@ -12,10 +12,9 @@ enum custom_keycodes { PS = SAFE_RANGE, AI, PR, + MACRO_0, }; -#define _______ KC_TRNS - #define PS TO(0) #define AI TO(1) #define PR TO(2) @@ -72,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Illustrator layer [_AI] = LAYOUT_ortho_3x10( - _______, M(0), RULER, _______, KC_G, _______, _______, KC_Q, KC_MINS, KC_PLUS, + _______, MACRO_0, RULER, _______, KC_G, _______, _______, KC_Q, KC_MINS, KC_PLUS, _______, _______, _______, KC_E, _______, _______, _______, SHAPE, KC_O, OPEN, _______, _______, _______, _______, _______, _______, _______, KC_M, KC_SLSH, PR ), @@ -133,20 +132,14 @@ void matrix_scan_user(void) { #endif } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; - (void)event; - - switch (id) { - case 0: - // Save for Web Macro. - return MACRO(D(LSFT), D(LALT), D(LCTL), T(S), U(LCTL), U(LALT), U(LSFT), END); - } - return MACRO_NONE; -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - } - return true; -} + if (record->event.pressed) { + switch(keycode) { + case MACRO_0: + // Save for Web Macro. + SEND_STRING(SS_LSFT(SS_LALT(SS_LCTRL("s")))); + return false; + } + } + return true; +}; diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk index ed0af7b8b..b359ca287 100644 --- a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/rules.mk @@ -1,7 +1,3 @@ BACKLIGHT_ENABLE = yes AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/mjt/config.h b/keyboards/40percentclub/gherkin/keymaps/mjt/config.h index bb59ec213..9fe94bcd2 100644 --- a/keyboards/40percentclub/gherkin/keymaps/mjt/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/mjt/config.h @@ -1,169 +1,7 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" +#pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 +#undef MANUFACTURER +#undef DESCRIPTION #define MANUFACTURER Some Guy -#define PRODUCT Gherkin #define DESCRIPTION 30 percent disaster - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 6 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ - -// These are with USB on the left. -// #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } -// original from TMK: #define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4 } -// #define MATRIX_COL_PINS { D0, D4, F6, D7, E6, B4 } - -// these are with USB on the right. -#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } -#define MATRIX_COL_PINS { B4, E6, D7, F6, D4, D0 } - -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 -#define BACKLIGHT_PIN B5 - -/* 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 AUDIO_VOICES - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c b/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c index 2b4369c34..2fd4c2a46 100644 --- a/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c @@ -12,7 +12,6 @@ enum { TD_C_LALT = 2, TD_A_TAB = 3, TD_Q_ESC = 4, -// M(0) }; //Friendly Layer Names @@ -37,10 +36,6 @@ enum gherkin_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_ortho_3x10( TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, @@ -171,30 +166,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } - -/* -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; - - switch (id) { - case 0: { - if (record->event.pressed) { - key_timer = timer_read(); // if the key is being pressed, we start the timer. - } - else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down"). - if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap. - return MACRO( D(LSFT), END ); - } - else { - return MACRO( T(N), END ); - } - } - break; - } - } - return MACRO_NONE; -}*/ - void matrix_init_user(void) { #ifdef AUDIO_ENABLE startup_user(); diff --git a/keyboards/40percentclub/gherkin/keymaps/mjt/rules.mk b/keyboards/40percentclub/gherkin/keymaps/mjt/rules.mk index afb93b674..3a35ae3b3 100644 --- a/keyboards/40percentclub/gherkin/keymaps/mjt/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/mjt/rules.mk @@ -1,29 +1,2 @@ -## not sure where this stuff goes ## -MCU = atmega32u4 -F_CPU = 16000000 -ARCH = AVR8 -F_USB = $(F_CPU) -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -TAP_DANCE_ENABLE=yes - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif +AUDIO_ENABLE = yes # Audio output on port C6 +TAP_DANCE_ENABLE = yes diff --git a/keyboards/40percentclub/gherkin/keymaps/steno/config.h b/keyboards/40percentclub/gherkin/keymaps/steno/config.h index abacefa01..20a8f7844 100644 --- a/keyboards/40percentclub/gherkin/keymaps/steno/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/steno/config.h @@ -1,12 +1,7 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #define NO_ACTION_LAYER #define NO_ACTION_TAPPING #define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - -#endif \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk b/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk index fa813f209..a6e76f7cf 100644 --- a/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk @@ -1,8 +1,4 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - -STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) @@ -13,4 +9,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no \ No newline at end of file +RGBLIGHT_ENABLE = no diff --git a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/config.h b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/config.h index 7fa3bf328..271f48d00 100644 --- a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/config.h @@ -1,6 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" - -#endif +// place overrides here diff --git a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c index ea2921924..ca3da579a 100644 --- a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c @@ -4,8 +4,6 @@ #define ST_BOLT QK_STENO_BOLT #define ST_GEM QK_STENO_GEMINI -#define XXXXXXX KC_NO - enum keyboard_layers { _QWERTY, _RAISE, diff --git a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/rules.mk b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/rules.mk index 02216ecb3..a64c606ae 100644 --- a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/rules.mk @@ -1,6 +1,2 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - MOUSEKEY_ENABLE = no # Mouse keys(+4700) STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER diff --git a/keyboards/40percentclub/gherkin/rules.mk b/keyboards/40percentclub/gherkin/rules.mk index 416ca5e5f..1e0b34641 100644 --- a/keyboards/40percentclub/gherkin/rules.mk +++ b/keyboards/40percentclub/gherkin/rules.mk @@ -33,25 +33,40 @@ ARCH = AVR8 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. F_USB = $(F_CPU) -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = caterina - # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +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 # comment out to disable the options. # BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = no diff --git a/keyboards/40percentclub/luddite/rules.mk b/keyboards/40percentclub/luddite/rules.mk index 2f7d847bf..8dff21f9a 100644 --- a/keyboards/40percentclub/luddite/rules.mk +++ b/keyboards/40percentclub/luddite/rules.mk @@ -33,25 +33,40 @@ ARCH = AVR8 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. F_USB = $(F_CPU) -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -BOOTLOADER = caterina - # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +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 # comment out to disable the options. # BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes diff --git a/keyboards/40percentclub/mf68/config.h b/keyboards/40percentclub/mf68/config.h index 07d787eac..22d987e52 100644 --- a/keyboards/40percentclub/mf68/config.h +++ b/keyboards/40percentclub/mf68/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -158,5 +157,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/40percentclub/mf68/keymaps/default/keymap.c b/keyboards/40percentclub/mf68/keymaps/default/keymap.c index 73045f310..ae7e7297c 100644 --- a/keyboards/40percentclub/mf68/keymaps/default/keymap.c +++ b/keyboards/40percentclub/mf68/keymaps/default/keymap.c @@ -51,18 +51,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ ) }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/40percentclub/mf68/keymaps/factory/keymap.c b/keyboards/40percentclub/mf68/keymaps/factory/keymap.c index 0c5305e51..12032350c 100644 --- a/keyboards/40percentclub/mf68/keymaps/factory/keymap.c +++ b/keyboards/40percentclub/mf68/keymaps/factory/keymap.c @@ -57,18 +57,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ ) }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/40percentclub/mf68/mf68.h b/keyboards/40percentclub/mf68/mf68.h index a55c1d60b..a34f9cde8 100644 --- a/keyboards/40percentclub/mf68/mf68.h +++ b/keyboards/40percentclub/mf68/mf68.h @@ -1,5 +1,4 @@ -#ifndef MF68_H -#define MF68_H +#pragma once #include "quantum.h" @@ -36,5 +35,3 @@ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \ ) - -#endif diff --git a/keyboards/40percentclub/mf68/rules.mk b/keyboards/40percentclub/mf68/rules.mk index 9f6445686..38c9f517b 100644 --- a/keyboards/40percentclub/mf68/rules.mk +++ b/keyboards/40percentclub/mf68/rules.mk @@ -1,4 +1,3 @@ - # MCU name MCU = atmega32u4 @@ -15,7 +14,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - # # LUFA specific # @@ -39,30 +37,42 @@ F_USB = $(F_CPU) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +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 # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +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 ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = 68_ansi \ No newline at end of file +LAYOUTS = 68_ansi diff --git a/keyboards/40percentclub/mf68_ble/config.h b/keyboards/40percentclub/mf68_ble/config.h index 83c0a7a5a..e7edd77fe 100644 --- a/keyboards/40percentclub/mf68_ble/config.h +++ b/keyboards/40percentclub/mf68_ble/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -158,5 +157,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c b/keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c index 73045f310..ae7e7297c 100644 --- a/keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c +++ b/keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c @@ -51,18 +51,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ ) }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/40percentclub/mf68_ble/mf68_ble.h b/keyboards/40percentclub/mf68_ble/mf68_ble.h index 8ef14c98d..a34f9cde8 100644 --- a/keyboards/40percentclub/mf68_ble/mf68_ble.h +++ b/keyboards/40percentclub/mf68_ble/mf68_ble.h @@ -1,5 +1,4 @@ -#ifndef MF68_BLE_H -#define MF68_BLE_H +#pragma once #include "quantum.h" @@ -36,5 +35,3 @@ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \ ) - -#endif diff --git a/keyboards/40percentclub/mf68_ble/rules.mk b/keyboards/40percentclub/mf68_ble/rules.mk index 07b59d785..2ca811833 100644 --- a/keyboards/40percentclub/mf68_ble/rules.mk +++ b/keyboards/40percentclub/mf68_ble/rules.mk @@ -1,4 +1,3 @@ - # MCU name MCU = atmega32u4 @@ -39,29 +38,42 @@ F_USB = $(F_CPU) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +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 # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +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 ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 -BLUETOOTH = AdafruitBLE \ No newline at end of file +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +BLUETOOTH = AdafruitBLE diff --git a/keyboards/40percentclub/nano/config.h b/keyboards/40percentclub/nano/config.h index 088fafcaa..36840d2f6 100644 --- a/keyboards/40percentclub/nano/config.h +++ b/keyboards/40percentclub/nano/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -41,5 +40,3 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/40percentclub/nano/keymaps/default/keymap.c b/keyboards/40percentclub/nano/keymaps/default/keymap.c index cd9d4549d..9ce282a28 100644 --- a/keyboards/40percentclub/nano/keymaps/default/keymap.c +++ b/keyboards/40percentclub/nano/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #define _MAIN 0 #define _FN 1 -#define _______ KC_TRNS #define KC_X0 LT(_FN, KC_ESC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/40percentclub/nano/keymaps/spooka/keymap.c b/keyboards/40percentclub/nano/keymaps/spooka/keymap.c index 63b90da09..7908794fe 100644 --- a/keyboards/40percentclub/nano/keymaps/spooka/keymap.c +++ b/keyboards/40percentclub/nano/keymaps/spooka/keymap.c @@ -2,8 +2,6 @@ #define _MAIN 0 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MAIN] = LAYOUT( RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, diff --git a/keyboards/40percentclub/nano/nano.h b/keyboards/40percentclub/nano/nano.h index 21d6c4f30..ae297ac12 100644 --- a/keyboards/40percentclub/nano/nano.h +++ b/keyboards/40percentclub/nano/nano.h @@ -1,5 +1,4 @@ -#ifndef NANO_H -#define NANO_H +#pragma once #include "quantum.h" @@ -10,5 +9,3 @@ { k01, k02, k03, k04 }, \ { k05, k06, k07, k08 } \ } - -#endif diff --git a/keyboards/40percentclub/nano/rules.mk b/keyboards/40percentclub/nano/rules.mk index dc510bc0d..66ad3ffc6 100644 --- a/keyboards/40percentclub/nano/rules.mk +++ b/keyboards/40percentclub/nano/rules.mk @@ -1,7 +1,4 @@ -SRC = matrix.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. @@ -40,16 +37,28 @@ F_USB = $(F_CPU) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +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 to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) @@ -67,4 +76,7 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# custom matrix setup +SRC = matrix.c CUSTOM_MATRIX = yes diff --git a/keyboards/40percentclub/tomato/config.h b/keyboards/40percentclub/tomato/config.h index 185cb326c..05c83c30c 100644 --- a/keyboards/40percentclub/tomato/config.h +++ b/keyboards/40percentclub/tomato/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/40percentclub/tomato/keymaps/default/keymap.c b/keyboards/40percentclub/tomato/keymaps/default/keymap.c index 94bfca202..01a868d7e 100644 --- a/keyboards/40percentclub/tomato/keymaps/default/keymap.c +++ b/keyboards/40percentclub/tomato/keymaps/default/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_ortho_3x10 ( KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - , KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_DEL, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + , _______,_______,_______,_______,KC_DEL, _______,_______,_______,_______,_______ ), /* Level 2: Symbols Layer * ,-------------------------------------------------------------------------------. @@ -51,8 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ LAYOUT_ortho_3x10 ( KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN - , KC_F11, KC_F12,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_GRAVE - , KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + , KC_F11, KC_F12,_______,_______,_______,_______,_______,_______,_______,KC_GRAVE + , _______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ), /* Level 3: RGB Layer * ,-------------------------------------------------------------------------------. @@ -64,9 +64,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '-------------------------------------------------------------------------------' */ LAYOUT_ortho_3x10 - ( KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS - , KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_COMM,KC_DOT, KC_SLSH,KC_SCLN,KC_QUOT - , KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT + ( _______,_______,_______,_______,_______,KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS + , KC_TAB, _______,_______,_______,_______,KC_COMM,KC_DOT, KC_SLSH,KC_SCLN,KC_QUOT + , _______,_______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT ), /* Level 4: RGB Layer * ,-------------------------------------------------------------------------------. @@ -78,9 +78,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '-------------------------------------------------------------------------------' */ LAYOUT_ortho_3x10 - ( KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE - , KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_LT, KC_GT, KC_QUES,KC_COLN,KC_DQUO - , KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_HOME,KC_PGUP,KC_PGDN,KC_END + ( _______,_______,_______,_______,_______,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE + , KC_TAB, _______,_______,_______,_______,KC_LT, KC_GT, KC_QUES,KC_COLN,KC_DQUO + , _______,_______,_______,_______,_______,_______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ), /* Level 5: RGB Layer * ,-------------------------------------------------------------------------------. @@ -92,27 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '-------------------------------------------------------------------------------' */ LAYOUT_ortho_3x10 - ( KC_CALC,KC_WSCH,KC_MAIL,KC_MYCM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS - , RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,KC_NO, KC_NO, RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD - , KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ( KC_CALC,KC_WSCH,KC_MAIL,KC_MYCM,_______,_______,_______,_______,_______,_______ + , RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,XXXXXXX,XXXXXXX,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD + , _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______ ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - void matrix_init_user(void) { } diff --git a/keyboards/40percentclub/tomato/rules.mk b/keyboards/40percentclub/tomato/rules.mk index cbb2b0519..844ff9982 100644 --- a/keyboards/40percentclub/tomato/rules.mk +++ b/keyboards/40percentclub/tomato/rules.mk @@ -37,21 +37,37 @@ F_USB = $(F_CPU) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# Boot Section Size in *bytes* +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID 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 # comment out to disable the options. # BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes diff --git a/keyboards/40percentclub/tomato/tomato.h b/keyboards/40percentclub/tomato/tomato.h index f8674be40..70bffee30 100644 --- a/keyboards/40percentclub/tomato/tomato.h +++ b/keyboards/40percentclub/tomato/tomato.h @@ -1,5 +1,4 @@ -#ifndef GHERKIN_H -#define GHERKIN_H +#pragma once #include "quantum.h" @@ -14,5 +13,3 @@ { K30, K31, K32, K33, K34, K35 }, \ { K40, K41, K42, K43, K44, K45 } \ } - -#endif diff --git a/keyboards/40percentclub/ut47/config.h b/keyboards/40percentclub/ut47/config.h index 4335e3edd..cd55e4d73 100644 --- a/keyboards/40percentclub/ut47/config.h +++ b/keyboards/40percentclub/ut47/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -83,5 +82,3 @@ along with this program. If not, see . # else # error "USART configuration is needed." #endif - -#endif diff --git a/keyboards/40percentclub/ut47/keymaps/default/config.h b/keyboards/40percentclub/ut47/keymaps/default/config.h index 46098a22f..f88ebf7e8 100644 --- a/keyboards/40percentclub/ut47/keymaps/default/config.h +++ b/keyboards/40percentclub/ut47/keymaps/default/config.h @@ -14,11 +14,8 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" // place overrides here - -#endif diff --git a/keyboards/40percentclub/ut47/keymaps/default/keymap.c b/keyboards/40percentclub/ut47/keymaps/default/keymap.c index 6b6bb025b..0fa7838df 100644 --- a/keyboards/40percentclub/ut47/keymaps/default/keymap.c +++ b/keyboards/40percentclub/ut47/keymaps/default/keymap.c @@ -18,7 +18,6 @@ #include "protocol/serial.h" #endif -#define _______ KC_TRNS #define LT3_TAB LT(3, KC_TAB) #define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) diff --git a/keyboards/40percentclub/ut47/keymaps/non-us/config.h b/keyboards/40percentclub/ut47/keymaps/non-us/config.h index 46098a22f..f88ebf7e8 100644 --- a/keyboards/40percentclub/ut47/keymaps/non-us/config.h +++ b/keyboards/40percentclub/ut47/keymaps/non-us/config.h @@ -14,11 +14,8 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" // place overrides here - -#endif diff --git a/keyboards/40percentclub/ut47/keymaps/non-us/keymap.c b/keyboards/40percentclub/ut47/keymaps/non-us/keymap.c index 1cb537b7d..0c1c2e759 100644 --- a/keyboards/40percentclub/ut47/keymaps/non-us/keymap.c +++ b/keyboards/40percentclub/ut47/keymaps/non-us/keymap.c @@ -18,7 +18,6 @@ #include "protocol/serial.h" #endif -#define _______ KC_TRNS #define LT3_TAB LT(3, KC_TAB) #define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) diff --git a/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c b/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c index cc3f43650..f3e297ec0 100644 --- a/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c +++ b/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c @@ -21,7 +21,6 @@ #include "keymap_norwegian.h" -#define _______ KC_TRNS #define LT3_TAB LT(3, KC_TAB) #define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) #define CTRADEL LALT(LCTL(KC_DEL)) diff --git a/keyboards/40percentclub/ut47/keymaps/rgb/config.h b/keyboards/40percentclub/ut47/keymaps/rgb/config.h index 0eb010a3a..791147b5b 100644 --- a/keyboards/40percentclub/ut47/keymaps/rgb/config.h +++ b/keyboards/40percentclub/ut47/keymaps/rgb/config.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" @@ -23,5 +22,3 @@ #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN D3 // The pin the LED strip is connected to #define RGBLED_NUM 7 // Number of LEDs in your strip - -#endif diff --git a/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c b/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c index 58d11031a..77fa5b401 100644 --- a/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c +++ b/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c @@ -18,7 +18,6 @@ #include "protocol/serial.h" #endif -#define _______ KC_TRNS #define LT3_TAB LT(3, KC_TAB) #define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) diff --git a/keyboards/40percentclub/ut47/rules.mk b/keyboards/40percentclub/ut47/rules.mk index b04659866..7495f5edd 100644 --- a/keyboards/40percentclub/ut47/rules.mk +++ b/keyboards/40percentclub/ut47/rules.mk @@ -1,5 +1,4 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 # Processor frequency. @@ -38,12 +37,26 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# Bootloader + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID BOOTLOADER = caterina -# custom matrix setup -CUSTOM_MATRIX = yes -SRC += matrix.c protocol/serial_uart.c + +# 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 @@ -51,12 +64,12 @@ SRC += matrix.c protocol/serial_uart.c BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # 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 +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode @@ -64,6 +77,10 @@ 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 +# custom matrix setup +CUSTOM_MATRIX = yes +SRC += matrix.c protocol/serial_uart.c + ifeq ($(strip $(LED_ENABLE)), yes) OPT_DEFS += -DLED_ENABLE SRC += led.c diff --git a/keyboards/40percentclub/ut47/ut47.h b/keyboards/40percentclub/ut47/ut47.h index a4507dd34..f6456fe91 100644 --- a/keyboards/40percentclub/ut47/ut47.h +++ b/keyboards/40percentclub/ut47/ut47.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef UT47_H -#define UT47_H +#pragma once #include "quantum.h" @@ -45,5 +44,3 @@ ) #define LAYOUT_kc_ut47 LAYOUT_kc - -#endif -- cgit v1.2.3 From 09813793bedd74c0bb109c6e87e3682bb864479a Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 16 Nov 2018 15:37:15 +0000 Subject: Add configurator support for luddite (#4434) --- keyboards/40percentclub/luddite/info.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 keyboards/40percentclub/luddite/info.json (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/luddite/info.json b/keyboards/40percentclub/luddite/info.json new file mode 100644 index 000000000..51d71ec77 --- /dev/null +++ b/keyboards/40percentclub/luddite/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "foobar", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} -- cgit v1.2.3 From b49f37dce97b1f84659146e7bbe4a55804407072 Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 16 Nov 2018 16:35:04 +0000 Subject: Unify 68keys with mf68 (#4435) * Move 68keys keymap to mf68 folder * Remove 68keys keyboard now its been migrated to mf68 keymap * Migrate 68keys build config to mf68 keymap overrides --- .../40percentclub/mf68/keymaps/68keys/config.h | 15 ++++++++++++++ .../40percentclub/mf68/keymaps/68keys/keymap.c | 11 +++++++++++ .../40percentclub/mf68/keymaps/68keys/readme.md | 23 ++++++++++++++++++++++ .../40percentclub/mf68/keymaps/68keys/rules.mk | 5 +++++ 4 files changed, 54 insertions(+) create mode 100644 keyboards/40percentclub/mf68/keymaps/68keys/config.h create mode 100644 keyboards/40percentclub/mf68/keymaps/68keys/keymap.c create mode 100644 keyboards/40percentclub/mf68/keymaps/68keys/readme.md create mode 100644 keyboards/40percentclub/mf68/keymaps/68keys/rules.mk (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/mf68/keymaps/68keys/config.h b/keyboards/40percentclub/mf68/keymaps/68keys/config.h new file mode 100644 index 000000000..a0a576b7b --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/68keys/config.h @@ -0,0 +1,15 @@ +#pragma once + +/* USB Device descriptor parameter */ +#undef VENDOR_ID +#undef PRODUCT_ID +#undef DEVICE_VER +#undef MANUFACTURER +#undef PRODUCT +#undef DESCRIPTION +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x0068 +#define MANUFACTURER 68Keys.io +#define PRODUCT The 68Keys.io Keyboard +#define DESCRIPTION A 68 keys mechanical keyboard diff --git a/keyboards/40percentclub/mf68/keymaps/68keys/keymap.c b/keyboards/40percentclub/mf68/keymaps/68keys/keymap.c new file mode 100644 index 000000000..3778ea21e --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/68keys/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_68_ansi( + KC_GRV, 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_ESC, KC_PGUP, + 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_DEL, KC_PGDN, + KC_CAPSLOCK, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/keyboards/40percentclub/mf68/keymaps/68keys/readme.md b/keyboards/40percentclub/mf68/keymaps/68keys/readme.md new file mode 100644 index 000000000..4b7cdf125 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/68keys/readme.md @@ -0,0 +1,23 @@ +# 68Keys.io + +Custom [68Keys.io](https://68keys.io) DIY keyboard. + +Keymap Maintainer: [sbstjn](https://sbstjn.com) +Hardware Supported: mf68 +Hardware Availability: [DIY Guide](https://68keys.io) + +Make example for this keyboard (after setting up your build environment): + +```bash +$ > cd qmk_firmware/ +$ > make 40percentclub/mf68:68keys +``` + +Example of flashing this keyboard: + +```bash +$ > cd qmk_firmware/ +$ > make 40percentclub/mf68:68keys:avrdude +``` + +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/40percentclub/mf68/keymaps/68keys/rules.mk b/keyboards/40percentclub/mf68/keymaps/68keys/rules.mk new file mode 100644 index 000000000..96ce13fe7 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/68keys/rules.mk @@ -0,0 +1,5 @@ +BOOTLOADER = atmel-dfu + +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +BACKLIGHT_ENABLE = no -- cgit v1.2.3 From d7ab738ca687a6ea923ce286f7cb81a5125b86ba Mon Sep 17 00:00:00 2001 From: Colin Kahn Date: Sun, 25 Nov 2018 18:38:46 -0800 Subject: Adding keymap layers for 40precentclub/foobar (#4481) --- .../40percentclub/foobar/keymaps/default/config.h | 2 + .../40percentclub/foobar/keymaps/default/keymap.c | 57 +++++++++++++++++++--- 2 files changed, 52 insertions(+), 7 deletions(-) (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/foobar/keymaps/default/config.h b/keyboards/40percentclub/foobar/keymaps/default/config.h index 6173b6327..bedc27ba8 100644 --- a/keyboards/40percentclub/foobar/keymaps/default/config.h +++ b/keyboards/40percentclub/foobar/keymaps/default/config.h @@ -17,3 +17,5 @@ #pragma once // place overrides here + +#define PERMISSIVE_HOLD diff --git a/keyboards/40percentclub/foobar/keymaps/default/keymap.c b/keyboards/40percentclub/foobar/keymaps/default/keymap.c index 774f1e854..1be4b38dd 100644 --- a/keyboards/40percentclub/foobar/keymaps/default/keymap.c +++ b/keyboards/40percentclub/foobar/keymaps/default/keymap.c @@ -15,19 +15,62 @@ */ #include QMK_KEYBOARD_H -#define FN1_Q LT(1, KC_Q) +enum foobar_layers { + QWERTY, + FN1, + FN2, + FN3, + FN4, + FN5 +}; + +#define FN1_SPC LT(FN1, KC_SPC) +#define FN2_BSC LT(FN2, KC_BSPC) +#define FN3_C LT(FN3, KC_C) +#define FN4_V LT(FN4, KC_V) +#define FN5_B LT(FN5, KC_B) +#define RALT_N RALT_T(KC_N) +#define LALT_X LALT_T(KC_X) +#define LCTL_Z LCTL_T(KC_Z) +#define RCTL_M RCTL_T(KC_M) +#define LSFT_ENT LSFT_T(KC_ENT) +#define RGUI_ESC RGUI_T(KC_ESC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split( - FN1_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ESC, - KC_Z, KC_X, KC_C, KC_V, KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT + [QWERTY] = LAYOUT_split( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, RGUI_ESC, + LCTL_Z, LALT_X, FN3_C, FN4_V, FN2_BSC, FN1_SPC, FN5_B, RALT_N, RCTL_M, LSFT_ENT + ), + + [FN1] = LAYOUT_split( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ + ), + + [FN2] = LAYOUT_split( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_GRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [FN3] = LAYOUT_split( + _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TAB, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_SCLN, KC_QUOT, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [FN4] = LAYOUT_split( + _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TAB, _______, _______, _______, _______, KC_LABK, KC_RABK, KC_QUES, KC_COLN, KC_DQUO, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [1] = LAYOUT_split( + [FN5] = LAYOUT_split( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ + _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______ ), }; -- cgit v1.2.3 From 0031e461913d23e37a9aebd1da5daf1c93a149ee Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 26 Nov 2018 17:27:07 +0000 Subject: Keyboard: 40percentclub - enable 4x4 and 5x5 community keymaps (#4437) * Enable 4x4 and 5x5 community keymap support * Pull 4x4 community keymap fixes from @noroadsleft * Build fixes for guidoism keymap - move keymap to layouts/community/planck_mit as it uses the LAYOUT_planck_mit macro --- keyboards/40percentclub/4x4/4x4.h | 13 +++++++++++++ keyboards/40percentclub/4x4/rules.mk | 3 +-- keyboards/40percentclub/5x5/rules.mk | 3 +-- 3 files changed, 15 insertions(+), 4 deletions(-) (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/4x4/4x4.h b/keyboards/40percentclub/4x4/4x4.h index 8cc5a150a..359cdc80a 100644 --- a/keyboards/40percentclub/4x4/4x4.h +++ b/keyboards/40percentclub/4x4/4x4.h @@ -56,3 +56,16 @@ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, K2f }, \ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e, K3f } \ } + +#define LAYOUT_kc_ortho_4x12( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \ +) \ +{ \ + { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0a, KC_##K0b, ___, ___, ___, ___}, \ + { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1a, KC_##K1b, ___, ___, ___, ___}, \ + { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2a, KC_##K2b, ___, ___, ___, ___}, \ + { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3a, KC_##K3b, ___, ___, ___, ___} \ +} diff --git a/keyboards/40percentclub/4x4/rules.mk b/keyboards/40percentclub/4x4/rules.mk index a51335798..4ab5e7431 100644 --- a/keyboards/40percentclub/4x4/rules.mk +++ b/keyboards/40percentclub/4x4/rules.mk @@ -76,5 +76,4 @@ 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) -#FIXME: Community keymap build are currently failing due to missing functionality -#LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16 +LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16 diff --git a/keyboards/40percentclub/5x5/rules.mk b/keyboards/40percentclub/5x5/rules.mk index ae0414126..237de6497 100644 --- a/keyboards/40percentclub/5x5/rules.mk +++ b/keyboards/40percentclub/5x5/rules.mk @@ -77,5 +77,4 @@ 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) -#FIXME: Community keymap build are currently failing due to missing functionality -#LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15 +LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15 -- cgit v1.2.3 From 20130e010badad1968762439e66c71dc4b0760a1 Mon Sep 17 00:00:00 2001 From: zvecr Date: Wed, 5 Dec 2018 16:36:31 +0000 Subject: Keyboard: Initial nori port (#4542) * Initial nori port * ortho_4x4 layout and RGB fixes * Review fixes for superseded audio and default layer functionality --- keyboards/40percentclub/nori/config.h | 221 +++++++++++++++++++++ keyboards/40percentclub/nori/info.json | 117 +++++++++++ .../40percentclub/nori/keymaps/default/config.h | 23 +++ .../40percentclub/nori/keymaps/default/keymap.c | 159 +++++++++++++++ .../40percentclub/nori/keymaps/default/readme.md | 1 + .../40percentclub/nori/keymaps/macro/config.h | 21 ++ .../40percentclub/nori/keymaps/macro/keymap.c | 41 ++++ .../40percentclub/nori/keymaps/macro/readme.md | 1 + keyboards/40percentclub/nori/nori.c | 43 ++++ keyboards/40percentclub/nori/nori.h | 69 +++++++ keyboards/40percentclub/nori/readme.md | 18 ++ keyboards/40percentclub/nori/rules.mk | 82 ++++++++ 12 files changed, 796 insertions(+) create mode 100644 keyboards/40percentclub/nori/config.h create mode 100644 keyboards/40percentclub/nori/info.json create mode 100644 keyboards/40percentclub/nori/keymaps/default/config.h create mode 100644 keyboards/40percentclub/nori/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/nori/keymaps/default/readme.md create mode 100644 keyboards/40percentclub/nori/keymaps/macro/config.h create mode 100644 keyboards/40percentclub/nori/keymaps/macro/keymap.c create mode 100644 keyboards/40percentclub/nori/keymaps/macro/readme.md create mode 100644 keyboards/40percentclub/nori/nori.c create mode 100644 keyboards/40percentclub/nori/nori.h create mode 100644 keyboards/40percentclub/nori/readme.md create mode 100644 keyboards/40percentclub/nori/rules.mk (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h new file mode 100644 index 000000000..9232344bf --- /dev/null +++ b/keyboards/40percentclub/nori/config.h @@ -0,0 +1,221 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x0444 +#define MANUFACTURER di0ib +#define PRODUCT The nori Keyboard +#define DESCRIPTION A modular compact keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, D2, D1, D0 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D4, C6, D7, E6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B5 +//#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// enable RGB underglow +#define RGB_DI_PIN B4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ diff --git a/keyboards/40percentclub/nori/info.json b/keyboards/40percentclub/nori/info.json new file mode 100644 index 000000000..db0d6aaad --- /dev/null +++ b/keyboards/40percentclub/nori/info.json @@ -0,0 +1,117 @@ +{ + "keyboard_name": "nori", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "key_count": 16, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 } ] + }, + "LAYOUT_ortho_4x8": { + "key_count": 32, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 } ] + }, + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + } + } +} diff --git a/keyboards/40percentclub/nori/keymaps/default/config.h b/keyboards/40percentclub/nori/keymaps/default/config.h new file mode 100644 index 000000000..90831ff34 --- /dev/null +++ b/keyboards/40percentclub/nori/keymaps/default/config.h @@ -0,0 +1,23 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +// place overrides here +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } diff --git a/keyboards/40percentclub/nori/keymaps/default/keymap.c b/keyboards/40percentclub/nori/keymaps/default/keymap.c new file mode 100644 index 000000000..3c225a0d9 --- /dev/null +++ b/keyboards/40percentclub/nori/keymaps/default/keymap.c @@ -0,0 +1,159 @@ +#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. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#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, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = 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_BSPC, \ + 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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = 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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 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 | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = 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_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + } + return true; +} diff --git a/keyboards/40percentclub/nori/keymaps/default/readme.md b/keyboards/40percentclub/nori/keymaps/default/readme.md new file mode 100644 index 000000000..4a55a35e4 --- /dev/null +++ b/keyboards/40percentclub/nori/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap diff --git a/keyboards/40percentclub/nori/keymaps/macro/config.h b/keyboards/40percentclub/nori/keymaps/macro/config.h new file mode 100644 index 000000000..03f34d3f5 --- /dev/null +++ b/keyboards/40percentclub/nori/keymaps/macro/config.h @@ -0,0 +1,21 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +// place overrides here +#undef RGBLED_NUM +#define RGBLED_NUM 4 diff --git a/keyboards/40percentclub/nori/keymaps/macro/keymap.c b/keyboards/40percentclub/nori/keymaps/macro/keymap.c new file mode 100644 index 000000000..14dc0b678 --- /dev/null +++ b/keyboards/40percentclub/nori/keymaps/macro/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2018 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( /* Base */ + KC_INT1, KC_INT2, KC_INT3, KC_INT5, \ + KC_F13, KC_F14, KC_F15, KC_F16, \ + KC_F17, KC_F18, KC_F19, KC_F20, \ + KC_F21, KC_F22, KC_F23, KC_F24 \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/nori/keymaps/macro/readme.md b/keyboards/40percentclub/nori/keymaps/macro/readme.md new file mode 100644 index 000000000..de2324248 --- /dev/null +++ b/keyboards/40percentclub/nori/keymaps/macro/readme.md @@ -0,0 +1 @@ +# The default single board macro keymap for nori diff --git a/keyboards/40percentclub/nori/nori.c b/keyboards/40percentclub/nori/nori.c new file mode 100644 index 000000000..9d27df7a5 --- /dev/null +++ b/keyboards/40percentclub/nori/nori.c @@ -0,0 +1,43 @@ +/* Copyright 2018 + * + * 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 . + */ +#include "nori.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/40percentclub/nori/nori.h b/keyboards/40percentclub/nori/nori.h new file mode 100644 index 000000000..802f0bfce --- /dev/null +++ b/keyboards/40percentclub/nori/nori.h @@ -0,0 +1,69 @@ +/* Copyright 2018 + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ___ KC_NO + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) \ +{ \ + { K00, K01, K02, K03, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { K10, K11, K12, K13, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { K20, K21, K22, K23, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { K30, K31, K32, K33, ___, ___, ___, ___, ___, ___, ___, ___ } \ +} +#define LAYOUT_ortho_4x8( \ + K00, K01, K02, K03, K04, K05, K06, K07, \ + K10, K11, K12, K13, K14, K15, K16, K17, \ + K20, K21, K22, K23, K24, K25, K26, K27, \ + K30, K31, K32, K33, K34, K35, K36, K37\ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, ___, ___, ___, ___ }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, ___, ___, ___, ___ }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, ___, ___, ___, ___ }, \ + { K30, K31, K32, K33, K34, K35, K35, K37, ___, ___, ___, ___ } \ +} +#define LAYOUT_ortho_4x12( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b } \ +} + +#define LAYOUT_kc_ortho_4x12( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \ +) \ +{ \ + { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0a, KC_##K0b }, \ + { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1a, KC_##K1b }, \ + { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2a, KC_##K2b }, \ + { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3a, KC_##K3b } \ +} diff --git a/keyboards/40percentclub/nori/readme.md b/keyboards/40percentclub/nori/readme.md new file mode 100644 index 000000000..3dd8afff4 --- /dev/null +++ b/keyboards/40percentclub/nori/readme.md @@ -0,0 +1,18 @@ +# nori + +![nori](https://2.bp.blogspot.com/-UBFz3c1-8hM/W48N0ynt6TI/AAAAAAACSQg/MHLY-DchBBMiiHUeIPVt_4T6x-ntmdjgwCEwYBhgL/s640/a.jpg) +=== + +A 4x12 matrix using 3 modular 4x4 matrix boards and powered by a Pro Micro. + +this one is using a Pro Micro. The Pro Micro has less data pins available so only 3 boards can be connected instead of 4. There are 2 pins left over, I used one (B5) for a backlight circuit like on a Gherkin. The other data pin (B4) is left for possible use with a WS2812B strip. + +Keyboard Maintainer: QMK Community +Hardware Supported: nori PCB +Hardware Availability: [nori project on 40% Keyboards](https://www.40percent.club/2018/10/nori.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/nori: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/40percentclub/nori/rules.mk b/keyboards/40percentclub/nori/rules.mk new file mode 100644 index 000000000..f52135379 --- /dev/null +++ b/keyboards/40percentclub/nori/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +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) + +LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 -- cgit v1.2.3 From 368de26996fbd54eefbf54c567a90bf0d81e20c7 Mon Sep 17 00:00:00 2001 From: zvecr Date: Wed, 5 Dec 2018 21:56:43 +0000 Subject: Keyboard: Initial i75 port (#4553) * Initial i75 port - currently supporting promicro and teensy2 * Initial i75 port - review fixes --- keyboards/40percentclub/i75/config.h | 192 +++++++++++++++++++++ keyboards/40percentclub/i75/i75.c | 43 +++++ keyboards/40percentclub/i75/i75.h | 24 +++ keyboards/40percentclub/i75/info.json | 12 ++ .../40percentclub/i75/keymaps/default/config.h | 19 ++ .../40percentclub/i75/keymaps/default/keymap.c | 66 +++++++ .../40percentclub/i75/keymaps/default/readme.md | 1 + keyboards/40percentclub/i75/promicro/config.h | 40 +++++ keyboards/40percentclub/i75/promicro/promicro.c | 16 ++ keyboards/40percentclub/i75/promicro/promicro.h | 47 +++++ keyboards/40percentclub/i75/promicro/rules.mk | 58 +++++++ keyboards/40percentclub/i75/readme.md | 28 +++ keyboards/40percentclub/i75/rules.mk | 23 +++ keyboards/40percentclub/i75/teensy2/config.h | 40 +++++ keyboards/40percentclub/i75/teensy2/rules.mk | 58 +++++++ keyboards/40percentclub/i75/teensy2/teensy2.c | 16 ++ keyboards/40percentclub/i75/teensy2/teensy2.h | 47 +++++ 17 files changed, 730 insertions(+) create mode 100644 keyboards/40percentclub/i75/config.h create mode 100644 keyboards/40percentclub/i75/i75.c create mode 100644 keyboards/40percentclub/i75/i75.h create mode 100644 keyboards/40percentclub/i75/info.json create mode 100644 keyboards/40percentclub/i75/keymaps/default/config.h create mode 100644 keyboards/40percentclub/i75/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/i75/keymaps/default/readme.md create mode 100644 keyboards/40percentclub/i75/promicro/config.h create mode 100644 keyboards/40percentclub/i75/promicro/promicro.c create mode 100644 keyboards/40percentclub/i75/promicro/promicro.h create mode 100644 keyboards/40percentclub/i75/promicro/rules.mk create mode 100644 keyboards/40percentclub/i75/readme.md create mode 100644 keyboards/40percentclub/i75/rules.mk create mode 100644 keyboards/40percentclub/i75/teensy2/config.h create mode 100644 keyboards/40percentclub/i75/teensy2/rules.mk create mode 100644 keyboards/40percentclub/i75/teensy2/teensy2.c create mode 100644 keyboards/40percentclub/i75/teensy2/teensy2.h (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/i75/config.h b/keyboards/40percentclub/i75/config.h new file mode 100644 index 000000000..bc032ba45 --- /dev/null +++ b/keyboards/40percentclub/i75/config.h @@ -0,0 +1,192 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x0175 +#define MANUFACTURER di0ib +#define PRODUCT i75 +#define DESCRIPTION i75 15x5 ortholinear keyboard + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/i75/i75.c b/keyboards/40percentclub/i75/i75.c new file mode 100644 index 000000000..7efe3b454 --- /dev/null +++ b/keyboards/40percentclub/i75/i75.c @@ -0,0 +1,43 @@ +/* Copyright 2018 + * + * 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 . + */ +#include "i75.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/40percentclub/i75/i75.h b/keyboards/40percentclub/i75/i75.h new file mode 100644 index 000000000..a31c9f6e6 --- /dev/null +++ b/keyboards/40percentclub/i75/i75.h @@ -0,0 +1,24 @@ +/* Copyright 2018 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_40percentclub_i75_promicro + #include "promicro.h" +#elif KEYBOARD_40percentclub_i75_teensy2 + #include "teensy2.h" +#endif diff --git a/keyboards/40percentclub/i75/info.json b/keyboards/40percentclub/i75/info.json new file mode 100644 index 000000000..033bf02bc --- /dev/null +++ b/keyboards/40percentclub/i75/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "i75", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x15": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}] + } + } +} diff --git a/keyboards/40percentclub/i75/keymaps/default/config.h b/keyboards/40percentclub/i75/keymaps/default/config.h new file mode 100644 index 000000000..6173b6327 --- /dev/null +++ b/keyboards/40percentclub/i75/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/i75/keymaps/default/keymap.c b/keyboards/40percentclub/i75/keymaps/default/keymap.c new file mode 100644 index 000000000..3054f8ebe --- /dev/null +++ b/keyboards/40percentclub/i75/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2018 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x15( \ + 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_BSLS, KC_GRV, \ + 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_BSPC, KC_DEL, \ + 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_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/i75/keymaps/default/readme.md b/keyboards/40percentclub/i75/keymaps/default/readme.md new file mode 100644 index 000000000..4d054181f --- /dev/null +++ b/keyboards/40percentclub/i75/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for i75 diff --git a/keyboards/40percentclub/i75/promicro/config.h b/keyboards/40percentclub/i75/promicro/config.h new file mode 100644 index 000000000..bc9146328 --- /dev/null +++ b/keyboards/40percentclub/i75/promicro/config.h @@ -0,0 +1,40 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B4, E6, D7, C6, D4, D0, D1, D2, D3 } +#define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/i75/promicro/promicro.c b/keyboards/40percentclub/i75/promicro/promicro.c new file mode 100644 index 000000000..28684e714 --- /dev/null +++ b/keyboards/40percentclub/i75/promicro/promicro.c @@ -0,0 +1,16 @@ +/* Copyright 2018 + * + * 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 . + */ +#include "i75.h" diff --git a/keyboards/40percentclub/i75/promicro/promicro.h b/keyboards/40percentclub/i75/promicro/promicro.h new file mode 100644 index 000000000..29394855a --- /dev/null +++ b/keyboards/40percentclub/i75/promicro/promicro.h @@ -0,0 +1,47 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +#include "i75.h" +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * 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. + */ +#define LAYOUT_ortho_5x15( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, \ + K16, K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, \ + K33, K34, K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, K64, K65, \ + K66, K67, K68, K70, K71, K72, K73, K74, K75, K76, K77, K78, K80, K81, K82 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K78 }, \ + { K80, K81, K82 } \ +} diff --git a/keyboards/40percentclub/i75/promicro/rules.mk b/keyboards/40percentclub/i75/promicro/rules.mk new file mode 100644 index 000000000..dc6f19623 --- /dev/null +++ b/keyboards/40percentclub/i75/promicro/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +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 diff --git a/keyboards/40percentclub/i75/readme.md b/keyboards/40percentclub/i75/readme.md new file mode 100644 index 000000000..9bdad68ad --- /dev/null +++ b/keyboards/40percentclub/i75/readme.md @@ -0,0 +1,28 @@ +# i75 + +![i75](https://1.bp.blogspot.com/-eRSwPnvgliI/WCYQ-aYihoI/AAAAAAAB_Bc/a7i1Envc1FYiEHeqvyHw80VxTAnafDsPgCLcB/s320/IMG_20161003_084555.jpg) +=== + +5x15 grid layout, multiple controllers supported +- Pro Micro +- PJRC Teensy 2.0 +- PJRC Teensy LC/3.2 (**NB: Not currently ported**) + +The matrix is a 9x9 grid. This uses all of the available pins on the Pro Micro. The other controllers have pins left over. The serial pins and pins connected to LEDs were avoided if possible. + +* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/i75_ProMicro) + +Keyboard Maintainer: QMK Community +Hardware Supported: i75 PCB +Hardware Availability: [i75 project on 40% Keyboards](http://www.40percent.club/2016/11/i75.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/i75:default + +If you would like to use one of the alternative controllers: + + make 40percentclub/i75/promicro:default + make 40percentclub/i75/teensy2: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/40percentclub/i75/rules.mk b/keyboards/40percentclub/i75/rules.mk new file mode 100644 index 000000000..6f79143a1 --- /dev/null +++ b/keyboards/40percentclub/i75/rules.mk @@ -0,0 +1,23 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +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) + +LAYOUTS = ortho_5x15 +DEFAULT_FOLDER = 40percentclub/i75/promicro diff --git a/keyboards/40percentclub/i75/teensy2/config.h b/keyboards/40percentclub/i75/teensy2/config.h new file mode 100644 index 000000000..fdbde8d64 --- /dev/null +++ b/keyboards/40percentclub/i75/teensy2/config.h @@ -0,0 +1,40 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, D2, D1, D0, B7, B3, B2, B1, B0 } +#define MATRIX_COL_PINS { C6, C7, D6, D7, B5, B6, F7, F6, F5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/i75/teensy2/rules.mk b/keyboards/40percentclub/i75/teensy2/rules.mk new file mode 100644 index 000000000..3fb7c7e5a --- /dev/null +++ b/keyboards/40percentclub/i75/teensy2/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = halfkay + + +# 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 diff --git a/keyboards/40percentclub/i75/teensy2/teensy2.c b/keyboards/40percentclub/i75/teensy2/teensy2.c new file mode 100644 index 000000000..28684e714 --- /dev/null +++ b/keyboards/40percentclub/i75/teensy2/teensy2.c @@ -0,0 +1,16 @@ +/* Copyright 2018 + * + * 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 . + */ +#include "i75.h" diff --git a/keyboards/40percentclub/i75/teensy2/teensy2.h b/keyboards/40percentclub/i75/teensy2/teensy2.h new file mode 100644 index 000000000..29394855a --- /dev/null +++ b/keyboards/40percentclub/i75/teensy2/teensy2.h @@ -0,0 +1,47 @@ +/* Copyright 2018 + * + * 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 . + */ + +#pragma once + +#include "i75.h" +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * 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. + */ +#define LAYOUT_ortho_5x15( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, \ + K16, K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, \ + K33, K34, K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, K64, K65, \ + K66, K67, K68, K70, K71, K72, K73, K74, K75, K76, K77, K78, K80, K81, K82 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K78 }, \ + { K80, K81, K82 } \ +} -- cgit v1.2.3 From 155e9310ff685f557287749bef2e02510538a6d9 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat, 15 Dec 2018 04:00:10 +0900 Subject: Make quantum/split_common/serial.[ch] configurable (#4419) * add temporary compile test shell script * add 'CONFIG_H += serial_backward_compatibility.h' into common_features.mk:SPLIT_KEYBOARD block * add quantum/split_common/serial_backward_compatibility.h SERIAL_PIN_PORT and other PIN define move to serial_backward_compatibility.h SERIAL_BACKLIT_START move to split_util.h * quantum/split_common/serial.c change to helix-serial.c style serial configuration * add temporary file quantum/split_common/split-keyboards-list.txt * add '#define SOFT_SERIAL_PIN D0' to keyboards/6lit/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/divergetm2/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/ergotravel/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/foobar/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/dactyl_manuform/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/qc60/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/handwired/xealous/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/iris/rev*/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/lets_split_eh/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/levinson/rev*/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/miniaxe/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/nyquist/rev?/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/quefrency/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/qwertyydox/config.h,keyboards/qwertyydox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/redox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/rorschach/rev1/config.h * remove '#define SOFT_SERIAL_PIN D0' from quantum/split_common/serial_backward_compatibility.h * remove temporary file quantum/split_common/split-keyboards-list.txt * remove temporary compile test shell script * Revert "remove temporary compile test shell script" This reverts commit 15b0021b4092127b8d8a21f572642ad3702b46d4. * update quantum/split_common/compile_split_test.sh for new keyboard test * add '#define SOFT_SERIAL_PIN D0' to keyboards/diverge3/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/40percentclub/25/config.h * remove temporary compile test shell script * update docs/config_options.md, quantum/template/avr/config.h * fix quantum/template/avr/config.h * fix typo docs/config_options.md --- keyboards/40percentclub/25/config.h | 2 ++ keyboards/40percentclub/6lit/config.h | 3 +++ keyboards/40percentclub/foobar/config.h | 3 +++ 3 files changed, 8 insertions(+) (limited to 'keyboards/40percentclub') diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h index 23b768e15..7fe59fcca 100644 --- a/keyboards/40percentclub/25/config.h +++ b/keyboards/40percentclub/25/config.h @@ -27,6 +27,8 @@ #define DESCRIPTION A split 50 key keyboard #define USE_SERIAL +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h index 8397818a6..940518f36 100644 --- a/keyboards/40percentclub/6lit/config.h +++ b/keyboards/40percentclub/6lit/config.h @@ -28,6 +28,9 @@ #define USE_SERIAL +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + /* Select hand configuration */ #define MASTER_LEFT //#define MASTER_RIGHT diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h index 89219c460..88075c456 100644 --- a/keyboards/40percentclub/foobar/config.h +++ b/keyboards/40percentclub/foobar/config.h @@ -28,6 +28,9 @@ #define USE_SERIAL +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + /* Select hand configuration */ #define MASTER_LEFT //#define MASTER_RIGHT -- cgit v1.2.3