From 4fb6eb72531bf8026751d7db292eeae9466e7710 Mon Sep 17 00:00:00 2001 From: Elliot Powell <32494740+e11i0t23@users.noreply.github.com> Date: Sun, 6 Feb 2022 15:57:16 +0000 Subject: [Keyboard] Add Support for KeebsForAll Freebird Numpads (#16046) Co-authored-by: Ryan --- keyboards/keebsforall/freebirdnp/lite/config.h | 55 +++++ keyboards/keebsforall/freebirdnp/lite/info.json | 204 +++++++++++++++++ .../freebirdnp/lite/keymaps/default/keymap.c | 32 +++ .../freebirdnp/lite/keymaps/via/keymap.c | 46 ++++ .../freebirdnp/lite/keymaps/via/rules.mk | 1 + keyboards/keebsforall/freebirdnp/lite/lite.c | 16 ++ keyboards/keebsforall/freebirdnp/lite/lite.h | 48 ++++ keyboards/keebsforall/freebirdnp/lite/readme.md | 19 ++ keyboards/keebsforall/freebirdnp/lite/rules.mk | 20 ++ keyboards/keebsforall/freebirdnp/pro/config.h | 58 +++++ keyboards/keebsforall/freebirdnp/pro/info.json | 244 +++++++++++++++++++++ .../freebirdnp/pro/keymaps/default/keymap.c | 45 ++++ .../freebirdnp/pro/keymaps/via/keymap.c | 51 +++++ .../freebirdnp/pro/keymaps/via/rules.mk | 1 + keyboards/keebsforall/freebirdnp/pro/pro.c | 28 +++ keyboards/keebsforall/freebirdnp/pro/pro.h | 52 +++++ keyboards/keebsforall/freebirdnp/pro/readme.md | 21 ++ keyboards/keebsforall/freebirdnp/pro/rules.mk | 21 ++ 18 files changed, 962 insertions(+) create mode 100644 keyboards/keebsforall/freebirdnp/lite/config.h create mode 100644 keyboards/keebsforall/freebirdnp/lite/info.json create mode 100644 keyboards/keebsforall/freebirdnp/lite/keymaps/default/keymap.c create mode 100644 keyboards/keebsforall/freebirdnp/lite/keymaps/via/keymap.c create mode 100755 keyboards/keebsforall/freebirdnp/lite/keymaps/via/rules.mk create mode 100644 keyboards/keebsforall/freebirdnp/lite/lite.c create mode 100644 keyboards/keebsforall/freebirdnp/lite/lite.h create mode 100644 keyboards/keebsforall/freebirdnp/lite/readme.md create mode 100644 keyboards/keebsforall/freebirdnp/lite/rules.mk create mode 100644 keyboards/keebsforall/freebirdnp/pro/config.h create mode 100644 keyboards/keebsforall/freebirdnp/pro/info.json create mode 100644 keyboards/keebsforall/freebirdnp/pro/keymaps/default/keymap.c create mode 100644 keyboards/keebsforall/freebirdnp/pro/keymaps/via/keymap.c create mode 100755 keyboards/keebsforall/freebirdnp/pro/keymaps/via/rules.mk create mode 100644 keyboards/keebsforall/freebirdnp/pro/pro.c create mode 100644 keyboards/keebsforall/freebirdnp/pro/pro.h create mode 100644 keyboards/keebsforall/freebirdnp/pro/readme.md create mode 100644 keyboards/keebsforall/freebirdnp/pro/rules.mk (limited to 'keyboards/keebsforall/freebirdnp') diff --git a/keyboards/keebsforall/freebirdnp/lite/config.h b/keyboards/keebsforall/freebirdnp/lite/config.h new file mode 100644 index 0000000000..317132eff3 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/lite/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2021 ELliot Powell + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6B66 +#define PRODUCT_ID 0x1013 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KeebsForAll +#define PRODUCT Freebird Numpad Lite + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B7, B6, B5, B4, B3 } +#define MATRIX_COL_PINS { C7, B2, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/keebsforall/freebirdnp/lite/info.json b/keyboards/keebsforall/freebirdnp/lite/info.json new file mode 100644 index 0000000000..1553264e08 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/lite/info.json @@ -0,0 +1,204 @@ +{ + "keyboard_name": "FreebirdNP Lite", + "url": "https://keebsforall.com/products/fb-numpad-lite", + "maintainer": "e11i0t23", + "manufacturer": "KeebsForAll", + "layouts": { + "LAYOUT_numpad_5x4": { + "layout": [ + { + "label": "Num Lock", + "x": 0, + "y": 0 + }, + { + "label": "/", + "x": 1, + "y": 0 + }, + { + "label": "*", + "x": 2, + "y": 0 + }, + { + "label": "-", + "x": 3, + "y": 0 + }, + { + "label": "7", + "x": 0, + "y": 1 + }, + { + "label": "8", + "x": 1, + "y": 1 + }, + { + "label": "9", + "x": 2, + "y": 1 + }, + { + "label": "4", + "x": 0, + "y": 2 + }, + { + "label": "5", + "x": 1, + "y": 2 + }, + { + "label": "6", + "x": 2, + "y": 2 + }, + { + "label": "+", + "x": 3, + "y": 1, + "h": 2 + }, + { + "label": "1", + "x": 0, + "y": 3 + }, + { + "label": "2", + "x": 1, + "y": 3 + }, + { + "label": "3", + "x": 2, + "y": 3 + }, + { + "label": "0", + "x": 0, + "y": 4, + "w": 2 + }, + { + "label": ".", + "x": 2, + "y": 4 + }, + { + "label": "Enter", + "x": 3, + "y": 3, + "h": 2 + } + ] + }, + "LAYOUT_ortho_5x4": { + "layout": [ + { + "label": "Num Lock", + "x": 0, + "y": 0 + }, + { + "label": "/", + "x": 1, + "y": 0 + }, + { + "label": "*", + "x": 2, + "y": 0 + }, + { + "label": "-", + "x": 3, + "y": 0 + }, + { + "label": "7", + "x": 0, + "y": 1 + }, + { + "label": "8", + "x": 1, + "y": 1 + }, + { + "label": "9", + "x": 2, + "y": 1 + }, + { + "label": "+", + "x": 3, + "y": 1 + }, + { + "label": "4", + "x": 0, + "y": 2 + }, + { + "label": "5", + "x": 1, + "y": 2 + }, + { + "label": "6", + "x": 2, + "y": 2 + }, + { + "label": "+", + "x": 3, + "y": 2 + }, + { + "label": "1", + "x": 0, + "y": 3 + }, + { + "label": "2", + "x": 1, + "y": 3 + }, + { + "label": "3", + "x": 2, + "y": 3 + }, + { + "label": "Enter", + "x": 3, + "y": 3 + }, + { + "label": "0", + "x": 0, + "y": 4 + }, + { + "label": "00", + "x": 1, + "y": 4 + }, + { + "label": ".", + "x": 2, + "y": 4 + }, + { + "label": "Enter", + "x": 3, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/keebsforall/freebirdnp/lite/keymaps/default/keymap.c b/keyboards/keebsforall/freebirdnp/lite/keymaps/default/keymap.c new file mode 100644 index 0000000000..3d7f4026f8 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/lite/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* Copyright 2021 Elliot Powell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_numpad_5x4( + TG(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT ), + +[1] = LAYOUT_numpad_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_NO, KC_RGHT, KC_TRNS, + KC_END, KC_DOWN, KC_PGDN, + KC_INS, KC_DEL, KC_TRNS), +}; diff --git a/keyboards/keebsforall/freebirdnp/lite/keymaps/via/keymap.c b/keyboards/keebsforall/freebirdnp/lite/keymaps/via/keymap.c new file mode 100644 index 0000000000..712b01dcfa --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/lite/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2021 Elliot Powell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_ortho_5x4( /* Base */ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT), + +[1] = LAYOUT_ortho_5x4( /* Empty for Dynamic keymap */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_ortho_5x4( /* Empty for Dynamic keymap */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_ortho_5x4( /* Empty for Dynamic keymap */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/keebsforall/freebirdnp/lite/keymaps/via/rules.mk b/keyboards/keebsforall/freebirdnp/lite/keymaps/via/rules.mk new file mode 100755 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/lite/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keebsforall/freebirdnp/lite/lite.c b/keyboards/keebsforall/freebirdnp/lite/lite.c new file mode 100644 index 0000000000..4d424c17da --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/lite/lite.c @@ -0,0 +1,16 @@ +/* Copyright 2021 Elliot Powell + * + * 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 "lite.h" diff --git a/keyboards/keebsforall/freebirdnp/lite/lite.h b/keyboards/keebsforall/freebirdnp/lite/lite.h new file mode 100644 index 0000000000..7f8cbdeeb0 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/lite/lite.h @@ -0,0 +1,48 @@ +/* Copyright 2021 Elliot Powell + * + * 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 XXX KC_NO + +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K13, \ + K30, K31, K32, \ + K40, K42, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, XXX }, \ + { K30, K31, K32, K33 }, \ + { K40, XXX, K42, XXX } \ +} + +#define LAYOUT_ortho_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ +} diff --git a/keyboards/keebsforall/freebirdnp/lite/readme.md b/keyboards/keebsforall/freebirdnp/lite/readme.md new file mode 100644 index 0000000000..e0d0dda059 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/lite/readme.md @@ -0,0 +1,19 @@ +# Freebird Numpad Lite + +A basic numpad build to support the freebird range of products by keebsforall + +* Keyboard Maintainer: [e11i0t23](https://github.com/e11i0t23) +* Hardware Supported: FreebirdNP Lite +* Hardware Availability: [KeebsForAll](https://keebsforall.com) + +Make example for this keyboard (after setting up your build environment): + + make keebsforall/freebirdnp/lite:default + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the top left key and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `RESET` if it is available + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/keebsforall/freebirdnp/lite/rules.mk b/keyboards/keebsforall/freebirdnp/lite/rules.mk new file mode 100644 index 0000000000..9f2621eeb3 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/lite/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +LAYOUTS = numpad_5x4 ortho_5x4 diff --git a/keyboards/keebsforall/freebirdnp/pro/config.h b/keyboards/keebsforall/freebirdnp/pro/config.h new file mode 100644 index 0000000000..53ced8ac03 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/pro/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2021 Elliot Powell + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6B66 +#define PRODUCT_ID 0x1014 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KeebsForAll +#define PRODUCT Freebird Numpad + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +#define ENCODERS_PAD_A { D4 } +#define ENCODERS_PAD_B { D5 } + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, B7, B6, B5, B4, B3 } +#define MATRIX_COL_PINS { C7, B2, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/keebsforall/freebirdnp/pro/info.json b/keyboards/keebsforall/freebirdnp/pro/info.json new file mode 100644 index 0000000000..5aa40c4a6d --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/pro/info.json @@ -0,0 +1,244 @@ +{ + "keyboard_name": "FreebirdNP Pro", + "url": "https://keebsforall.com/products/fb-numpad-pro", + "maintainer": "e11i0t23", + "manufacturer": "KeebsForAll", + "layouts": { + "LAYOUT_numpad_6x4": { + "layout": [ + { + "label": "F1", + "x": 0, + "y": 1 + }, + { + "label": "F2", + "x": 1, + "y": 1 + }, + { + "label": "F3", + "x": 2, + "y": 1 + }, + { + "label": "MUTE", + "x": 3, + "y": 1 + }, + { + "label": "Num Lock", + "x": 0, + "y": 1 + }, + { + "label": "/", + "x": 1, + "y": 1 + }, + { + "label": "*", + "x": 2, + "y": 1 + }, + { + "label": "-", + "x": 3, + "y": 1 + }, + { + "label": "7", + "x": 0, + "y": 2 + }, + { + "label": "8", + "x": 1, + "y": 2 + }, + { + "label": "9", + "x": 2, + "y": 2 + }, + { + "label": "4", + "x": 0, + "y": 3 + }, + { + "label": "5", + "x": 1, + "y": 3 + }, + { + "label": "6", + "x": 2, + "y": 3 + }, + { + "label": "+", + "x": 3, + "y": 2, + "h": 2 + }, + { + "label": "1", + "x": 0, + "y": 4 + }, + { + "label": "2", + "x": 1, + "y": 4 + }, + { + "label": "3", + "x": 2, + "y": 4 + }, + { + "label": "0", + "x": 0, + "y": 5, + "w": 2 + }, + { + "label": ".", + "x": 2, + "y": 5 + }, + { + "label": "Enter", + "x": 3, + "y": 4, + "h": 2 + } + ] + }, + "LAYOUT_ortho_6x4": { + "layout": [ + { + "label": "F1", + "x": 0, + "y": 1 + }, + { + "label": "F2", + "x": 1, + "y": 1 + }, + { + "label": "F3", + "x": 2, + "y": 1 + }, + { + "label": "MUTE", + "x": 3, + "y": 1 + }, + { + "label": "Num Lock", + "x": 0, + "y": 1 + }, + { + "label": "/", + "x": 1, + "y": 1 + }, + { + "label": "*", + "x": 2, + "y": 1 + }, + { + "label": "-", + "x": 3, + "y": 1 + }, + { + "label": "7", + "x": 0, + "y": 2 + }, + { + "label": "8", + "x": 1, + "y": 2 + }, + { + "label": "9", + "x": 2, + "y": 2 + }, + { + "label": "+", + "x": 3, + "y": 2 + }, + { + "label": "4", + "x": 0, + "y": 3 + }, + { + "label": "5", + "x": 1, + "y": 3 + }, + { + "label": "6", + "x": 2, + "y": 3 + }, + { + "label": "+", + "x": 3, + "y": 3 + }, + { + "label": "1", + "x": 0, + "y": 4 + }, + { + "label": "2", + "x": 1, + "y": 4 + }, + { + "label": "3", + "x": 2, + "y": 4 + }, + { + "label": "Enter", + "x": 3, + "y": 4 + }, + { + "label": "0", + "x": 0, + "y": 5 + }, + { + "label": "00", + "x": 1, + "y": 5 + }, + { + "label": ".", + "x": 2, + "y": 5 + }, + { + "label": "Enter", + "x": 3, + "y": 5 + } + ] + } + } +} diff --git a/keyboards/keebsforall/freebirdnp/pro/keymaps/default/keymap.c b/keyboards/keebsforall/freebirdnp/pro/keymaps/default/keymap.c new file mode 100644 index 0000000000..db6b1faf53 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/pro/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2021 Elliot Powell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_numpad_6x4( + KC_F1, KC_F2, KC_F3, KC_MUTE, + TG(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT ), + +[1] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_NO, KC_RGHT, KC_TRNS, + KC_END, KC_DOWN, KC_PGDN, + KC_INS, KC_DEL, KC_TRNS), +}; + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + return false; +} diff --git a/keyboards/keebsforall/freebirdnp/pro/keymaps/via/keymap.c b/keyboards/keebsforall/freebirdnp/pro/keymaps/via/keymap.c new file mode 100644 index 0000000000..e08edb6182 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/pro/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2021 Elliot Powell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_ortho_6x4( /* Base */ + KC_F1, KC_F2, KC_F3, KC_MUTE, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT), + +[1] = LAYOUT_ortho_6x4( /* Empty for Dynamic keymap */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_ortho_6x4( /* Empty for Dynamic keymap */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_ortho_6x4( /* Empty for Dynamic keymap */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/keebsforall/freebirdnp/pro/keymaps/via/rules.mk b/keyboards/keebsforall/freebirdnp/pro/keymaps/via/rules.mk new file mode 100755 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/pro/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keebsforall/freebirdnp/pro/pro.c b/keyboards/keebsforall/freebirdnp/pro/pro.c new file mode 100644 index 0000000000..dcc72d39b4 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/pro/pro.c @@ -0,0 +1,28 @@ +/* Copyright 2021 Elliot Powell + * + * 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 "pro.h" + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + return false; +} diff --git a/keyboards/keebsforall/freebirdnp/pro/pro.h b/keyboards/keebsforall/freebirdnp/pro/pro.h new file mode 100644 index 0000000000..41b241bee1 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/pro/pro.h @@ -0,0 +1,52 @@ +/* Copyright 2021 Elliot Powell + * + * 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 XXX KC_NO + +#define LAYOUT_numpad_6x4( \ + KF0, KF1, KF2, KF3, \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K13, \ + K30, K31, K32, \ + K40, K42, K33 \ +) { \ + { KF0, KF1, KF2, KF3 }, \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, XXX }, \ + { K30, K31, K32, K33 }, \ + { K40, XXX, K42, XXX } \ +} + +#define LAYOUT_ortho_6x4( \ + KF0, KF1, KF2, KF3, \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) { \ + { KF0, KF1, KF2, KF3 }, \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ +} diff --git a/keyboards/keebsforall/freebirdnp/pro/readme.md b/keyboards/keebsforall/freebirdnp/pro/readme.md new file mode 100644 index 0000000000..3b06a72d11 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/pro/readme.md @@ -0,0 +1,21 @@ +# Freebird Numpad Pro + +A basic numpad build to support the freebird range of products by keebsforall + +Pro Model features an Frow and Encoder + +* Keyboard Maintainer: [e11i0t23](https://github.com/e11i0t23) +* Hardware Supported: FreebirdNP Pro +* Hardware Availability: [KeebsForAll](https://keebsforall.com) + +Make example for this keyboard (after setting up your build environment): + + make keebsforall/freebirdnp/pro:default + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the top left key and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `RESET` if it is available + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/keebsforall/freebirdnp/pro/rules.mk b/keyboards/keebsforall/freebirdnp/pro/rules.mk new file mode 100644 index 0000000000..fae02c7844 --- /dev/null +++ b/keyboards/keebsforall/freebirdnp/pro/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes + +LAYOUTS = numpad_6x4 ortho_6x4 -- cgit v1.2.3