From 8a6da095d22d66c0ba36ce8731c9d821ca4262e9 Mon Sep 17 00:00:00 2001 From: fOmey Date: Fri, 14 Jan 2022 05:59:16 +1100 Subject: [Keyboard] Atlantis AK81_VE support (#15392) --- keyboards/atlantis/ak81_ve/ak81_ve.c | 60 +++++++++++ keyboards/atlantis/ak81_ve/ak81_ve.h | 35 ++++++ keyboards/atlantis/ak81_ve/config.h | 117 +++++++++++++++++++++ keyboards/atlantis/ak81_ve/info.json | 91 ++++++++++++++++ .../atlantis/ak81_ve/keymaps/default/keymap.c | 37 +++++++ keyboards/atlantis/ak81_ve/keymaps/via/keymap.c | 69 ++++++++++++ keyboards/atlantis/ak81_ve/keymaps/via/rules.mk | 4 + keyboards/atlantis/ak81_ve/readme.md | 23 ++++ keyboards/atlantis/ak81_ve/rules.mk | 22 ++++ keyboards/atlantis/encoder_actions.c | 68 ++++++++++++ keyboards/atlantis/encoder_actions.h | 21 ++++ keyboards/atlantis/readme.md | 7 ++ 12 files changed, 554 insertions(+) create mode 100644 keyboards/atlantis/ak81_ve/ak81_ve.c create mode 100644 keyboards/atlantis/ak81_ve/ak81_ve.h create mode 100644 keyboards/atlantis/ak81_ve/config.h create mode 100644 keyboards/atlantis/ak81_ve/info.json create mode 100644 keyboards/atlantis/ak81_ve/keymaps/default/keymap.c create mode 100644 keyboards/atlantis/ak81_ve/keymaps/via/keymap.c create mode 100644 keyboards/atlantis/ak81_ve/keymaps/via/rules.mk create mode 100644 keyboards/atlantis/ak81_ve/readme.md create mode 100644 keyboards/atlantis/ak81_ve/rules.mk create mode 100644 keyboards/atlantis/encoder_actions.c create mode 100644 keyboards/atlantis/encoder_actions.h create mode 100644 keyboards/atlantis/readme.md (limited to 'keyboards/atlantis') diff --git a/keyboards/atlantis/ak81_ve/ak81_ve.c b/keyboards/atlantis/ak81_ve/ak81_ve.c new file mode 100644 index 0000000000..b8ef4ee225 --- /dev/null +++ b/keyboards/atlantis/ak81_ve/ak81_ve.c @@ -0,0 +1,60 @@ +/* Copyright 2022 @fOmey + * + * 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 "ak81_ve.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 12, 11, 10, 9, 8, 7, 6, 5, 4, NO_LED, 3, 2, 1, 0 }, // 13 keys + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13 }, // 15 keys + { 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 }, // 15 keys + { 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED }, // 14 keys + { 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, NO_LED, 58, 57 }, // 14 keys + { 79, 78, 77, NO_LED, NO_LED, NO_LED, 76, NO_LED, NO_LED, NO_LED, 75, 74, 73, 72, 71 } // 9 keys +}, { + // LED Index to Physical Positon + { 240, 0 }, { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 32, 0 }, + { 240, 13 }, { 224, 13 }, { 208, 13 }, { 192 , 13 }, { 176, 13 }, { 160, 13 }, { 144, 13 }, { 128, 13 }, { 112, 13 }, { 96, 13 }, { 80, 13 }, { 64, 13}, { 48, 13 }, { 32, 13 }, { 16, 13 }, + { 240, 26 }, { 224, 26 }, { 208, 26 }, { 192 , 26 }, { 176, 26 }, { 160, 26 }, { 144, 26 }, { 128, 26 }, { 112, 26 }, { 96, 26 }, { 80, 26 }, { 64, 26}, { 48, 26 }, { 32, 26 }, { 16, 26 }, + { 240, 39 }, { 216, 39 }, { 192 , 39 }, { 176, 39 }, { 160, 39 }, { 144, 39 }, { 128, 39 }, { 112, 39 }, { 96, 39 }, { 80, 39 }, { 64, 39}, { 48, 39 }, { 32, 39 }, { 16, 39 }, + { 240, 52 }, { 224, 52 }, { 208, 52 }, { 192 , 52 }, { 176, 52 }, { 160, 52 }, { 144, 52 }, { 128, 52 }, { 112, 52 }, { 96, 52 }, { 80, 52 }, { 64, 52}, { 48, 52 }, { 24, 52 }, + { 240, 64 }, { 224, 64 }, { 208, 64 }, { 192, 64 }, { 176, 64 }, { 112, 64 }, { 48, 64 }, { 32, 64 }, { 16, 64 } +}, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, + 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, 4, 1, 1, 4, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +} }; +#endif + +#if !defined(VIA_ENABLE) && defined(ENCODER_ENABLE) +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + return false; + } + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + return true; +} +#endif \ No newline at end of file diff --git a/keyboards/atlantis/ak81_ve/ak81_ve.h b/keyboards/atlantis/ak81_ve/ak81_ve.h new file mode 100644 index 0000000000..c43f477c0a --- /dev/null +++ b/keyboards/atlantis/ak81_ve/ak81_ve.h @@ -0,0 +1,35 @@ +/* Copyright 2022 @fOmey + * + * 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" +#include "encoder_actions.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K506, K510, K511, K512, K513, K514 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, KC_NO, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414 }, \ + { K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514 } \ +} diff --git a/keyboards/atlantis/ak81_ve/config.h b/keyboards/atlantis/ak81_ve/config.h new file mode 100644 index 0000000000..0167d0e184 --- /dev/null +++ b/keyboards/atlantis/ak81_ve/config.h @@ -0,0 +1,117 @@ +/* Copyright 2022 @fOmey + * + * 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 0x416B +#define PRODUCT_ID 0x0081 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Atlantis +#define PRODUCT AK81_VE + +/* Key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* Key matrix pins */ +#define MATRIX_ROW_PINS { F1, F7, F6, F5, F4, D5 } +#define MATRIX_COL_PINS { F0, C7, C6, B6, B5, B4, D7, D6, B2, B7, D3, D2, D1, D0, B3 } +#define UNUSED_PINS + +/* Encoder pins */ +#define ENCODERS_PAD_A { B0 } +#define ENCODERS_PAD_B { E6 } +#define ENCODER_RESOLUTION 4 +#define ENCODERS 1 +#define ENCODERS_CCW_KEY { { 3, 5 } } // Note: array is { col, row ) +#define ENCODERS_CW_KEY { { 4, 5 } } // Note: array is { col, row ) + +/* LED pins */ +#define LED_CAPS_LOCK_PIN D4 +#define LED_PIN_ON_STATE 0 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE +#define FORCE_NKRO + +#define RGB_DI_PIN B1 +#ifdef RGB_DI_PIN + +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define DRIVER_LED_TOTAL 96 +#define RGB_MATRIX_STARTUP_HUE 170 +#define RGB_MATRIX_STARTUP_SAT 255 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 130 +#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS + +#define RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +#define RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +#define RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes +#define RGB_MATRIX_BREATHING // Single hue brightness cycling animation +#define RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#define RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#define RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#define RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#define RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#define RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#define RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +#define RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +#define RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#define RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#define RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#define RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#define RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +#define RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#define RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#define RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#define RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +#define RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +#define RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +#define RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +#define RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +#define RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right +#define RGB_MATRIX_PIXEL_FRACTAL // Single hue fractal filled keys pulsing horizontally out to edges +#define RGB_MATRIX_PIXEL_RAIN // Randomly light keys with random hues +#define RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#define RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +#define RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#define RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +#define RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#define RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#define RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#define RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#define RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#define RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +#define RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +#define RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +#define RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +#define RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out + +#endif \ No newline at end of file diff --git a/keyboards/atlantis/ak81_ve/info.json b/keyboards/atlantis/ak81_ve/info.json new file mode 100644 index 0000000000..8d4a8ebf59 --- /dev/null +++ b/keyboards/atlantis/ak81_ve/info.json @@ -0,0 +1,91 @@ +{ + "keyboard_name": "AK81_VE", + "maintainer": "fOmey", + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "Del", "x": 16.25, "y": 0 }, + { "label": "~", "x": 0, "y": 1 }, + { "label": "!", "x": 1, "y": 1 }, + { "label": "@", "x": 2, "y": 1 }, + { "label": "#", "x": 3, "y": 1 }, + { "label": "$", "x": 4, "y": 1 }, + { "label": "%", "x": 5, "y": 1 }, + { "label": "^", "x": 6, "y": 1 }, + { "label": "&", "x": 7, "y": 1 }, + { "label": "*", "x": 8, "y": 1 }, + { "label": "(", "x": 9, "y": 1 }, + { "label": ")", "x": 10, "y": 1 }, + { "label": "_", "x": 11, "y": 1 }, + { "label": "+", "x": 12, "y": 1 }, + { "label": "Backspace", "w": 2, "x": 13, "y": 1 }, + { "label": "Home", "x": 16.25, "y": 1 }, + { "label": "Tab", "w": 1.5, "x": 0, "y": 2 }, + { "label": "Q", "x": 1.5, "y": 2 }, + { "label": "W", "x": 2.5, "y": 2 }, + { "label": "E", "x": 3.5, "y": 2 }, + { "label": "R", "x": 4.5, "y": 2 }, + { "label": "T", "x": 5.5, "y": 2 }, + { "label": "Y", "x": 6.5, "y": 2 }, + { "label": "U", "x": 7.5, "y": 2 }, + { "label": "I", "x": 8.5, "y": 2 }, + { "label": "O", "x": 9.5, "y": 2 }, + { "label": "P", "x": 10.5, "y": 2 }, + { "label": "{", "x": 11.5, "y": 2 }, + { "label": "}", "x": 12.5, "y": 2 }, + { "label": "|", "w": 1.5, "x": 13.5, "y": 2 }, + { "label": "PageUp", "x": 16.25, "y": 2 }, + { "label": "Capslock", "w": 1.75, "x": 0, "y": 3 }, + { "label": "A", "x": 1.75, "y": 3 }, + { "label": "S", "x": 2.75, "y": 3 }, + { "label": "D", "x": 3.75, "y": 3 }, + { "label": "F", "x": 4.75, "y": 3 }, + { "label": "G", "x": 5.75, "y": 3 }, + { "label": "H", "x": 6.75, "y": 3 }, + { "label": "J", "x": 7.75, "y": 3 }, + { "label": "K", "x": 8.75, "y": 3 }, + { "label": "L", "x": 9.75, "y": 3 }, + { "label": ":", "x": 10.75, "y": 3 }, + { "label": "\"", "x": 11.75, "y": 3 }, + { "label": "Enter", "w": 2.25, "x": 12.75, "y": 3 }, + { "label": "PageDown", "x": 16.25, "y": 3 }, + { "label": "Shift", "w": 2.25, "x": 0, "y": 4 }, + { "label": "Z", "x": 2.25, "y": 4 }, + { "label": "X", "x": 3.25, "y": 4 }, + { "label": "C", "x": 4.25, "y": 4 }, + { "label": "V", "x": 5.25, "y": 4 }, + { "label": "B", "x": 6.25, "y": 4 }, + { "label": "N", "x": 7.25, "y": 4 }, + { "label": "M", "x": 8.25, "y": 4 }, + { "label": ",", "x": 9.25, "y": 4 }, + { "label": ".", "x": 10.25, "y": 4 }, + { "label": "?", "x": 11.25, "y": 4 }, + { "label": "Shift", "w": 1.75, "x": 12.25, "y": 4 }, + { "label": "Up", "x": 14.25, "y": 4.25 }, + { "label": "End", "x": 16.25, "y": 4 }, + { "label": "Ctrl", "w": 1.25, "x": 0, "y": 5 }, + { "label": "Win", "w": 1.25, "x": 1.25, "y": 5 }, + { "label": "Alt", "w": 1.25, "x": 2.5, "y": 5 }, + { "w": 6.25, "x": 3.75, "y": 5 }, + { "label": "Alt", "w": 1.25, "x": 10, "y": 5 }, + { "label": "Fn", "w": 1.25, "x": 11.25, "y": 5 }, + { "label": "Left", "x": 13.25, "y": 5.25 }, + { "label": "Down", "x": 14.25, "y": 5.25 }, + { "label": "Right", "x": 15.25, "y": 5.25 } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/atlantis/ak81_ve/keymaps/default/keymap.c b/keyboards/atlantis/ak81_ve/keymaps/default/keymap.c new file mode 100644 index 0000000000..a11091c8b9 --- /dev/null +++ b/keyboards/atlantis/ak81_ve/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2022 @fOmey + * + * 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( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT( + KC_SYSTEM_SLEEP, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, + _______, _______, _______, KC_CALC, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, RGB_HUI, RGB_SPD, + _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI) + +}; \ No newline at end of file diff --git a/keyboards/atlantis/ak81_ve/keymaps/via/keymap.c b/keyboards/atlantis/ak81_ve/keymaps/via/keymap.c new file mode 100644 index 0000000000..106d966fa7 --- /dev/null +++ b/keyboards/atlantis/ak81_ve/keymaps/via/keymap.c @@ -0,0 +1,69 @@ +/* Copyright 2022 @fOmey + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +#define LAYOUT_via( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K503, K504, K506, K510, K511, K512, K513, K514 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, KC_NO, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414 }, \ + { K500, K501, K502, K503, K504, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514 } \ +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_via( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_VOLD, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_via( + KC_SYSTEM_SLEEP, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, + _______, _______, _______, KC_CALC, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, RGB_HUI, RGB_SPD, + _______, _______, _______, RGB_MOD, RGB_RMOD, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI), + + [2] = LAYOUT_via( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT_via( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + +}; \ No newline at end of file diff --git a/keyboards/atlantis/ak81_ve/keymaps/via/rules.mk b/keyboards/atlantis/ak81_ve/keymaps/via/rules.mk new file mode 100644 index 0000000000..041588872a --- /dev/null +++ b/keyboards/atlantis/ak81_ve/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +SRC += encoder_actions.c \ No newline at end of file diff --git a/keyboards/atlantis/ak81_ve/readme.md b/keyboards/atlantis/ak81_ve/readme.md new file mode 100644 index 0000000000..d9a6f9627c --- /dev/null +++ b/keyboards/atlantis/ak81_ve/readme.md @@ -0,0 +1,23 @@ +# ATLANTIS AK81_VE + +![ATLANTIS AK81_VE](https://i.imgur.com/nfuocgS.jpeg) + +A 75% hotswap keyboard with per key RGB backlighting, RGB underglow and a rotary encoder. + +* Keyboard Maintainer: [fOmey](https://github.com/fOmey) +* Hardware Supported: AK75X@AK81_VE +* Hardware Availability: [AliExpress.com](https://aliexpress.com), [Shopee](https://shopee.com.my) + +Make example for this keyboard (after setting up your build environment): + + make atlantis/ak81_ve:default + +## Bootloader + +Enter the bootloader in 2 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix +* **Keycode in layout**: Press the key mapped to `RESET` if it is available +* **Physical reset pins**: Briefly short the reset pins using tweezers, a paperclip, or any other conductive material. + +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). \ No newline at end of file diff --git a/keyboards/atlantis/ak81_ve/rules.mk b/keyboards/atlantis/ak81_ve/rules.mk new file mode 100644 index 0000000000..45d044f9fc --- /dev/null +++ b/keyboards/atlantis/ak81_ve/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Keyboard backlight functionality +RGBLIGHT_ENABLE = no # Keyboard RGB underglow +RGB_MATRIX_ENABLE = yes # Enable RGB matrix effects +RGB_MATRIX_DRIVER = WS2812 +AUDIO_ENABLE = no # Audio output +DYNAMIC_MACRO_ENABLE = yes +ENCODER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/atlantis/encoder_actions.c b/keyboards/atlantis/encoder_actions.c new file mode 100644 index 0000000000..b41a248a83 --- /dev/null +++ b/keyboards/atlantis/encoder_actions.c @@ -0,0 +1,68 @@ +/* Copyright 2020 Neil Brian Ramirez + * Copyright 2021 drashna jael're (@drashna) + * + * 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 3 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 "encoder_actions.h" + +#if defined(VIA_ENABLE) && defined(ENCODER_ENABLE) + +# ifdef ENCODERS +static uint8_t encoder_state[ENCODERS] = {0}; +static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +# endif + +void encoder_action_unregister(void) { +# ifdef ENCODERS + for (int index = 0; index < ENCODERS; ++index) { + if (encoder_state[index]) { + keyevent_t encoder_event = (keyevent_t) { + .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], + .pressed = false, + .time = (timer_read() | 1) + }; + encoder_state[index] = 0; + action_exec(encoder_event); + } + } +# endif +} + +void encoder_action_register(uint8_t index, bool clockwise) { +# ifdef ENCODERS + keyevent_t encoder_event = (keyevent_t) { + .key = clockwise ? encoder_cw[index] : encoder_ccw[index], + .pressed = true, + .time = (timer_read() | 1) + }; + encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); + action_exec(encoder_event); +# endif +} + +void matrix_scan_kb(void) { + encoder_action_unregister(); + matrix_scan_user(); +} + +bool encoder_update_kb(uint8_t index, bool clockwise) { + encoder_action_register(index, clockwise); + // don't return user actions, because they are in the keymap + // encoder_update_user(index, clockwise); + return true; +}; + +#endif diff --git a/keyboards/atlantis/encoder_actions.h b/keyboards/atlantis/encoder_actions.h new file mode 100644 index 0000000000..2484af52ae --- /dev/null +++ b/keyboards/atlantis/encoder_actions.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * 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 3 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 "quantum.h" + +void encoder_action_unregister(void); + +void encoder_action_register(uint8_t index, bool clockwise); diff --git a/keyboards/atlantis/readme.md b/keyboards/atlantis/readme.md new file mode 100644 index 0000000000..50a2cc2fed --- /dev/null +++ b/keyboards/atlantis/readme.md @@ -0,0 +1,7 @@ +# Atlantis + +A company that has been known to create some unorthodox and unique styled keyboard layouts, a great example of this is the AK82. The AK82 is a 60% layout with a numpad (numpad pictured commonly on the left, however a right side variant the AK82_VE exists). + +Atlantis also produce some more traditional layouts like the AK81 a 75% layout (AK81_VE variant includes a rotary enconder) and a large range of macro pads. + +Atlantis seem to be operating mainly out of Malaysia, products can be difficult to source internationally. \ No newline at end of file -- cgit v1.2.3