From a713657980a247c2345cf87ec85ae3b8466b9a8f Mon Sep 17 00:00:00 2001 From: Sadek Baroudi Date: Sat, 24 Sep 2022 13:12:33 -0700 Subject: [PATCH] added ffkb v3, and converted ffkb to separate versions per keyboard --- keyboards/fingerpunch/ffkb_byomcu/config.h | 51 +-- .../fingerpunch/ffkb_byomcu/ffkb_byomcu.h | 37 +- keyboards/fingerpunch/ffkb_byomcu/v1/config.h | 69 ++++ .../fingerpunch/ffkb_byomcu/v1/fp_build.json | 27 ++ .../{ => v1}/keymaps/default/keymap.c | 0 .../keymaps/manna-harbour_miryoku/config.h | 0 .../keymaps/manna-harbour_miryoku/keymap.c | 0 .../{ => v1}/keymaps/sadekbaroudi/keymap.c | 0 .../ffkb_byomcu/{ => v1}/keymaps/via/keymap.c | 0 .../ffkb_byomcu/{ => v1}/keymaps/via/rules.mk | 0 .../ffkb_byomcu/{ => v1}/kle-via.json | 0 .../fingerpunch/ffkb_byomcu/v1/readme.md | 27 ++ keyboards/fingerpunch/ffkb_byomcu/v1/rules.mk | 64 +++ keyboards/fingerpunch/ffkb_byomcu/v1/v1.h | 34 ++ keyboards/fingerpunch/ffkb_byomcu/v2/config.h | 70 ++++ .../ffkb_byomcu/{ => v2}/fp_build.json | 0 .../ffkb_byomcu/v2/keymaps/default/keymap.c | 385 ++++++++++++++++++ .../v2/keymaps/manna-harbour_miryoku/config.h | 22 + .../v2/keymaps/manna-harbour_miryoku/keymap.c | 4 + .../v2/keymaps/sadekbaroudi/keymap.c | 348 ++++++++++++++++ .../ffkb_byomcu/v2/keymaps/via/keymap.c | 382 +++++++++++++++++ .../ffkb_byomcu/v2/keymaps/via/rules.mk | 1 + .../fingerpunch/ffkb_byomcu/v2/kle-via.json | 310 ++++++++++++++ .../ffkb_byomcu/{ => v2}/readme.md | 4 - .../fingerpunch/ffkb_byomcu/{ => v2}/rules.mk | 0 keyboards/fingerpunch/ffkb_byomcu/v2/v2.h | 44 ++ keyboards/fingerpunch/ffkb_byomcu/v3/config.h | 81 ++++ .../fingerpunch/ffkb_byomcu/v3/fp_build.json | 22 + .../fingerpunch/ffkb_byomcu/v3/halconf.h | 25 ++ .../ffkb_byomcu/v3/keymaps/default/keymap.c | 205 ++++++++++ .../v3/keymaps/manna-harbour_miryoku/config.h | 21 + .../v3/keymaps/manna-harbour_miryoku/keymap.c | 4 + .../v3/keymaps/sadekbaroudi/keymap.c | 96 +++++ .../ffkb_byomcu/v3/keymaps/via/keymap.c | 189 +++++++++ .../ffkb_byomcu/v3/keymaps/via/rules.mk | 1 + .../fingerpunch/ffkb_byomcu/v3/kle-via.json | 310 ++++++++++++++ .../ffkb_byomcu/v3/matrix_74hc595_spi.c | 150 +++++++ .../fingerpunch/ffkb_byomcu/v3/mcuconf.h | 25 ++ .../fingerpunch/ffkb_byomcu/v3/readme.md | 26 ++ keyboards/fingerpunch/ffkb_byomcu/v3/rules.mk | 69 ++++ keyboards/fingerpunch/ffkb_byomcu/v3/v3.h | 43 ++ keyboards/fingerpunch/ffkb_byomcu/via.json | 322 --------------- 42 files changed, 3064 insertions(+), 404 deletions(-) create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v1/config.h create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v1/fp_build.json rename keyboards/fingerpunch/ffkb_byomcu/{ => v1}/keymaps/default/keymap.c (100%) rename keyboards/fingerpunch/ffkb_byomcu/{ => v1}/keymaps/manna-harbour_miryoku/config.h (100%) rename keyboards/fingerpunch/ffkb_byomcu/{ => v1}/keymaps/manna-harbour_miryoku/keymap.c (100%) rename keyboards/fingerpunch/ffkb_byomcu/{ => v1}/keymaps/sadekbaroudi/keymap.c (100%) rename keyboards/fingerpunch/ffkb_byomcu/{ => v1}/keymaps/via/keymap.c (100%) rename keyboards/fingerpunch/ffkb_byomcu/{ => v1}/keymaps/via/rules.mk (100%) rename keyboards/fingerpunch/ffkb_byomcu/{ => v1}/kle-via.json (100%) create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v1/readme.md create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v1/rules.mk create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v1/v1.h create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v2/config.h rename keyboards/fingerpunch/ffkb_byomcu/{ => v2}/fp_build.json (100%) create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/default/keymap.c create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/manna-harbour_miryoku/config.h create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/manna-harbour_miryoku/keymap.c create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/sadekbaroudi/keymap.c create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/via/keymap.c create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/via/rules.mk create mode 100755 keyboards/fingerpunch/ffkb_byomcu/v2/kle-via.json rename keyboards/fingerpunch/ffkb_byomcu/{ => v2}/readme.md (89%) rename keyboards/fingerpunch/ffkb_byomcu/{ => v2}/rules.mk (100%) create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v2/v2.h create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/config.h create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/fp_build.json create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/halconf.h create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/default/keymap.c create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/manna-harbour_miryoku/config.h create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/manna-harbour_miryoku/keymap.c create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/sadekbaroudi/keymap.c create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/via/keymap.c create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/via/rules.mk create mode 100755 keyboards/fingerpunch/ffkb_byomcu/v3/kle-via.json create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/matrix_74hc595_spi.c create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/mcuconf.h create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/readme.md create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/rules.mk create mode 100644 keyboards/fingerpunch/ffkb_byomcu/v3/v3.h delete mode 100644 keyboards/fingerpunch/ffkb_byomcu/via.json diff --git a/keyboards/fingerpunch/ffkb_byomcu/config.h b/keyboards/fingerpunch/ffkb_byomcu/config.h index 00a4e96f0db7..390573943efc 100644 --- a/keyboards/fingerpunch/ffkb_byomcu/config.h +++ b/keyboards/fingerpunch/ffkb_byomcu/config.h @@ -20,23 +20,12 @@ along with this program. If not, see . /* USB Device descriptor parameter */ -#define DEVICE_VER 0x0001 +// #define DEVICE_VER 0x0001 // now defined in vx/config.h #define VENDOR_ID 0xFEFE #define PRODUCT_ID 0xFFBB #define MANUFACTURER sadekbaroudi #define PRODUCT sadekbaroudi ffkb_byomcu -/* key matrix size */ -/* Rows are doubled up */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 8 - -// wiring -#define MATRIX_ROW_PINS \ - { D2, F4, F5, F6, F7, B1 } -#define MATRIX_COL_PINS \ - { B5, B4, E6, D7, C6, D4, B2, B3 } - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -108,46 +97,10 @@ along with this program. If not, see . #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif -#define ENCODERS_PAD_A {D5, B6, D1} -#define ENCODERS_PAD_B {B7, F1, D0} - -#ifdef FP_EVQ_UNDER_PALMS -#define ENCODERS_A_REVERSE -#define ENCODERS_B_REVERSE -#endif - -#ifdef FP_EC11_UNDER_PALMS -#define ENCODERS_C_REVERSE -#endif - -#if defined(OLED_ENABLE) || defined(PIMORONI_TRACKBALL_ENABLE) -#undef ENCODERS_PAD_A -#define ENCODERS_PAD_A {D5, B6} -#undef ENCODERS_PAD_B -#define ENCODERS_PAD_B {B7, F1} -#endif - -#define ENCODER_RESOLUTION 2 - /* 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 -#ifdef PIMORONI_TRACKBALL_ENABLE -#define PIMORONI_TRACKBALL_ROTATE -#define PIMORONI_TRACKBALL_CLICK -#endif - -// cirque trackpad config -#define CIRQUE_PINNACLE_ADDR 0x2A -#define POINTING_DEVICE_ROTATION_90 -#define CIRQUE_PINNACLE_TAP_ENABLE -#define POINTING_DEVICE_TASK_THROTTLE_MS 5 -#define I2C1_CLOCK_SPEED 400000 -#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 - -// If using encoder type 2, uncomment this -// #define ENCODERS_B_REVERSE - +// For via/vial only #define DYNAMIC_KEYMAP_LAYER_COUNT 5 diff --git a/keyboards/fingerpunch/ffkb_byomcu/ffkb_byomcu.h b/keyboards/fingerpunch/ffkb_byomcu/ffkb_byomcu.h index e54dd52d8eea..fd9182c4a86e 100644 --- a/keyboards/fingerpunch/ffkb_byomcu/ffkb_byomcu.h +++ b/keyboards/fingerpunch/ffkb_byomcu/ffkb_byomcu.h @@ -1,4 +1,4 @@ -/* Copyright 2021 Sadek Baroudi +/* Copyright 2022 Sadek Baroudi * * 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 @@ -17,31 +17,10 @@ #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. - */ - -// 1-40 are the keyswitches, and 50 and 51 are the rotary encoders -#define LAYOUT_ffkb( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - K32, K34, K35, K36, K37, K38, K39, K3B, \ - K3A \ -) \ -{ \ - { K01, K02, K03, K04, K05, K06, K07, K08 }, \ - { K11, K12, K13, K14, K15, K16, K17, K18 }, \ - { K21, K22, K23, K24, K25, K26, K27, K28 }, \ - { KC_NO, KC_NO, K19, K2A, K0A, K1B, K2B, K0C }, \ - { KC_NO, K3A, K29, K09, K1A, K0B, K2C, K1C }, \ - { K3B, K32, K39, K34, K35, K36, K37, K38 } \ -} - - -// KC_NO, K32, KC_NO, K34, K35, K36, K37, K38 +#if defined(KEYBOARD_fingerpunch_ffkb_byomcu_v1) +# include "v1.h" +#elif defined(KEYBOARD_fingerpunch_ffkb_byomcu_v2) +# include "v2.h" +#elif defined(KEYBOARD_fingerpunch_ffkb_byomcu_v3) +# include "v3.h" +#endif \ No newline at end of file diff --git a/keyboards/fingerpunch/ffkb_byomcu/v1/config.h b/keyboards/fingerpunch/ffkb_byomcu/v1/config.h new file mode 100644 index 000000000000..dec8f017b1c5 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v1/config.h @@ -0,0 +1,69 @@ +/* +Copyright 2021 Sadek Baroudi + +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 DEVICE_VER 0x0001 + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 8 + +// wiring +#define MATRIX_ROW_PINS \ + { D2, F4, F5, F6, F7, B1 } +#define MATRIX_COL_PINS \ + { B5, B4, E6, D7, C6, D4, B2, B3 } + +#define ENCODERS_PAD_A {D5, B6, D1} +#define ENCODERS_PAD_B {B7, F1, D0} + +#ifdef FP_EVQ_UNDER_PALMS +#define ENCODERS_A_REVERSE +#define ENCODERS_B_REVERSE +#endif + +#ifdef FP_EC11_UNDER_PALMS +#define ENCODERS_C_REVERSE +#endif + +#if defined(OLED_ENABLE) || defined(PIMORONI_TRACKBALL_ENABLE) +#undef ENCODERS_PAD_A +#define ENCODERS_PAD_A {D5, B6} +#undef ENCODERS_PAD_B +#define ENCODERS_PAD_B {B7, F1} +#endif + +#define ENCODER_RESOLUTION 2 + +#ifdef PIMORONI_TRACKBALL_ENABLE +#define PIMORONI_TRACKBALL_ROTATE +#define PIMORONI_TRACKBALL_CLICK +#endif + +#ifdef CIRQUE_ENABLE + // cirque trackpad config + #define CIRQUE_PINNACLE_ADDR 0x2A + #define POINTING_DEVICE_ROTATION_90 + #define CIRQUE_PINNACLE_TAP_ENABLE + #define POINTING_DEVICE_TASK_THROTTLE_MS 5 + #define I2C1_CLOCK_SPEED 400000 + #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 +#endif \ No newline at end of file diff --git a/keyboards/fingerpunch/ffkb_byomcu/v1/fp_build.json b/keyboards/fingerpunch/ffkb_byomcu/v1/fp_build.json new file mode 100644 index 000000000000..38ef3f0c4240 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v1/fp_build.json @@ -0,0 +1,27 @@ +[ + { + "type" : "one-of", + "names" : [ "RGBLIGHT_ENABLE", "RGB_MATRIX_ENABLE" ], + "user_input": "No RGB, RGB light, RGB matrix?" + }, + { + "type" : "single", + "name" : "OLED_ENABLE", + "user_input": "Do you have an OLED?" + }, + { + "type" : "single", + "name" : "FP_EC11_CENTER", + "user_input": "Do you have an EC11 in the center?" + }, + { + "type" : "one-of", + "names" : [ "FP_EC11_UNDER_PALMS", "FP_EVQ_UNDER_PALMS" ], + "user_input": "No under palm encoders, EC11, or EVQ?" + }, + { + "type" : "single", + "name" : "PIMORONI_TRACKBALL_ENABLE", + "user_input": "Do you have a pimoroni trackball?" + } +] \ No newline at end of file diff --git a/keyboards/fingerpunch/ffkb_byomcu/keymaps/default/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/default/keymap.c similarity index 100% rename from keyboards/fingerpunch/ffkb_byomcu/keymaps/default/keymap.c rename to keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/default/keymap.c diff --git a/keyboards/fingerpunch/ffkb_byomcu/keymaps/manna-harbour_miryoku/config.h b/keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/manna-harbour_miryoku/config.h similarity index 100% rename from keyboards/fingerpunch/ffkb_byomcu/keymaps/manna-harbour_miryoku/config.h rename to keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/manna-harbour_miryoku/config.h diff --git a/keyboards/fingerpunch/ffkb_byomcu/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/manna-harbour_miryoku/keymap.c similarity index 100% rename from keyboards/fingerpunch/ffkb_byomcu/keymaps/manna-harbour_miryoku/keymap.c rename to keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/manna-harbour_miryoku/keymap.c diff --git a/keyboards/fingerpunch/ffkb_byomcu/keymaps/sadekbaroudi/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/sadekbaroudi/keymap.c similarity index 100% rename from keyboards/fingerpunch/ffkb_byomcu/keymaps/sadekbaroudi/keymap.c rename to keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/sadekbaroudi/keymap.c diff --git a/keyboards/fingerpunch/ffkb_byomcu/keymaps/via/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/via/keymap.c similarity index 100% rename from keyboards/fingerpunch/ffkb_byomcu/keymaps/via/keymap.c rename to keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/via/keymap.c diff --git a/keyboards/fingerpunch/ffkb_byomcu/keymaps/via/rules.mk b/keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/via/rules.mk similarity index 100% rename from keyboards/fingerpunch/ffkb_byomcu/keymaps/via/rules.mk rename to keyboards/fingerpunch/ffkb_byomcu/v1/keymaps/via/rules.mk diff --git a/keyboards/fingerpunch/ffkb_byomcu/kle-via.json b/keyboards/fingerpunch/ffkb_byomcu/v1/kle-via.json similarity index 100% rename from keyboards/fingerpunch/ffkb_byomcu/kle-via.json rename to keyboards/fingerpunch/ffkb_byomcu/v1/kle-via.json diff --git a/keyboards/fingerpunch/ffkb_byomcu/v1/readme.md b/keyboards/fingerpunch/ffkb_byomcu/v1/readme.md new file mode 100644 index 000000000000..cb98de7f3698 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v1/readme.md @@ -0,0 +1,27 @@ +# ffkb + +An ergonomic 30% keyboard + +* Keyboard Maintainer: [sadekbaroudi](https://github.com/sadekbaroudi) + +Faux fox keyboard (ffkb) + +Make example for this keyboard (after setting up your build environment): +``` + make fingerpunch/ffkb_byomcu:default RGBLIGHT_ENABLE=yes FP_EC11_UNDER_PALMS=yes CIRQUE_ENABLE=yes OLED_ENABLE=yes +``` + +Don't forget to add ```CONVERT_TO=stemcell``` if using a stemcell controller. + +Options are: +``` + RGBLIGHT_ENABLE=yes + RGB_MATRIX_ENABLE=yes + OLED_ENABLE=yes + FP_EC11_CENTER=yes + FP_EC11_UNDER_PALMS=yes + FP_EVQ_UNDER_PALMS=yes + PIMORONI_TRACKBALL_ENABLE=yes +``` + +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/fingerpunch/ffkb_byomcu/v1/rules.mk b/keyboards/fingerpunch/ffkb_byomcu/v1/rules.mk new file mode 100644 index 000000000000..551e7b5921e6 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v1/rules.mk @@ -0,0 +1,64 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # 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 + +# Either do RGBLIGHT_ENABLE or RGB_MATRIX_ENABLE and RGB_MATRIX_DRIVER +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = no +RGB_MATRIX_DRIVER = WS2812 + +MIDI_ENABLE = no # MIDI support +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 +ENCODER_ENABLE = no +OLED_ENABLE = no # this can be yes or no depending on if you have an OLED +EXTRAFLAGS += -flto # macros disabled, as a lot of barobord features require more space, can move this line into all the individual rules.mk, only where needed + # for instance, if you build "no_features", it's very unlikely you'll need to disable macros +MOUSEKEY_ENABLE = no + +PIMORONI_TRACKBALL_ENABLE = no + +ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes) + POINTING_DEVICE_ENABLE := yes + POINTING_DEVICE_DRIVER := pimoroni_trackball + OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE +endif + +ifeq ($(strip $(FP_EC11_CENTER)), yes) + ENCODER_ENABLE := yes + OPT_DEFS += -DFP_EC11_CENTER +endif + +ifeq ($(strip $(FP_EC11_UNDER_PALMS)), yes) + ENCODER_ENABLE := yes + OPT_DEFS += -DFP_EC11_UNDER_PALMS +endif + +ifeq ($(strip $(FP_EVQ_UNDER_PALMS)), yes) + ENCODER_ENABLE := yes + OPT_DEFS += -DFP_EVQ_UNDER_PALMS +endif \ No newline at end of file diff --git a/keyboards/fingerpunch/ffkb_byomcu/v1/v1.h b/keyboards/fingerpunch/ffkb_byomcu/v1/v1.h new file mode 100644 index 000000000000..4b03fd79b511 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v1/v1.h @@ -0,0 +1,34 @@ +/* Copyright 2021-2022 Sadek Baroudi + * + * 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 LAYOUT_ffkb( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K32, K34, K35, K36, K37, K38, K39, K3B, \ + K3A \ +) \ +{ \ + { K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { KC_NO, KC_NO, K19, K2A, K0A, K1B, K2B, K0C }, \ + { KC_NO, K3A, K29, K09, K1A, K0B, K2C, K1C }, \ + { K3B, K32, K39, K34, K35, K36, K37, K38 } \ +} diff --git a/keyboards/fingerpunch/ffkb_byomcu/v2/config.h b/keyboards/fingerpunch/ffkb_byomcu/v2/config.h new file mode 100644 index 000000000000..9fe45dc39dcc --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v2/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2021 Sadek Baroudi + +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 DEVICE_VER 0x0002 + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 8 + +// wiring +#define MATRIX_ROW_PINS \ + { D2, F4, F5, F6, F7, B1 } +#define MATRIX_COL_PINS \ + { B5, B4, E6, D7, C6, D4, B2, B3 } + +#define ENCODERS_PAD_A {D5, B6, D1} +#define ENCODERS_PAD_B {B7, F1, D0} + +#ifdef FP_EVQ_UNDER_PALMS +#define ENCODERS_A_REVERSE +#define ENCODERS_B_REVERSE +#endif + +#ifdef FP_EC11_UNDER_PALMS +#define ENCODERS_C_REVERSE +#endif + +#if defined(OLED_ENABLE) || defined(PIMORONI_TRACKBALL_ENABLE) +#undef ENCODERS_PAD_A +#define ENCODERS_PAD_A {D5, B6} +#undef ENCODERS_PAD_B +#define ENCODERS_PAD_B {B7, F1} +#endif + +#define ENCODER_RESOLUTION 2 + +#ifdef PIMORONI_TRACKBALL_ENABLE +#define PIMORONI_TRACKBALL_ROTATE +#define PIMORONI_TRACKBALL_CLICK +#endif + +#ifdef CIRQUE_ENABLE + // cirque trackpad config + #define CIRQUE_PINNACLE_ADDR 0x2A + #define POINTING_DEVICE_ROTATION_90 + #define CIRQUE_PINNACLE_TAP_ENABLE + #define POINTING_DEVICE_TASK_THROTTLE_MS 5 + #define I2C1_CLOCK_SPEED 400000 + #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 +#endif \ No newline at end of file diff --git a/keyboards/fingerpunch/ffkb_byomcu/fp_build.json b/keyboards/fingerpunch/ffkb_byomcu/v2/fp_build.json similarity index 100% rename from keyboards/fingerpunch/ffkb_byomcu/fp_build.json rename to keyboards/fingerpunch/ffkb_byomcu/v2/fp_build.json diff --git a/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/default/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/default/keymap.c new file mode 100644 index 000000000000..94bc199cfd00 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/default/keymap.c @@ -0,0 +1,385 @@ +#include QMK_KEYBOARD_H + +#ifdef ENCODER_ENABLE +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; +#endif + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P |BckSpc| + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | TAB | A | S | D | F | G | |ALTTAB| | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | SFT | Z | X | C | V | B | | N | M | , | . | / | SFT | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +// Default config uses home row mods. So hold each of the keys on the home row to use ctrl, gui, alt, or shift +[_QWERTY] = LAYOUT_ffkb( + 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_TAB, LCTL_T(KC_A), LGUI_T(KC_S), LALT_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, RSFT_T(KC_J), RALT_T(KC_K), RGUI_T(KC_L), RCTL_T(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_RSFT, + KC_MUTE, KC_BSLS, KC_ENT, LOWER, RAISE, KC_SPC, KC_DEL, LCTL(KC_BSPC), + LALT(KC_TAB) +), + +/* Colemak-dh + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P |BckSpc| + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | TAB | A | S | D | F | G | |ALTTAB| | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | SFT | Z | X | C | V | B | | N | M | , | . | / | SFT | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +// Default config uses home row mods. So hold each of the keys on the home row to use ctrl, gui, alt, or shift +[_COLEMAK] = LAYOUT_ffkb( + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, LCTL_T(KC_A), LGUI_T(KC_R), LALT_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, RSFT_T(KC_N), RALT_T(KC_E), RGUI_T(KC_I), RCTL_T(KC_O), KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MUTE, KC_BSLS, KC_ENT, LOWER, RAISE, KC_SPC, KC_DEL, LCTL(KC_BSPC), + LALT(KC_TAB) +), + + +/* Raise + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | Home | Left | Down | Up | Right| End | |ALTTAB| | | - | = | [ | ] | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | | PgDn | PgUp | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +[_RAISE] = LAYOUT_ffkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TAB, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +), + + + +/* Raise + * + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | | | | | | | |ALTTAB| | | _ | + | { | } | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | Caps| | | | | | | | | | | " | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +[_RAISE] = LAYOUT_ffkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TAB, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +), +/* Lower + * + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | | | | | | | |ALTTAB| | | _ | + | { | } | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | Caps| | | | | | | | | | | " | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ +[_LOWER] = LAYOUT_ffkb( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +), + +/* Adjust (Lower + Raise) + + * ,-----------------------------------------. ,-----------------------------------------. + * | | RGB_T| RGB_R| RGB_F| |QWERTY| | F1 | F2 | F3 | F4 | F5 | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | | SPD_I| HUE_I| SAT_I| VAL_I|COLEMK| |ALTTAB| | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | SPD_D| HUE_D| SAT_D| VAL_D| | | F11 | F12 | | | Reset| | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ +[_ADJUST] = LAYOUT_ffkb( + _______, RGB_TOG, RGB_RMOD, RGB_MOD, _______, TO(_QWERTY), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, TO(_COLEMAK), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_F11, KC_F12, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef ENCODER_ENABLE + +void press_super_alt_tab(bool shift) { + if (shift) { + register_code(KC_LSHIFT); + } + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + tap_code(KC_TAB); + if (shift) { + unregister_code(KC_LSHIFT); + } +} + +bool encoder_update_user(uint8_t index, bool clockwise) { + // default behavior if undefined + if (index == 0) { + // Conditional to reverse the direction of encoder number 1 + // The reason I have this is that for some of my boards, it supports two different types of encoders, and they may differ in direction + #ifdef ENCODERS_A_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + // Conditional to reverse the direction of encoder number 1 + // The reason I have this is that for some of my boards, it supports two different types of encoders, and they may differ in direction + #ifdef ENCODERS_B_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + tap_code16(C(KC_RGHT)); + } + else{ + tap_code16(C(KC_LEFT)); + } + } + else if (index == 2) { + #ifdef ENCODERS_C_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + press_super_alt_tab(true); + } else { + press_super_alt_tab(false); + } + } + + return true; +} +#endif + +#ifdef OLED_ENABLE + + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + + +// Commenting out logo as it takes up a lot of space :( +static void render_logo(void) { + // ffkb logo, 128x64px + static const char PROGMEM ffkb_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xe0, 0xc0, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xc0, 0xe0, 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0x02, 0x02, 0x02, 0x82, 0x06, 0x0e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfe, 0xff, 0xff, 0x0f, 0x07, 0x0f, 0x1f, + 0x3e, 0x7c, 0xf8, 0xf0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xe0, 0xc0, 0xe0, 0xf0, 0xf8, 0x7c, 0x3e, + 0x1f, 0x0f, 0x07, 0x0f, 0xff, 0xff, 0xfe, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x02, 0x82, + 0x82, 0xc2, 0xe2, 0xde, 0x0e, 0x0e, 0x06, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x02, 0x02, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xe0, 0xf8, 0xfc, 0x7e, + 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x07, 0x0f, 0x1f, 0x3f, + 0x7e, 0xfc, 0xf8, 0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x1f, + 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xf0, 0xf8, 0xff, 0x7f, 0x1f, 0x87, 0x83, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x83, 0x87, 0x1f, 0x7f, 0xff, 0xf8, 0xf0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x04, 0x04, + 0x04, 0x05, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, + 0xe0, 0x20, 0x20, 0x20, 0x20, 0x60, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x18, 0x3c, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xef, 0xcf, 0x8f, 0x87, 0x07, 0x07, 0x07, 0x07, + 0x07, 0xe7, 0xe7, 0xe7, 0xc7, 0x07, 0x07, 0x0f, 0x3f, 0xfe, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xfe, 0x3f, 0x0f, 0x07, 0x07, 0xc7, 0xe7, 0xe7, 0xe7, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x87, 0x8f, 0xcf, 0xef, 0xef, 0xff, 0xff, 0x7f, 0x3e, 0x3c, 0x18, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x20, 0x20, + 0x60, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x20, 0x20, 0x70, 0xf8, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x1f, 0x1e, 0x3e, 0x7c, + 0xf8, 0xf1, 0xf1, 0xe1, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe1, 0xf1, 0xf1, 0xf8, + 0x7c, 0x3e, 0x1e, 0x1f, 0x0f, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0x20, + 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, + 0x7f, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7e, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3c, 0x3c, + 0x3c, 0x3c, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7e, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, + 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0e, + 0x0e, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + +}; + oled_write_raw_P(ffkb_logo, sizeof(ffkb_logo)); + +} + +/* +static void render_status(void) { + oled_write_P(PSTR(" Layer: "), false); + switch (get_highest_layer(layer_state|default_layer_state)) { + case _ALPHA_ALT: + oled_write_P(PSTR("Alphalt "), false); + break; + case _ALPHA: + oled_write_P(PSTR("Alpha "), false); + break; + case _NAVIGATION: + oled_write_P(PSTR("Nav "), false); + break; + case _SYMBOLS: + oled_write_P(PSTR("Symbols "), false); + break; + case _FUNCTION: + oled_write_P(PSTR("Function "), false); + break; + case _MEDIA: + oled_write_P(PSTR("Media "), false); + break; + case _MOUSE: + oled_write_P(PSTR("Mouse "), false); + break; + default: + oled_write_P(PSTR("Unkn "), false); + break; + } + + // // Write host Keyboard LED Status to OLEDs + // led_t led_usb_state = host_keyboard_led_state(); + // oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + // oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + // oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); + + // ffkb logo, 128x48px + static const char ffkb_logo_small [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x40, 0x40, + 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0x40, 0x40, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xfe, 0x8e, 0xdc, 0xf0, 0x70, 0x60, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x70, 0xf0, 0xd8, 0x9c, 0x9e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x40, 0x40, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, + 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0x40, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x10, + 0x18, 0x3c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x10, 0x10, 0x18, 0x3c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x30, 0x78, 0x7c, + 0xff, 0xd7, 0x9b, 0x18, 0x78, 0x78, 0x18, 0x30, 0x70, 0xe0, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0x30, + 0x18, 0x58, 0x78, 0x18, 0x99, 0x9b, 0xf7, 0xfc, 0x78, 0x30, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x38, 0x78, 0xfc, 0xfc, 0xfe, 0xff, 0xf8, 0xf0, + 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x10, 0x10, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xe7, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x03, 0x07, 0x0e, 0x0c, 0x18, 0x3f, 0x7f, 0x68, 0x68, 0x3f, 0x3f, 0x0c, + 0x0c, 0x06, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x08, 0x00, 0x01, 0x0b, 0x0f, 0x0f, 0x0f, 0x0f, + 0x0f, 0x0f, 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0x08, 0x08, 0x0c, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(ffkb_logo_small, sizeof(ffkb_logo_small)); +} +*/ + +bool oled_task_user(void) { + // If you don't want to display the logo, switch + if (false) { + //render_status(); + } else if (true) { + render_logo(); + } else { + //render_logo_text(); + } + return true; +} + +#endif diff --git a/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/manna-harbour_miryoku/config.h b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/manna-harbour_miryoku/config.h new file mode 100644 index 000000000000..4885988f2bed --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/manna-harbour_miryoku/config.h @@ -0,0 +1,22 @@ +// Copyright 2022 Manna Harbour +// https://github.com/manna-harbour/miryoku + +// 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 + +#define XXX KC_NO + +#define LAYOUT_miryoku( \ + 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, \ + N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \ +) \ +LAYOUT_ffkb( \ +XXX, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, XXX, \ +XXX, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, XXX, \ +XXX, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, XXX, \ + XXX, K32, K33, K34, K35, K36, K37, XXX, \ + XXX \ +) diff --git a/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/manna-harbour_miryoku/keymap.c new file mode 100644 index 000000000000..fadfdc83651a --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/manna-harbour_miryoku/keymap.c @@ -0,0 +1,4 @@ +// Copyright 2022 Manna Harbour +// https://github.com/manna-harbour/miryoku + +// 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 . diff --git a/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/sadekbaroudi/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/sadekbaroudi/keymap.c new file mode 100644 index 000000000000..0f97d6f69f7b --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/sadekbaroudi/keymap.c @@ -0,0 +1,348 @@ +/* Copyright 2021 Sadek Baroudi + * + * 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 "sadekbaroudi.h" +#ifdef PIMORONI_TRACKBALL_ENABLE +#include "drivers/sensors/pimoroni_trackball.h" +#include "pointing_device.h" +#include "color.h" +#endif +#include QMK_KEYBOARD_H + +/* + * The `LAYOUT_ffkb_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg ALPHA_ALT, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + +// clang-format off +#define LAYOUT_ffkb_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ + K33, K34, K35, K36, K37, K38 \ + ) \ + LAYOUT_wrapper( \ + KC_MS_BTN3, K01, K02, K03, LT(_FUNCTION, K04), K05, K06, LT(_FUNCTION, K07), K08, K09, K0A, KC_BSLS, \ + KC_MS_BTN1, LCTL_T(K11), LGUI_T(K12), LALT_T(K13), LSFT_T(K14), K15, LT(_MOUSE, K16), RSFT_T(K17), RALT_T(K18), RGUI_T(K19), RCTL_T(K1A), LCTL(KC_V), \ + KC_MS_BTN2, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, S_ALT_TAB, \ + KC_MUTE, K33, LT(_NAVIGATION,K34), LT(_FUNCTION,K35), LT(_MEDIA,K36), LT(_SYMBOLS,K37), K38, LCTL(KC_BSPC), \ + N_DEL_LINE \ + ) + +/* Re-pass though to allow templates to be used */ +#define LAYOUT_ffkb_byomcu_base_wrapper(...) LAYOUT_ffkb_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_ALPHA_ALT] = LAYOUT_ffkb_byomcu_base_wrapper( + _________________ALPHA_ALT_L1_________________, _________________ALPHA_ALT_R1_________________, + _________________ALPHA_ALT_L2_________________, _________________ALPHA_ALT_R2_________________, + _________________ALPHA_ALT_L3_________________, _________________ALPHA_ALT_R3_________________, + __ALPHA_ALT_THUMBS_6__ + ), + + [_ALPHA] = LAYOUT_ffkb_byomcu_base_wrapper( + __________________ALPHA_L1____________________, __________________ALPHA_R1____________________, + __________________ALPHA_L2____________________, __________________ALPHA_R2____________________, + __________________ALPHA_L3____________________, __________________ALPHA_R3____________________, + __ALPHA_THUMBS_6__ + ), + + [_NAVIGATION] = LAYOUT_wrapper( + _______, ________________NAVIGATION_1_______________, _________________NUMPAD_1__________________, _______, + _______, ________________NAVIGATION_2_______________, _________________NUMPAD_2__________________, _______, + _______, ________________NAVIGATION_3_______________, _________________NUMPAD_3__________________, _______, + _______, _______, _______, KC_TAB, KC_BSPC, KC_SPACE, KC_DOT, _______, + _______ + ), + + [_SYMBOLS] = LAYOUT_wrapper( + _______, ________________SYMBOLS_L1_________________, ________________SYMBOLS_R1_________________, _______, + _______, ________________SYMBOLS_L2_________________, ________________SYMBOLS_R2_________________, _______, + _______, ________________SYMBOLS_L3_________________, ________________SYMBOLS_R3_________________, _______, + _______, _______, KC_ENT, KC_DEL, KC_BSPC, _______, _______, _______, + _______ + ), + + [_FUNCTION] = LAYOUT_wrapper( + _______, ________________SHIFTNAV_1_________________, ________________FUNCTION_1_________________, _______, + _______, ________________SHIFTNAV_2_________________, ________________FUNCTION_2_________________, _______, + _______, ________________SHIFTNAV_3_________________, ________________FUNCTION_3_________________, _______, + _______, _______, _______, _______, N_DEL_LINE, KC_SPACE, _______, _______, + _______ + ), + + [_MEDIA] = LAYOUT_wrapper( + _______, ___________________RGB_1___________________, _________________MACROS_1__________________, _______, + _______, ___________________RGB_2___________________, _________________MACROS_2__________________, _______, + _______, ___________________RGB_3___________________, _________________MACROS_3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ + ), + + [_MOUSE] = LAYOUT_wrapper( + _______, __________________MOUSE_1__________________, ___________________BLANK___________________, _______, + _______, __________________MOUSE_2__________________, ___________________BLANK___________________, _______, + _______, __________________MOUSE_3__________________, ___________________BLANK___________________, _______, + _______, _______, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN3, KC_MS_BTN2, _______, _______, + _______ + ) +}; + + +#ifdef OLED_ENABLE + + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + + +static void render_logo(void) { + // ffkb logo, 128x32px + static const char PROGMEM ffkb_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0x10, 0x10, 0x10, 0x90, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0x3c, 0x3c, 0x38, 0x70, + 0x70, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0x70, + 0x70, 0x38, 0x3c, 0x3c, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x10, 0x00, + 0x80, 0x90, 0xd0, 0xf0, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, + 0x3f, 0x21, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe7, 0xff, 0x7f, 0x7f, 0xbc, 0x9e, 0x8e, 0x8f, + 0x87, 0x87, 0x83, 0x83, 0x81, 0x81, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x81, 0x81, 0x81, 0x83, 0x83, 0x87, 0x87, + 0x8f, 0x8e, 0x9e, 0xbc, 0x7f, 0x7f, 0xff, 0xe7, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x23, 0x07, + 0x0f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3e, 0x3c, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, + 0xfc, 0x44, 0x44, 0x44, 0xe4, 0x0c, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x06, 0x06, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1b, 0x3b, 0x3b, 0x73, 0x73, 0x73, 0xe3, + 0xe3, 0xdf, 0xdf, 0xdf, 0x8b, 0x83, 0x03, 0x03, 0x07, 0x1f, 0xfe, 0xfc, 0xf8, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0xe0, 0xf8, 0xfc, 0xfe, 0x1f, 0x07, 0x03, 0x03, 0x83, 0x8b, 0xdf, 0xdf, 0xdf, 0xe3, + 0xe3, 0x73, 0x73, 0x73, 0x3b, 0x3b, 0x1b, 0x1f, 0x1f, 0x0f, 0x0f, 0x0f, 0x07, 0x06, 0x06, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x44, 0x44, + 0x44, 0xfc, 0xfc, 0xfc, 0xfc, 0xf8, 0xb8, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x0e, 0x1f, 0x3f, 0x3f, 0x3f, 0x36, 0x36, + 0x36, 0x36, 0x3f, 0x3f, 0x3f, 0x1f, 0x0e, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x08, 0x08, + 0x08, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + // ffkb logo, 128x64px + // static const char PROGMEM ffkb_logo[] = { + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xe0, 0xc0, 0x80, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x80, 0xc0, 0xe0, 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + // 0xfe, 0x02, 0x02, 0x02, 0x82, 0x06, 0x0e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfe, 0xff, 0xff, 0x0f, 0x07, 0x0f, 0x1f, + // 0x3e, 0x7c, 0xf8, 0xf0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + // 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xe0, 0xc0, 0xe0, 0xf0, 0xf8, 0x7c, 0x3e, + // 0x1f, 0x0f, 0x07, 0x0f, 0xff, 0xff, 0xfe, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x02, 0x82, + // 0x82, 0xc2, 0xe2, 0xde, 0x0e, 0x0e, 0x06, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + // 0xff, 0x02, 0x02, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xe0, 0xf8, 0xfc, 0x7e, + // 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x07, 0x0f, 0x1f, 0x3f, + // 0x7e, 0xfc, 0xf8, 0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x1f, + // 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + // 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xf0, 0xf8, 0xff, 0x7f, 0x1f, 0x87, 0x83, 0x80, 0x80, + // 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + // 0x80, 0x80, 0x83, 0x87, 0x1f, 0x7f, 0xff, 0xf8, 0xf0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x04, 0x04, + // 0x04, 0x05, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, + // 0xe0, 0x20, 0x20, 0x20, 0x20, 0x60, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x08, 0x18, 0x3c, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xef, 0xcf, 0x8f, 0x87, 0x07, 0x07, 0x07, 0x07, + // 0x07, 0xe7, 0xe7, 0xe7, 0xc7, 0x07, 0x07, 0x0f, 0x3f, 0xfe, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xfe, 0x3f, 0x0f, 0x07, 0x07, 0xc7, 0xe7, 0xe7, 0xe7, 0x07, + // 0x07, 0x07, 0x07, 0x07, 0x87, 0x8f, 0xcf, 0xef, 0xef, 0xff, 0xff, 0x7f, 0x3e, 0x3c, 0x18, 0x08, + // 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x20, 0x20, + // 0x60, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + // 0xff, 0x20, 0x20, 0x70, 0xf8, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x1f, 0x1e, 0x3e, 0x7c, + // 0xf8, 0xf1, 0xf1, 0xe1, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, + // 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe1, 0xf1, 0xf1, 0xf8, + // 0x7c, 0x3e, 0x1e, 0x1f, 0x0f, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0x20, + // 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, + // 0x7f, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7e, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3c, 0x3c, + // 0x3c, 0x3c, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7e, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, + // 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0e, + // 0x0e, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + // }; + oled_write_raw_P(ffkb_logo, sizeof(ffkb_logo)); + +} + + +/* +static void render_status(void) { + oled_write_P(PSTR(" Layer: "), false); + switch (get_highest_layer(layer_state|default_layer_state)) { + case _ALPHA_ALT: + oled_write_P(PSTR("Alphalt "), false); + break; + case _ALPHA: + oled_write_P(PSTR("Alpha "), false); + break; + case _NAVIGATION: + oled_write_P(PSTR("Nav "), false); + break; + case _SYMBOLS: + oled_write_P(PSTR("Symbols "), false); + break; + case _FUNCTION: + oled_write_P(PSTR("Function "), false); + break; + case _MEDIA: + oled_write_P(PSTR("Media "), false); + break; + case _MOUSE: + oled_write_P(PSTR("Mouse "), false); + break; + default: + oled_write_P(PSTR("Unkn "), false); + break; + } + + // // Write host Keyboard LED Status to OLEDs + // led_t led_usb_state = host_keyboard_led_state(); + // oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + // oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + // oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); + + // ffkb logo, 128x48px + static const char ffkb_logo_small [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x40, 0x40, + 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0x40, 0x40, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xfe, 0x8e, 0xdc, 0xf0, 0x70, 0x60, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x70, 0xf0, 0xd8, 0x9c, 0x9e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x40, 0x40, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, + 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0x40, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x10, + 0x18, 0x3c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x10, 0x10, 0x18, 0x3c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x30, 0x78, 0x7c, + 0xff, 0xd7, 0x9b, 0x18, 0x78, 0x78, 0x18, 0x30, 0x70, 0xe0, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0x30, + 0x18, 0x58, 0x78, 0x18, 0x99, 0x9b, 0xf7, 0xfc, 0x78, 0x30, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x38, 0x78, 0xfc, 0xfc, 0xfe, 0xff, 0xf8, 0xf0, + 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x10, 0x10, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xe7, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x03, 0x07, 0x0e, 0x0c, 0x18, 0x3f, 0x7f, 0x68, 0x68, 0x3f, 0x3f, 0x0c, + 0x0c, 0x06, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x08, 0x00, 0x01, 0x0b, 0x0f, 0x0f, 0x0f, 0x0f, + 0x0f, 0x0f, 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0x08, 0x08, 0x0c, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(ffkb_logo_small, sizeof(ffkb_logo_small)); +} +*/ + +/* +static void render_logo_text(void) { + oled_write_P(PSTR("ffkb"), false); +} +*/ + +bool oled_task_user(void) { + // If you don't want to display the logo, switch + if (false) { + //render_status(); + } else if (true) { + render_logo(); + } else { + //render_logo_text(); + } + return true; +} + +#endif + + +#if !defined(RGBLIGHT_ENABLE) && defined(PIMORONI_TRACKBALL_ENABLE) +layer_state_t layer_state_set_keymap(layer_state_t state) { + switch (get_highest_layer(state)) { + case _ALPHA_ALT: + if (is_caps_lock_on) { + pimoroni_trackball_set_rgbw(RGB_CYAN, 0x00); + } else { + pimoroni_trackball_set_rgbw(RGB_BLUE, 0x00); + } + break; + case _NAVIGATION: + pimoroni_trackball_set_rgbw(RGB_GREEN, 0x00); + break; + case _SYMBOLS: + pimoroni_trackball_set_rgbw(RGB_PURPLE, 0x00); + break; + case _FUNCTION: + pimoroni_trackball_set_rgbw(RGB_YELLOW, 0x00); + break; + case _MEDIA: + pimoroni_trackball_set_rgbw(RGB_ORANGE, 0x00); + break; + case _MOUSE: + pimoroni_trackball_set_rgbw(RGB_WHITE, 0x00); + break; + default: // for any other layers, or the default layer + if (is_caps_lock_on) { + pimoroni_trackball_set_rgbw(RGB_CYAN, 0x00); + } else { + pimoroni_trackball_set_rgbw(RGB_BLUE, 0x00); + } + break; + } + return state; +} +#endif diff --git a/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/via/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/via/keymap.c new file mode 100644 index 000000000000..4f76efda9406 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/via/keymap.c @@ -0,0 +1,382 @@ +#include QMK_KEYBOARD_H + +#ifdef ENCODER_ENABLE +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; +#endif + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P |BckSpc| + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | TAB | A | S | D | F | G | |ALTTAB| | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | SFT | Z | X | C | V | B | | N | M | , | . | / | SFT | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +// Default config uses home row mods. So hold each of the keys on the home row to use ctrl, gui, alt, or shift +[_QWERTY] = LAYOUT_ffkb( + 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_TAB, LCTL_T(KC_A), LGUI_T(KC_S), LALT_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, RSFT_T(KC_J), RALT_T(KC_K), RGUI_T(KC_L), RCTL_T(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_RSFT, + KC_MUTE, KC_BSLS, KC_ENT, LOWER, RAISE, KC_SPC, KC_DEL, LCTL(KC_BSPC), + LALT(KC_TAB) +), + +/* Colemak-dh + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P |BckSpc| + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | TAB | A | S | D | F | G | |ALTTAB| | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | SFT | Z | X | C | V | B | | N | M | , | . | / | SFT | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +// Default config uses home row mods. So hold each of the keys on the home row to use ctrl, gui, alt, or shift +[_COLEMAK] = LAYOUT_ffkb( + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, LCTL_T(KC_A), LGUI_T(KC_R), LALT_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, RSFT_T(KC_N), RALT_T(KC_E), RGUI_T(KC_I), RCTL_T(KC_O), KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MUTE, KC_BSLS, KC_ENT, LOWER, RAISE, KC_SPC, KC_DEL, LCTL(KC_BSPC), + LALT(KC_TAB) +), + + +/* Raise + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | Home | Left | Down | Up | Right| End | |ALTTAB| | | - | = | [ | ] | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | | PgDn | PgUp | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +[_RAISE] = LAYOUT_ffkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TAB, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +), + + + +/* Raise + * + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | | | | | | | |ALTTAB| | | _ | + | { | } | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | Caps| | | | | | | | | | | " | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +[_RAISE] = LAYOUT_ffkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TAB, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +), +/* Lower + * + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | | | | | | | |ALTTAB| | | _ | + | { | } | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | Caps| | | | | | | | | | | " | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ +[_LOWER] = LAYOUT_ffkb( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +), + +/* Adjust (Lower + Raise) + + * ,-----------------------------------------. ,-----------------------------------------. + * | | RGB_T| RGB_R| RGB_F| |QWERTY| | F1 | F2 | F3 | F4 | F5 | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | | SPD_I| HUE_I| SAT_I| VAL_I|COLEMK| |ALTTAB| | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | SPD_D| HUE_D| SAT_D| VAL_D| | | F11 | F12 | | | Reset| | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ +[_ADJUST] = LAYOUT_ffkb( + _______, RGB_TOG, RGB_RMOD, RGB_MOD, _______, TO(_QWERTY), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, TO(_COLEMAK), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_F11, KC_F12, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + // default behavior if undefined + if (index == 0) { + // Conditional to reverse the direction of encoder number 1 + // The reason I have this is that for some of my boards, it supports two different types of encoders, and they may differ in direction + #ifdef ENCODERS_A_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + // Conditional to reverse the direction of encoder number 1 + // The reason I have this is that for some of my boards, it supports two different types of encoders, and they may differ in direction + #ifdef ENCODERS_B_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + tap_code16(C(KC_RGHT)); + } + else{ + tap_code16(C(KC_LEFT)); + } + } + else if (index == 2) { + #ifdef ENCODERS_C_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + register_code(KC_LSHIFT); + } + + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + tap_code(KC_TAB); + + #ifdef ENCODERS_C_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + unregister_code(KC_LSHIFT); + } + } + + return true; +} +#endif + +#ifdef OLED_ENABLE + + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + + +// Commenting out logo as it takes up a lot of space :( +static void render_logo(void) { + // ffkb logo, 128x64px + static const char PROGMEM ffkb_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xe0, 0xc0, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xc0, 0xe0, 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0x02, 0x02, 0x02, 0x82, 0x06, 0x0e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfe, 0xff, 0xff, 0x0f, 0x07, 0x0f, 0x1f, + 0x3e, 0x7c, 0xf8, 0xf0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xe0, 0xc0, 0xe0, 0xf0, 0xf8, 0x7c, 0x3e, + 0x1f, 0x0f, 0x07, 0x0f, 0xff, 0xff, 0xfe, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x02, 0x82, + 0x82, 0xc2, 0xe2, 0xde, 0x0e, 0x0e, 0x06, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x02, 0x02, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xe0, 0xf8, 0xfc, 0x7e, + 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x07, 0x0f, 0x1f, 0x3f, + 0x7e, 0xfc, 0xf8, 0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x1f, + 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xf0, 0xf8, 0xff, 0x7f, 0x1f, 0x87, 0x83, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x83, 0x87, 0x1f, 0x7f, 0xff, 0xf8, 0xf0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x04, 0x04, + 0x04, 0x05, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, + 0xe0, 0x20, 0x20, 0x20, 0x20, 0x60, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x18, 0x3c, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xef, 0xcf, 0x8f, 0x87, 0x07, 0x07, 0x07, 0x07, + 0x07, 0xe7, 0xe7, 0xe7, 0xc7, 0x07, 0x07, 0x0f, 0x3f, 0xfe, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xfe, 0x3f, 0x0f, 0x07, 0x07, 0xc7, 0xe7, 0xe7, 0xe7, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x87, 0x8f, 0xcf, 0xef, 0xef, 0xff, 0xff, 0x7f, 0x3e, 0x3c, 0x18, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x20, 0x20, + 0x60, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x20, 0x20, 0x70, 0xf8, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x1f, 0x1e, 0x3e, 0x7c, + 0xf8, 0xf1, 0xf1, 0xe1, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, + 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe1, 0xf1, 0xf1, 0xf8, + 0x7c, 0x3e, 0x1e, 0x1f, 0x0f, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0x20, + 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, + 0x7f, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7e, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3c, 0x3c, + 0x3c, 0x3c, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7e, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, + 0x40, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0e, + 0x0e, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + +}; + oled_write_raw_P(ffkb_logo, sizeof(ffkb_logo)); + +} + +/* +static void render_status(void) { + oled_write_P(PSTR(" Layer: "), false); + switch (get_highest_layer(layer_state|default_layer_state)) { + case _ALPHA_ALT: + oled_write_P(PSTR("Alphalt "), false); + break; + case _ALPHA: + oled_write_P(PSTR("Alpha "), false); + break; + case _NAVIGATION: + oled_write_P(PSTR("Nav "), false); + break; + case _SYMBOLS: + oled_write_P(PSTR("Symbols "), false); + break; + case _FUNCTION: + oled_write_P(PSTR("Function "), false); + break; + case _MEDIA: + oled_write_P(PSTR("Media "), false); + break; + case _MOUSE: + oled_write_P(PSTR("Mouse "), false); + break; + default: + oled_write_P(PSTR("Unkn "), false); + break; + } + + // // Write host Keyboard LED Status to OLEDs + // led_t led_usb_state = host_keyboard_led_state(); + // oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + // oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + // oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); + + // ffkb logo, 128x48px + static const char ffkb_logo_small [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x40, 0x40, + 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0x40, 0x40, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xfe, 0x8e, 0xdc, 0xf0, 0x70, 0x60, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x70, 0xf0, 0xd8, 0x9c, 0x9e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x40, 0x40, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, + 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0x40, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x10, + 0x18, 0x3c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x10, 0x10, 0x18, 0x3c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x30, 0x78, 0x7c, + 0xff, 0xd7, 0x9b, 0x18, 0x78, 0x78, 0x18, 0x30, 0x70, 0xe0, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0x30, + 0x18, 0x58, 0x78, 0x18, 0x99, 0x9b, 0xf7, 0xfc, 0x78, 0x30, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x38, 0x78, 0xfc, 0xfc, 0xfe, 0xff, 0xf8, 0xf0, + 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x10, 0x10, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xe7, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0x0f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x03, 0x07, 0x0e, 0x0c, 0x18, 0x3f, 0x7f, 0x68, 0x68, 0x3f, 0x3f, 0x0c, + 0x0c, 0x06, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x08, 0x00, 0x01, 0x0b, 0x0f, 0x0f, 0x0f, 0x0f, + 0x0f, 0x0f, 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, + 0x08, 0x08, 0x0c, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(ffkb_logo_small, sizeof(ffkb_logo_small)); +} +*/ + +bool oled_task_user(void) { + // If you don't want to display the logo, switch + if (false) { + //render_status(); + } else if (true) { + render_logo(); + } else { + //render_logo_text(); + } + return true; +} + +#endif diff --git a/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/via/rules.mk b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/fingerpunch/ffkb_byomcu/v2/kle-via.json b/keyboards/fingerpunch/ffkb_byomcu/v2/kle-via.json new file mode 100755 index 000000000000..06afa3b70723 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v2/kle-via.json @@ -0,0 +1,310 @@ +[ + [ + { + "y": 4, + "x": 7 + }, + "3,9\nenc2" + ], + [ + { + "r": 15, + "rx": 1, + "y": -0.09999999999999998, + "x": 3 + }, + "0,3" + ], + [ + { + "y": -0.65, + "x": 2 + }, + "0,2", + { + "x": 1 + }, + "0,4" + ], + [ + { + "y": -0.85, + "x": 5 + }, + "0,5" + ], + [ + { + "y": -0.4999999999999999, + "x": 3, + "c": "#5dd971" + }, + "1,3\nAlt" + ], + [ + { + "y": -0.8999999999999999, + "x": 1, + "c": "#cccccc" + }, + "0,1" + ], + [ + { + "y": -0.75, + "x": 2, + "c": "#5dd971" + }, + "1,2\nWin", + { + "x": 1 + }, + "1,4\nShift" + ], + [ + { + "y": -0.8775, + "c": "#cccccc" + }, + "0,0" + ], + [ + { + "y": -0.9725000000000001, + "x": 5 + }, + "1,5" + ], + [ + { + "y": -0.5, + "x": 3 + }, + "2,3" + ], + [ + { + "y": -0.8999999999999999, + "x": 1, + "c": "#5dd971" + }, + "1,1\nCtrl" + ], + [ + { + "y": -0.75, + "x": 2, + "c": "#cccccc" + }, + "2,2", + { + "x": 1 + }, + "2,4" + ], + [ + { + "y": -0.8775 + }, + "1,0" + ], + [ + { + "y": -0.9725000000000001, + "x": 5 + }, + "2,5" + ], + [ + { + "y": -0.3999999999999999, + "x": 1 + }, + "2,1" + ], + [ + { + "y": -0.6275 + }, + "2,0" + ], + [ + { + "y": -0.6225000000000005, + "x": 2.5 + }, + "3,1\nenc1", + { + "x": 0.5 + }, + "3,3" + ], + [ + { + "r": 25, + "y": -1.9500000000000002, + "x": 5.8 + }, + "3,4" + ], + [ + { + "r": 35, + "y": -2.1999999999999997, + "x": 7.4 + }, + "3,5" + ], + [ + { + "r": -35, + "rx": 10.65, + "ry": 4.5, + "y": -0.25, + "x": -3.1000000000000005 + }, + "3,6" + ], + [ + { + "r": -25, + "y": -0.6500000000000004, + "x": -1.9000000000000004 + }, + "3,7" + ], + [ + { + "r": -15, + "y": -0.8499999999999996, + "x": -0.6500000000000004 + }, + "3,8", + { + "x": 0.5 + }, + "3,10\nenc3" + ], + [ + { + "rx": 11, + "ry": 4.3, + "y": -3.535 + }, + "0,8" + ], + [ + { + "y": -0.6499999999999999, + "x": -1 + }, + "0,7", + { + "x": 1 + }, + "0,9" + ], + [ + { + "y": -0.8499999999999999, + "x": -2 + }, + "0,6" + ], + [ + { + "y": -0.5, + "c": "#5dd971" + }, + "1,8\nAlt" + ], + [ + { + "y": -0.8999999999999997, + "x": 2, + "c": "#cccccc" + }, + "0,10" + ], + [ + { + "y": -0.7500000000000004, + "x": -1, + "c": "#5dd971" + }, + "1,7\nShift", + { + "x": 1 + }, + "1,9\nWin" + ], + [ + { + "y": -0.8775, + "x": 3, + "c": "#cccccc" + }, + "0,11" + ], + [ + { + "y": -0.9724999999999997, + "x": -2 + }, + "1,6" + ], + [ + { + "y": -0.5000000000000004 + }, + "2,8" + ], + [ + { + "y": -0.8999999999999995, + "x": 2, + "c": "#5dd971" + }, + "1,10\nCtrl" + ], + [ + { + "y": -0.7500000000000004, + "x": -1, + "c": "#cccccc" + }, + "2,7", + { + "x": 1 + }, + "2,9" + ], + [ + { + "y": -0.8912500000000003, + "x": 3 + }, + "1,11" + ], + [ + { + "y": -0.9737499999999999, + "x": -2 + }, + "2,6" + ], + [ + { + "y": -0.3849999999999998, + "x": 2 + }, + "2,10" + ], + [ + { + "y": -0.6412500000000003, + "x": 3 + }, + "2,11" + ] +] \ No newline at end of file diff --git a/keyboards/fingerpunch/ffkb_byomcu/readme.md b/keyboards/fingerpunch/ffkb_byomcu/v2/readme.md similarity index 89% rename from keyboards/fingerpunch/ffkb_byomcu/readme.md rename to keyboards/fingerpunch/ffkb_byomcu/v2/readme.md index 5111e7c21f72..32340a6b14e8 100644 --- a/keyboards/fingerpunch/ffkb_byomcu/readme.md +++ b/keyboards/fingerpunch/ffkb_byomcu/v2/readme.md @@ -25,8 +25,4 @@ Options are: PIMORONI_TRACKBALL_ENABLE=yes ``` -Example of flashing this keyboard: - - make fingerpunch/ffkb_byomcu/rgblight_oled_ec11:default:flash - 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/fingerpunch/ffkb_byomcu/rules.mk b/keyboards/fingerpunch/ffkb_byomcu/v2/rules.mk similarity index 100% rename from keyboards/fingerpunch/ffkb_byomcu/rules.mk rename to keyboards/fingerpunch/ffkb_byomcu/v2/rules.mk diff --git a/keyboards/fingerpunch/ffkb_byomcu/v2/v2.h b/keyboards/fingerpunch/ffkb_byomcu/v2/v2.h new file mode 100644 index 000000000000..f79495353465 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v2/v2.h @@ -0,0 +1,44 @@ +/* Copyright 2021-2022 Sadek Baroudi + * + * 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" + +/* 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. + */ + +// 1-40 are the keyswitches, and 50 and 51 are the rotary encoders +#define LAYOUT_ffkb( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K32, K34, K35, K36, K37, K38, K39, K3B, \ + K3A \ +) \ +{ \ + { K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { KC_NO, KC_NO, K19, K2A, K0A, K1B, K2B, K0C }, \ + { KC_NO, K3A, K29, K09, K1A, K0B, K2C, K1C }, \ + { K3B, K32, K39, K34, K35, K36, K37, K38 } \ +} diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/config.h b/keyboards/fingerpunch/ffkb_byomcu/v3/config.h new file mode 100644 index 000000000000..6deffb10cd19 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/config.h @@ -0,0 +1,81 @@ +/* +Copyright 2021 Sadek Baroudi + +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 DEVICE_VER 0x0003 + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 8 + +// SHIFT REGISTER +// Only needed for matrix_74hc595_spi.c +#define SHIFTREG_MATRIX_COL_CS B6 +#define SHIFTREG_DIVISOR 8 // needs to be the same as the PMW33XX_CS_DIVISOR below +#define MATRIX_ROW_PINS_SR { D2, F4, F5, F6, F7, D4 } + +// SPI config for shift register (and trackball if enabled) +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN B1 +#define SPI_SCK_PAL_MODE 5 +#define SPI_MOSI_PIN B2 +#define SPI_MOSI_PAL_MODE 5 +#define SPI_MISO_PIN B3 +#define SPI_MISO_PAL_MODE 5 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A {C6, E6} +#define ENCODERS_PAD_B {D7, B4} + + +#ifdef FP_EVQ +#define ENCODERS_A_REVERSE +#define ENCODERS_B_REVERSE +#endif + +#ifdef FP_EC11 +#define ENCODERS_C_REVERSE +#endif + +#define ENCODER_RESOLUTION 2 + +#ifdef CIRQUE_ENABLE + // cirque trackpad config + #define CIRQUE_PINNACLE_ADDR 0x2A + #define POINTING_DEVICE_ROTATION_90 + #define CIRQUE_PINNACLE_TAP_ENABLE + #define POINTING_DEVICE_TASK_THROTTLE_MS 5 + #define I2C1_CLOCK_SPEED 400000 + #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 +#endif + +#ifdef FP_TRACKBALL_ENABLE + // Trackball config + #define PMW33XX_CS_PIN B5 + #define PMW33XX_CPI 800 + #define PMW33XX_CS_DIVISOR 8 // needs to be the same as the SHIFTREG_DIVISOR above + #define POINTING_DEVICE_INVERT_Y +#endif + +#define DYNAMIC_KEYMAP_LAYER_COUNT 5 diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/fp_build.json b/keyboards/fingerpunch/ffkb_byomcu/v3/fp_build.json new file mode 100644 index 000000000000..ae4d3a65aae0 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/fp_build.json @@ -0,0 +1,22 @@ +[ + { + "type" : "single", + "name" : "CIRQUE_ENABLE", + "user_input": "Do you have a cirque?" + }, + { + "type" : "single", + "name" : "FP_TRACKBALL_ENABLE", + "user_input": "Do you have a trackball?" + }, + { + "type" : "one-of", + "names" : [ "RGBLIGHT_ENABLE", "RGB_MATRIX_ENABLE" ], + "user_input": "No RGB, RGB light, RGB matrix?" + }, + { + "type" : "one-of", + "names" : [ "FP_EC11", "FP_EVQ" ], + "user_input": "No rotary encoders, EC11, or EVQ?" + } +] \ No newline at end of file diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/halconf.h b/keyboards/fingerpunch/ffkb_byomcu/v3/halconf.h new file mode 100644 index 000000000000..482d3eba6498 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/halconf.h @@ -0,0 +1,25 @@ +/* + * Copyright 2022 Charly Delay (@0xcharly) + * + * 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 + +#define HAL_USE_SERIAL TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next "halconf.h" diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/default/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/default/keymap.c new file mode 100644 index 000000000000..ec50f1afebd4 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/default/keymap.c @@ -0,0 +1,205 @@ +#include QMK_KEYBOARD_H + +#ifdef ENCODER_ENABLE +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; +#endif + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P |BckSpc| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | SFT | Z | X | C | V | B | | N | M | , | . | / | SFT | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +// Default config uses home row mods. So hold each of the keys on the home row to use ctrl, gui, alt, or shift +[_QWERTY] = LAYOUT_ffkb( + 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_TAB, LCTL_T(KC_A), LGUI_T(KC_S), LALT_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, RSFT_T(KC_J), RALT_T(KC_K), RGUI_T(KC_L), RCTL_T(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_RSFT, + KC_MUTE, KC_BSLS, KC_ENT, LOWER, RAISE, KC_SPC, KC_DEL, LCTL(KC_BSPC) +), + +/* Colemak-dh + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P |BckSpc| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | SFT | Z | X | C | V | B | | N | M | , | . | / | SFT | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +// Default config uses home row mods. So hold each of the keys on the home row to use ctrl, gui, alt, or shift +[_COLEMAK] = LAYOUT_ffkb( + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, LCTL_T(KC_A), LGUI_T(KC_R), LALT_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, RSFT_T(KC_N), RALT_T(KC_E), RGUI_T(KC_I), RCTL_T(KC_O), KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MUTE, KC_BSLS, KC_ENT, LOWER, RAISE, KC_SPC, KC_DEL, LCTL(KC_BSPC) +), + + +/* Raise + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Home | Left | Down | Up | Right| End | | | - | = | [ | ] | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | PgDn | PgUp | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +[_RAISE] = LAYOUT_ffkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TAB, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + + + +/* Raise + * + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | _ | + | { | } | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Caps| | | | | | | | | | | " | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +[_RAISE] = LAYOUT_ffkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TAB, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), +/* Lower + * + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | _ | + | { | } | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Caps| | | | | | | | | | | " | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ +[_LOWER] = LAYOUT_ffkb( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + + * ,-----------------------------------------. ,-----------------------------------------. + * | | RGB_T| RGB_R| RGB_F| |QWERTY| | F1 | F2 | F3 | F4 | F5 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | SPD_I| HUE_I| SAT_I| VAL_I|COLEMK| | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | SPD_D| HUE_D| SAT_D| VAL_D| | | F11 | F12 | | | Reset| | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ +[_ADJUST] = LAYOUT_ffkb( + _______, RGB_TOG, RGB_RMOD, RGB_MOD, _______, TO(_QWERTY), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, TO(_COLEMAK), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_F11, KC_F12, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef ENCODER_ENABLE + +void press_super_alt_tab(bool shift) { + if (shift) { + register_code(KC_LSHIFT); + } + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + tap_code(KC_TAB); + if (shift) { + unregister_code(KC_LSHIFT); + } +} + +bool encoder_update_user(uint8_t index, bool clockwise) { + // default behavior if undefined + if (index == 0) { + // Conditional to reverse the direction of encoder number 1 + // The reason I have this is that for some of my boards, it supports two different types of encoders, and they may differ in direction + #ifdef ENCODERS_A_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + // Conditional to reverse the direction of encoder number 1 + // The reason I have this is that for some of my boards, it supports two different types of encoders, and they may differ in direction + #ifdef ENCODERS_B_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + press_super_alt_tab(true); + } + else{ + press_super_alt_tab(false); + } + } + + return true; +} +#endif diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/manna-harbour_miryoku/config.h b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/manna-harbour_miryoku/config.h new file mode 100644 index 000000000000..ea24a2468551 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/manna-harbour_miryoku/config.h @@ -0,0 +1,21 @@ +// Copyright 2022 Manna Harbour +// https://github.com/manna-harbour/miryoku + +// 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 + +#define XXX KC_NO + +#define LAYOUT_miryoku( \ + 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, \ + N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \ +) \ +LAYOUT_ffkb( \ +XXX, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, XXX, \ +XXX, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, XXX, \ +XXX, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, XXX, \ + XXX, K32, K33, K34, K35, K36, K37, XXX \ +) diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/manna-harbour_miryoku/keymap.c new file mode 100644 index 000000000000..fadfdc83651a --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/manna-harbour_miryoku/keymap.c @@ -0,0 +1,4 @@ +// Copyright 2022 Manna Harbour +// https://github.com/manna-harbour/miryoku + +// 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 . diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/sadekbaroudi/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/sadekbaroudi/keymap.c new file mode 100644 index 000000000000..18356e32cbc0 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/sadekbaroudi/keymap.c @@ -0,0 +1,96 @@ +/* Copyright 2021 Sadek Baroudi + * + * 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 "sadekbaroudi.h" +#include QMK_KEYBOARD_H + +/* + * The `LAYOUT_ffkb_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg ALPHA_ALT, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + +// clang-format off +#define LAYOUT_ffkb_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ + K33, K34, K35, K36, K37, K38 \ + ) \ + LAYOUT_wrapper( \ + KC_MS_BTN3, K01, K02, K03, LT(_FUNCTION, K04), K05, K06, LT(_FUNCTION, K07), K08, K09, K0A, KC_BSLS, \ + KC_MS_BTN1, LCTL_T(K11), LGUI_T(K12), LALT_T(K13), LSFT_T(K14), K15, LT(_MOUSE, K16), RSFT_T(K17), RALT_T(K18), RGUI_T(K19), RCTL_T(K1A), LCTL(KC_V), \ + KC_MS_BTN2, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, S_ALT_TAB, \ + KC_MUTE, K33, LT(_NAVIGATION,K34), LT(_FUNCTION,K35), LT(_MEDIA,K36), LT(_SYMBOLS,K37), K38, LCTL(KC_BSPC) \ + ) + +/* Re-pass though to allow templates to be used */ +#define LAYOUT_ffkb_byomcu_base_wrapper(...) LAYOUT_ffkb_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_ALPHA_ALT] = LAYOUT_ffkb_byomcu_base_wrapper( + _________________ALPHA_ALT_L1_________________, _________________ALPHA_ALT_R1_________________, + _________________ALPHA_ALT_L2_________________, _________________ALPHA_ALT_R2_________________, + _________________ALPHA_ALT_L3_________________, _________________ALPHA_ALT_R3_________________, + __ALPHA_ALT_THUMBS_6__ + ), + + [_ALPHA] = LAYOUT_ffkb_byomcu_base_wrapper( + __________________ALPHA_L1____________________, __________________ALPHA_R1____________________, + __________________ALPHA_L2____________________, __________________ALPHA_R2____________________, + __________________ALPHA_L3____________________, __________________ALPHA_R3____________________, + __ALPHA_THUMBS_6__ + ), + + [_NAVIGATION] = LAYOUT_wrapper( + _______, ________________NAVIGATION_1_______________, _________________NUMPAD_1__________________, _______, + _______, ________________NAVIGATION_2_______________, _________________NUMPAD_2__________________, _______, + _______, ________________NAVIGATION_3_______________, _________________NUMPAD_3__________________, _______, + _______, _______, _______, KC_TAB, KC_BSPC, KC_SPACE, KC_DOT, _______ + ), + + [_SYMBOLS] = LAYOUT_wrapper( + _______, ________________SYMBOLS_L1_________________, ________________SYMBOLS_R1_________________, _______, + _______, ________________SYMBOLS_L2_________________, ________________SYMBOLS_R2_________________, _______, + _______, ________________SYMBOLS_L3_________________, ________________SYMBOLS_R3_________________, _______, + _______, _______, KC_ENT, KC_DEL, KC_BSPC, _______, _______, _______ + ), + + [_FUNCTION] = LAYOUT_wrapper( + _______, ________________SHIFTNAV_1_________________, ________________FUNCTION_1_________________, _______, + _______, ________________SHIFTNAV_2_________________, ________________FUNCTION_2_________________, _______, + _______, ________________SHIFTNAV_3_________________, ________________FUNCTION_3_________________, _______, + _______, _______, _______, _______, N_DEL_LINE, KC_SPACE, _______, _______ + ), + + [_MEDIA] = LAYOUT_wrapper( + _______, ___________________RGB_1___________________, _________________MACROS_1__________________, _______, + _______, ___________________RGB_2___________________, _________________MACROS_2__________________, _______, + _______, ___________________RGB_3___________________, _________________MACROS_3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_MOUSE] = LAYOUT_wrapper( + _______, __________________MOUSE_1__________________, ___________________BLANK___________________, _______, + _______, __________________MOUSE_2__________________, ___________________BLANK___________________, _______, + _______, __________________MOUSE_3__________________, ___________________BLANK___________________, _______, + _______, _______, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN3, KC_MS_BTN2, _______, _______ + ) +}; + diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/via/keymap.c b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/via/keymap.c new file mode 100644 index 000000000000..8c89b303e66d --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/via/keymap.c @@ -0,0 +1,189 @@ +#include QMK_KEYBOARD_H + +#ifdef ENCODER_ENABLE +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; +#endif + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P |BckSpc| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | SFT | Z | X | C | V | B | | N | M | , | . | / | SFT | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +// Default config uses home row mods. So hold each of the keys on the home row to use ctrl, gui, alt, or shift +[_QWERTY] = LAYOUT_ffkb( + 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_TAB, LCTL_T(KC_A), LGUI_T(KC_S), LALT_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, RSFT_T(KC_J), RALT_T(KC_K), RGUI_T(KC_L), RCTL_T(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_RSFT, + KC_MUTE, KC_BSLS, KC_ENT, LOWER, RAISE, KC_SPC, KC_DEL, LCTL(KC_BSPC) +), + +/* Colemak-dh + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P |BckSpc| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | SFT | Z | X | C | V | B | | N | M | , | . | / | SFT | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +// Default config uses home row mods. So hold each of the keys on the home row to use ctrl, gui, alt, or shift +[_COLEMAK] = LAYOUT_ffkb( + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, LCTL_T(KC_A), LGUI_T(KC_R), LALT_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, RSFT_T(KC_N), RALT_T(KC_E), RGUI_T(KC_I), RCTL_T(KC_O), KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MUTE, KC_BSLS, KC_ENT, LOWER, RAISE, KC_SPC, KC_DEL, LCTL(KC_BSPC) +), + + +/* Raise + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Home | Left | Down | Up | Right| End | | | - | = | [ | ] | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | PgDn | PgUp | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +[_RAISE] = LAYOUT_ffkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TAB, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + + + +/* Raise + * + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | _ | + | { | } | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Caps| | | | | | | | | | | " | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +[_RAISE] = LAYOUT_ffkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TAB, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), +/* Lower + * + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | _ | + | { | } | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Caps| | | | | | | | | | | " | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ +[_LOWER] = LAYOUT_ffkb( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + + * ,-----------------------------------------. ,-----------------------------------------. + * | | RGB_T| RGB_R| RGB_F| |QWERTY| | F1 | F2 | F3 | F4 | F5 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | SPD_I| HUE_I| SAT_I| VAL_I|COLEMK| | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | SPD_D| HUE_D| SAT_D| VAL_D| | | F11 | F12 | | | Reset| | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ +[_ADJUST] = LAYOUT_ffkb( + _______, RGB_TOG, RGB_RMOD, RGB_MOD, _______, TO(_QWERTY), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, TO(_COLEMAK), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_F11, KC_F12, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + // default behavior if undefined + if (index == 0) { + // Conditional to reverse the direction of encoder number 1 + // The reason I have this is that for some of my boards, it supports two different types of encoders, and they may differ in direction + #ifdef ENCODERS_A_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + // Conditional to reverse the direction of encoder number 1 + // The reason I have this is that for some of my boards, it supports two different types of encoders, and they may differ in direction + #ifdef ENCODERS_B_REVERSE + if (!clockwise) { + #else + if (clockwise) { + #endif + tap_code16(C(KC_RGHT)); + } + else{ + tap_code16(C(KC_LEFT)); + } + } + + return true; +} +#endif diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/via/rules.mk b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/kle-via.json b/keyboards/fingerpunch/ffkb_byomcu/v3/kle-via.json new file mode 100755 index 000000000000..06afa3b70723 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/kle-via.json @@ -0,0 +1,310 @@ +[ + [ + { + "y": 4, + "x": 7 + }, + "3,9\nenc2" + ], + [ + { + "r": 15, + "rx": 1, + "y": -0.09999999999999998, + "x": 3 + }, + "0,3" + ], + [ + { + "y": -0.65, + "x": 2 + }, + "0,2", + { + "x": 1 + }, + "0,4" + ], + [ + { + "y": -0.85, + "x": 5 + }, + "0,5" + ], + [ + { + "y": -0.4999999999999999, + "x": 3, + "c": "#5dd971" + }, + "1,3\nAlt" + ], + [ + { + "y": -0.8999999999999999, + "x": 1, + "c": "#cccccc" + }, + "0,1" + ], + [ + { + "y": -0.75, + "x": 2, + "c": "#5dd971" + }, + "1,2\nWin", + { + "x": 1 + }, + "1,4\nShift" + ], + [ + { + "y": -0.8775, + "c": "#cccccc" + }, + "0,0" + ], + [ + { + "y": -0.9725000000000001, + "x": 5 + }, + "1,5" + ], + [ + { + "y": -0.5, + "x": 3 + }, + "2,3" + ], + [ + { + "y": -0.8999999999999999, + "x": 1, + "c": "#5dd971" + }, + "1,1\nCtrl" + ], + [ + { + "y": -0.75, + "x": 2, + "c": "#cccccc" + }, + "2,2", + { + "x": 1 + }, + "2,4" + ], + [ + { + "y": -0.8775 + }, + "1,0" + ], + [ + { + "y": -0.9725000000000001, + "x": 5 + }, + "2,5" + ], + [ + { + "y": -0.3999999999999999, + "x": 1 + }, + "2,1" + ], + [ + { + "y": -0.6275 + }, + "2,0" + ], + [ + { + "y": -0.6225000000000005, + "x": 2.5 + }, + "3,1\nenc1", + { + "x": 0.5 + }, + "3,3" + ], + [ + { + "r": 25, + "y": -1.9500000000000002, + "x": 5.8 + }, + "3,4" + ], + [ + { + "r": 35, + "y": -2.1999999999999997, + "x": 7.4 + }, + "3,5" + ], + [ + { + "r": -35, + "rx": 10.65, + "ry": 4.5, + "y": -0.25, + "x": -3.1000000000000005 + }, + "3,6" + ], + [ + { + "r": -25, + "y": -0.6500000000000004, + "x": -1.9000000000000004 + }, + "3,7" + ], + [ + { + "r": -15, + "y": -0.8499999999999996, + "x": -0.6500000000000004 + }, + "3,8", + { + "x": 0.5 + }, + "3,10\nenc3" + ], + [ + { + "rx": 11, + "ry": 4.3, + "y": -3.535 + }, + "0,8" + ], + [ + { + "y": -0.6499999999999999, + "x": -1 + }, + "0,7", + { + "x": 1 + }, + "0,9" + ], + [ + { + "y": -0.8499999999999999, + "x": -2 + }, + "0,6" + ], + [ + { + "y": -0.5, + "c": "#5dd971" + }, + "1,8\nAlt" + ], + [ + { + "y": -0.8999999999999997, + "x": 2, + "c": "#cccccc" + }, + "0,10" + ], + [ + { + "y": -0.7500000000000004, + "x": -1, + "c": "#5dd971" + }, + "1,7\nShift", + { + "x": 1 + }, + "1,9\nWin" + ], + [ + { + "y": -0.8775, + "x": 3, + "c": "#cccccc" + }, + "0,11" + ], + [ + { + "y": -0.9724999999999997, + "x": -2 + }, + "1,6" + ], + [ + { + "y": -0.5000000000000004 + }, + "2,8" + ], + [ + { + "y": -0.8999999999999995, + "x": 2, + "c": "#5dd971" + }, + "1,10\nCtrl" + ], + [ + { + "y": -0.7500000000000004, + "x": -1, + "c": "#cccccc" + }, + "2,7", + { + "x": 1 + }, + "2,9" + ], + [ + { + "y": -0.8912500000000003, + "x": 3 + }, + "1,11" + ], + [ + { + "y": -0.9737499999999999, + "x": -2 + }, + "2,6" + ], + [ + { + "y": -0.3849999999999998, + "x": 2 + }, + "2,10" + ], + [ + { + "y": -0.6412500000000003, + "x": 3 + }, + "2,11" + ] +] \ No newline at end of file diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/matrix_74hc595_spi.c b/keyboards/fingerpunch/ffkb_byomcu/v3/matrix_74hc595_spi.c new file mode 100644 index 000000000000..ac743545c3e9 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/matrix_74hc595_spi.c @@ -0,0 +1,150 @@ +// Copyright 2022 @sadekbaroudi (Sadek Baroudi) +// SPDX-License-Identifier: GPL-3.0-or-later +#include "quantum.h" +#include "spi_master.h" +#include /* memset */ +#include /* close */ +#include "quantum.h" +#include "matrix.h" +// added for testing with SR_DEBUG_RATIO, remove when done +#include +#include +// end testing + +#define SR_DEBUG_RATIO 10000 + +#if (!defined(SHIFTREG_MATRIX_COL_CS)) +# error Missing shift register I/O pin definitions +#endif + +int matrixArraySize = MATRIX_ROWS * sizeof(matrix_row_t); +matrix_row_t oldMatrix[MATRIX_ROWS]; + +#define SHIFTREG_OUTPUT_BITS 8 +pin_t rowPinsSR[MATRIX_ROWS] = MATRIX_ROW_PINS_SR; + +// semaphore to make sure SPI doesn't get called multiple times +static bool shiftRegisterSPILocked = false; + +void semaphore_lock(bool value) { + shiftRegisterSPILocked = value; +} + +bool semaphore_is_locked(void) { + return shiftRegisterSPILocked; +} + +void sr_74hc595_spi_stop(void) { + spi_stop(); + semaphore_lock(false); +} + +bool sr_74hc595_spi_start(void) { + if (!spi_start(SHIFTREG_MATRIX_COL_CS, false, 0, SHIFTREG_DIVISOR)) { + xprintf("74hc595 matrix: failed to start spi\n"); + sr_74hc595_spi_stop(); + return false; + } + + semaphore_lock(true); + wait_us(1); // not sure if I need this + return true; +} + +bool sr_74hc595_spi_send_byte(uint8_t data) { + sr_74hc595_spi_start(); + writePinLow(SHIFTREG_MATRIX_COL_CS); + matrix_io_delay(); + // spi_status_t spiResponse = spi_write(data); + spi_write(data); + // Status is irrelevant as we don't have a MISO pin to check if it succeeded + // if (spiResponse != SPI_STATUS_SUCCESS) { + // xprintf("74hc595 matrix: failed to send data over SPI: response %d\n", spiResponse); + // writePinHigh(SHIFTREG_MATRIX_COL_CS); + // sr_74hc595_spi_stop(); + // return false; + // } + matrix_io_delay(); + writePinHigh(SHIFTREG_MATRIX_COL_CS); + sr_74hc595_spi_stop(); + return true; +} + +/** + * Set the entire shift register to be full of inactive bits + */ +void clearColumns(void) { + uint8_t value = 0b00000000; + sr_74hc595_spi_send_byte(value); +} + +void setColumn(int columnShift, bool test_run) { + uint8_t columnShiftByte = ((uint8_t)1 << columnShift); + if(test_run) { + xprintf("byte sent: %d\n", columnShiftByte); + } + sr_74hc595_spi_send_byte(columnShiftByte); +} + +/* + * override of the qmk intialization function + */ +void matrix_init_custom(void) { + wait_ms(300); + spi_init(); + // Set up the initial states for all the row pins + for (int r = 0; r < MATRIX_ROWS; r++) { + // Note: This needs to use the internal pull down resistors, and atmegas do *not* support that + setPinInputLow(rowPinsSR[r]); + } + + // Set the CS to low by default, and specify as an output pin + writePinHigh(SHIFTREG_MATRIX_COL_CS); // should be high when using SPI? + setPinOutput(SHIFTREG_MATRIX_COL_CS); + + // Since it's the init, deactivate all the columns. We'll activate once we get to the matrix scan + clearColumns(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + // respect the semaphore + if (semaphore_is_locked()) { + return false; + } + + // Keep track of if something was modified + bool matrix_has_changed = false; + + // reset the current matrix, as we'll be updating and comparing to the old matrix + memset(current_matrix, 0, matrixArraySize); + + bool debug_output = ((rand() % SR_DEBUG_RATIO) == 1); + // Loop through the columns, activating one at a time, and read the rows, and place in the new current_matrix + for (int c = 0; c < MATRIX_COLS; c++) { + if (debug_output) { + xprintf("column iteration: %d\n", c); + } + setColumn(c, debug_output); + matrix_io_delay(); + + for (int r = 0; r < MATRIX_ROWS; r++) { + current_matrix[r] |= ((readPin(rowPinsSR[r]) ? 1 : 0) << c); + } + } + + matrix_has_changed = memcmp(current_matrix, oldMatrix, matrixArraySize) != 0; + memcpy(oldMatrix, current_matrix, matrixArraySize); + + if (matrix_has_changed) { + matrix_print(); + } + // matrix_print(); + // xprintf("matrix_has_changed: %d\n", matrix_has_changed); + + // Deactivate all the columns for the next run. + clearColumns(); + matrix_io_delay(); + + return matrix_has_changed; +} + diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/mcuconf.h b/keyboards/fingerpunch/ffkb_byomcu/v3/mcuconf.h new file mode 100644 index 000000000000..57de50198b41 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/mcuconf.h @@ -0,0 +1,25 @@ +#pragma once + +#include_next "mcuconf.h" + +#undef STM32_SPI_USE_SPI0 +#define STM32_SPI_USE_SPI0 TRUE + +// Added because of this error at compile time +/* +Compiling: keyboards/fingerpunch/ffkb_byomcu/v3/matrix_74hc595_spi.c In file included from ./lib/chibios/os/hal/include/hal_spi_v2.h:146:0, + from ./lib/chibios/os/hal/include/hal_spi.h:31, + from ./lib/chibios/os/hal/include/hal.h:315, + from platforms/chibios/platform_deps.h:18, + from quantum/quantum.h:18, + from keyboards/fingerpunch/ffkb_byomcu/v3/matrix_74hc595_spi.c:3: +./lib/chibios/os/hal/ports/STM32/LLD/SPIv1/hal_spi_v2_lld.h:282:2: error: #error "SPI driver activated but no SPI peripheral assigned" + #error "SPI driver activated but no SPI peripheral assigned" + ^~~~~ + [ERRORS] +*/ +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 5 \ No newline at end of file diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/readme.md b/keyboards/fingerpunch/ffkb_byomcu/v3/readme.md new file mode 100644 index 000000000000..e41f06b41601 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/readme.md @@ -0,0 +1,26 @@ +# ffkb + +An ergonomic 30% keyboard + +* Keyboard Maintainer: [sadekbaroudi](https://github.com/sadekbaroudi) + +Faux fox keyboard (ffkb) + +Make example for this keyboard (after setting up your build environment): +``` + make fingerpunch/ffkb_byomcu:default RGBLIGHT_ENABLE=yes FP_EC11=yes CIRQUE_ENABLE=yes +``` + +Don't forget to add ```CONVERT_TO=stemcell``` if using a stemcell controller. + +Options are: +``` + CIRQUE_ENABLE=yes + FP_TRACKBALL_ENABLE=yes + RGBLIGHT_ENABLE=yes + RGB_MATRIX_ENABLE=yes + FP_EC11=yes + FP_EVQ=yes +``` + +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/fingerpunch/ffkb_byomcu/v3/rules.mk b/keyboards/fingerpunch/ffkb_byomcu/v3/rules.mk new file mode 100644 index 000000000000..f977133738fa --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/rules.mk @@ -0,0 +1,69 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # 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 + +# Either do RGBLIGHT_ENABLE or RGB_MATRIX_ENABLE and RGB_MATRIX_DRIVER +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = no +RGB_MATRIX_DRIVER = WS2812 + +MIDI_ENABLE = no # MIDI support +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 +ENCODER_ENABLE = no +OLED_ENABLE = no # this can be yes or no depending on if you have an OLED +EXTRAFLAGS += -flto # macros disabled, as a lot of barobord features require more space, can move this line into all the individual rules.mk, only where needed + # for instance, if you build "no_features", it's very unlikely you'll need to disable macros + +SRC += matrix_74hc595_spi.c +QUANTUM_LIB_SRC += spi_master.c +CUSTOM_MATRIX = lite + +ifeq ($(strip $(CIRQUE_ENABLE)), yes) + MOUSEKEY_ENABLE := yes # not required, but enabling for mouse button keys + POINTING_DEVICE_ENABLE := yes + POINTING_DEVICE_DRIVER := cirque_pinnacle_i2c + OPT_DEFS += -DCIRQUE_ENABLE +endif + +ifeq ($(strip $(FP_TRACKBALL_ENABLE)), yes) + MOUSEKEY_ENABLE := yes # not required, but enabling for mouse button keys + POINTING_DEVICE_ENABLE := yes + POINTING_DEVICE_DRIVER := pmw3360 + QUANTUM_LIB_SRC += spi_master.c + OPT_DEFS += -DFP_TRACKBALL_ENABLE +endif + +ifeq ($(strip $(FP_EC11)), yes) + ENCODER_ENABLE := yes + OPT_DEFS += -DFP_EC11_UNDER_PALMS +endif + +ifeq ($(strip $(FP_EVQ)), yes) + ENCODER_ENABLE := yes + OPT_DEFS += -DFP_EVQ_UNDER_PALMS +endif diff --git a/keyboards/fingerpunch/ffkb_byomcu/v3/v3.h b/keyboards/fingerpunch/ffkb_byomcu/v3/v3.h new file mode 100644 index 000000000000..16950faf5373 --- /dev/null +++ b/keyboards/fingerpunch/ffkb_byomcu/v3/v3.h @@ -0,0 +1,43 @@ +/* Copyright 2021 Sadek Baroudi + * + * 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" + +/* 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. + */ + +// With the shift register, define the columns in the order of A-H as defined in the schematic +#define LAYOUT_ffkb( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K32, K34, K35, K36, K37, K38, K39, K3B \ +) \ +{ \ + { K01, K03, K05, K04, K06, K07, K08, K02 }, \ + { K11, K13, K15, K14, K16, K17, K18, K12 }, \ + { K21, K23, K25, K24, K26, K27, K28, K22 }, \ + { KC_NO, K19, K0A, K2A, K1B, K2B, K0C, KC_NO }, \ + { KC_NO, K29, K1A, K09, K0B, K2C, K1C, KC_NO }, \ + { K3B, K39, K35, K34, K36, K37, K38, K32 } \ +} diff --git a/keyboards/fingerpunch/ffkb_byomcu/via.json b/keyboards/fingerpunch/ffkb_byomcu/via.json deleted file mode 100644 index 11d5ee06ab12..000000000000 --- a/keyboards/fingerpunch/ffkb_byomcu/via.json +++ /dev/null @@ -1,322 +0,0 @@ -{ - "name": "ffkb", - "vendorId": "0xFEFE", - "productId": "0xFF3B", - "matrix": {"rows": 4, "cols": 12}, - "lighting": "qmk_rgblight", - "layouts": { - "labels": [ - ["Layout"] - ], - "keymap": [ - [ - { - "y": 4, - "x": 7 - }, - "3,9\nenc2" - ], - [ - { - "r": 15, - "rx": 1, - "y": -0.09999999999999998, - "x": 3 - }, - "0,3" - ], - [ - { - "y": -0.65, - "x": 2 - }, - "0,2", - { - "x": 1 - }, - "0,4" - ], - [ - { - "y": -0.85, - "x": 5 - }, - "0,5" - ], - [ - { - "y": -0.4999999999999999, - "x": 3, - "c": "#5dd971" - }, - "1,3\nAlt" - ], - [ - { - "y": -0.8999999999999999, - "x": 1, - "c": "#cccccc" - }, - "0,1" - ], - [ - { - "y": -0.75, - "x": 2, - "c": "#5dd971" - }, - "1,2\nWin", - { - "x": 1 - }, - "1,4\nShift" - ], - [ - { - "y": -0.8775, - "c": "#cccccc" - }, - "0,0" - ], - [ - { - "y": -0.9725000000000001, - "x": 5 - }, - "1,5" - ], - [ - { - "y": -0.5, - "x": 3 - }, - "2,3" - ], - [ - { - "y": -0.8999999999999999, - "x": 1, - "c": "#5dd971" - }, - "1,1\nCtrl" - ], - [ - { - "y": -0.75, - "x": 2, - "c": "#cccccc" - }, - "2,2", - { - "x": 1 - }, - "2,4" - ], - [ - { - "y": -0.8775 - }, - "1,0" - ], - [ - { - "y": -0.9725000000000001, - "x": 5 - }, - "2,5" - ], - [ - { - "y": -0.3999999999999999, - "x": 1 - }, - "2,1" - ], - [ - { - "y": -0.6275 - }, - "2,0" - ], - [ - { - "y": -0.6225000000000005, - "x": 2.5 - }, - "3,1\nenc1", - { - "x": 0.5 - }, - "3,3" - ], - [ - { - "r": 25, - "y": -1.9500000000000002, - "x": 5.8 - }, - "3,4" - ], - [ - { - "r": 35, - "y": -2.1999999999999997, - "x": 7.4 - }, - "3,5" - ], - [ - { - "r": -35, - "rx": 10.65, - "ry": 4.5, - "y": -0.25, - "x": -3.1000000000000005 - }, - "3,6" - ], - [ - { - "r": -25, - "y": -0.6500000000000004, - "x": -1.9000000000000004 - }, - "3,7" - ], - [ - { - "r": -15, - "y": -0.8499999999999996, - "x": -0.6500000000000004 - }, - "3,8", - { - "x": 0.5 - }, - "3,10\nenc3" - ], - [ - { - "rx": 11, - "ry": 4.3, - "y": -3.535 - }, - "0,8" - ], - [ - { - "y": -0.6499999999999999, - "x": -1 - }, - "0,7", - { - "x": 1 - }, - "0,9" - ], - [ - { - "y": -0.8499999999999999, - "x": -2 - }, - "0,6" - ], - [ - { - "y": -0.5, - "c": "#5dd971" - }, - "1,8\nAlt" - ], - [ - { - "y": -0.8999999999999997, - "x": 2, - "c": "#cccccc" - }, - "0,10" - ], - [ - { - "y": -0.7500000000000004, - "x": -1, - "c": "#5dd971" - }, - "1,7\nShift", - { - "x": 1 - }, - "1,9\nWin" - ], - [ - { - "y": -0.8775, - "x": 3, - "c": "#cccccc" - }, - "0,11" - ], - [ - { - "y": -0.9724999999999997, - "x": -2 - }, - "1,6" - ], - [ - { - "y": -0.5000000000000004 - }, - "2,8" - ], - [ - { - "y": -0.8999999999999995, - "x": 2, - "c": "#5dd971" - }, - "1,10\nCtrl" - ], - [ - { - "y": -0.7500000000000004, - "x": -1, - "c": "#cccccc" - }, - "2,7", - { - "x": 1 - }, - "2,9" - ], - [ - { - "y": -0.8912500000000003, - "x": 3 - }, - "1,11" - ], - [ - { - "y": -0.9737499999999999, - "x": -2 - }, - "2,6" - ], - [ - { - "y": -0.3849999999999998, - "x": 2 - }, - "2,10" - ], - [ - { - "y": -0.6412500000000003, - "x": 3 - }, - "2,11" - ] - ] - } -} \ No newline at end of file