diff --git a/keyboards/keychron/k6/rgb/ansi/config.h b/keyboards/keychron/k6/rgb/ansi/config.h new file mode 100644 index 000000000000..f745ca25e692 --- /dev/null +++ b/keyboards/keychron/k6/rgb/ansi/config.h @@ -0,0 +1,17 @@ +/* Copyright 2023 Santanu Paik (https://github.com/itnerd69) + * + * 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 . + */ + +#define RGB_MATRIX_LED_COUNT 68 diff --git a/keyboards/keychron/k6/rgb/ansi/keyboard.json b/keyboards/keychron/k6/rgb/ansi/keyboard.json new file mode 100644 index 000000000000..2fa213471564 --- /dev/null +++ b/keyboards/keychron/k6/rgb/ansi/keyboard.json @@ -0,0 +1,161 @@ +{ + "keyboard_name": "Keychron K6", + "usb": { + "pid": "0xFE0A" + }, + "layouts": { + "LAYOUT_65_ansi": { + "layout": [ + {"matrix":[0, 0], "x":0, "y":0}, + {"matrix":[0, 1], "x":1, "y":0}, + {"matrix":[0, 2], "x":2, "y":0}, + {"matrix":[0, 3], "x":3, "y":0}, + {"matrix":[0, 4], "x":4, "y":0}, + {"matrix":[0, 5], "x":5, "y":0}, + {"matrix":[0, 6], "x":6, "y":0}, + {"matrix":[0, 7], "x":7, "y":0}, + {"matrix":[0, 8], "x":8, "y":0}, + {"matrix":[0, 9], "x":9, "y":0}, + {"matrix":[0, 10], "x":10, "y":0}, + {"matrix":[0, 11], "x":11, "y":0}, + {"matrix":[0, 12], "x":12, "y":0}, + {"matrix":[0, 13], "x":13, "y":0, "w":2}, + {"matrix":[0, 15], "x":15, "y":0}, + + {"matrix":[1, 0], "x":0, "y":1, "w":1.5}, + {"matrix":[1, 1], "x":1.5, "y":1}, + {"matrix":[1, 2], "x":2.5, "y":1}, + {"matrix":[1, 3], "x":3.5, "y":1}, + {"matrix":[1, 4], "x":4.5, "y":1}, + {"matrix":[1, 5], "x":5.5, "y":1}, + {"matrix":[1, 6], "x":6.5, "y":1}, + {"matrix":[1, 7], "x":7.5, "y":1}, + {"matrix":[1, 8], "x":8.5, "y":1}, + {"matrix":[1, 9], "x":9.5, "y":1}, + {"matrix":[1, 10], "x":10.5, "y":1}, + {"matrix":[1, 11], "x":11.5, "y":1}, + {"matrix":[1, 12], "x":12.5, "y":1}, + {"matrix":[1, 13], "x":13.5, "y":1, "w":1.5}, + {"matrix":[1, 15], "x":15, "y":1}, + + {"matrix":[2, 0], "x":0, "y":2, "w":1.75}, + {"matrix":[2, 1], "x":1.75, "y":2}, + {"matrix":[2, 2], "x":2.75, "y":2}, + {"matrix":[2, 3], "x":3.75, "y":2}, + {"matrix":[2, 4], "x":4.75, "y":2}, + {"matrix":[2, 5], "x":5.75, "y":2}, + {"matrix":[2, 6], "x":6.75, "y":2}, + {"matrix":[2, 7], "x":7.75, "y":2}, + {"matrix":[2, 8], "x":8.75, "y":2}, + {"matrix":[2, 9], "x":9.75, "y":2}, + {"matrix":[2, 10], "x":10.75, "y":2}, + {"matrix":[2, 11], "x":11.75, "y":2}, + {"matrix":[2, 13], "x":12.75, "y":2, "w":2.25}, + {"matrix":[2, 15], "x":15, "y":2}, + + {"matrix":[3, 0], "x":0, "y":3, "w":2.25}, + {"matrix":[3, 2], "x":2.25, "y":3}, + {"matrix":[3, 3], "x":3.25, "y":3}, + {"matrix":[3, 4], "x":4.25, "y":3}, + {"matrix":[3, 5], "x":5.25, "y":3}, + {"matrix":[3, 6], "x":6.25, "y":3}, + {"matrix":[3, 7], "x":7.25, "y":3}, + {"matrix":[3, 8], "x":8.25, "y":3}, + {"matrix":[3, 9], "x":9.25, "y":3}, + {"matrix":[3, 10], "x":10.25, "y":3}, + {"matrix":[3, 11], "x":11.25, "y":3}, + {"matrix":[3, 13], "x":12.25, "y":3, "w":1.75}, + {"matrix":[3, 14], "x":14, "y":3}, + {"matrix":[3, 15], "x":15, "y":3}, + + {"matrix":[4, 0], "x":0, "y":4, "w":1.25}, + {"matrix":[4, 1], "x":1.25, "y":4, "w":1.25}, + {"matrix":[4, 2], "x":2.5, "y":4, "w":1.25}, + {"matrix":[4, 6], "x":3.75, "y":4, "w":6.25}, + {"matrix":[4, 10], "x":10, "y":4}, + {"matrix":[4, 11], "x":11, "y":4}, + {"matrix":[4, 12], "x":12, "y":4}, + {"matrix":[4, 13], "x":13, "y":4}, + {"matrix":[4, 14], "x":14, "y":4}, + {"matrix":[4, 15], "x":15, "y":4} + ] + } + }, + "rgb_matrix": { + "layout": [ + { "matrix": [ 0, 0 ], "flags": 4, "x": 0, "y": 0 }, + { "matrix": [ 0, 1 ], "flags": 4, "x": 12, "y": 0 }, + { "matrix": [ 0, 2 ], "flags": 4, "x": 25, "y": 0 }, + { "matrix": [ 0, 3 ], "flags": 4, "x": 37, "y": 0 }, + { "matrix": [ 0, 4 ], "flags": 4, "x": 50, "y": 0 }, + { "matrix": [ 0, 5 ], "flags": 4, "x": 62, "y": 0 }, + { "matrix": [ 0, 6 ], "flags": 4, "x": 75, "y": 0 }, + { "matrix": [ 0, 7 ], "flags": 4, "x": 87, "y": 0 }, + { "matrix": [ 0, 8 ], "flags": 4, "x": 100, "y": 0 }, + { "matrix": [ 0, 9 ], "flags": 4, "x": 112, "y": 0 }, + { "matrix": [ 0, 10 ], "flags": 4, "x": 124, "y": 0 }, + { "matrix": [ 0, 11 ], "flags": 4, "x": 137, "y": 0 }, + { "matrix": [ 0, 12 ], "flags": 4, "x": 149, "y": 0 }, + { "matrix": [ 0, 13 ], "flags": 4, "x": 168, "y": 0 }, + { "matrix": [ 0, 15 ], "flags": 4, "x": 187, "y": 0 }, + + { "matrix": [ 1, 0 ], "flags": 4, "x": 3, "y": 16 }, + { "matrix": [ 1, 1 ], "flags": 4, "x": 19, "y": 16 }, + { "matrix": [ 1, 2 ], "flags": 4, "x": 31, "y": 16 }, + { "matrix": [ 1, 3 ], "flags": 4, "x": 44, "y": 16 }, + { "matrix": [ 1, 4 ], "flags": 4, "x": 56, "y": 16 }, + { "matrix": [ 1, 5 ], "flags": 4, "x": 68, "y": 16 }, + { "matrix": [ 1, 6 ], "flags": 4, "x": 81, "y": 16 }, + { "matrix": [ 1, 7 ], "flags": 4, "x": 93, "y": 16 }, + { "matrix": [ 1, 8 ], "flags": 4, "x": 106, "y": 16 }, + { "matrix": [ 1, 9 ], "flags": 4, "x": 118, "y": 16 }, + { "matrix": [ 1, 10 ], "flags": 4, "x": 131, "y": 16 }, + { "matrix": [ 1, 11 ], "flags": 4, "x": 143, "y": 16 }, + { "matrix": [ 1, 12 ], "flags": 4, "x": 156, "y": 16 }, + { "matrix": [ 1, 13 ], "flags": 4, "x": 168, "y": 16 }, + { "matrix": [ 1, 15 ], "flags": 4, "x": 187, "y": 16 }, + + { "matrix": [ 2, 0 ], "flags": 4, "x": 5, "y": 32 }, + { "matrix": [ 2, 1 ], "flags": 4, "x": 22, "y": 32 }, + { "matrix": [ 2, 2 ], "flags": 4, "x": 34, "y": 32 }, + { "matrix": [ 2, 3 ], "flags": 4, "x": 47, "y": 32 }, + { "matrix": [ 2, 4 ], "flags": 4, "x": 59, "y": 32 }, + { "matrix": [ 2, 5 ], "flags": 4, "x": 72, "y": 32 }, + { "matrix": [ 2, 6 ], "flags": 4, "x": 84, "y": 32 }, + { "matrix": [ 2, 7 ], "flags": 4, "x": 96, "y": 32 }, + { "matrix": [ 2, 8 ], "flags": 4, "x": 109, "y": 32 }, + { "matrix": [ 2, 9 ], "flags": 4, "x": 121, "y": 32 }, + { "matrix": [ 2, 10 ], "flags": 4, "x": 134, "y": 32 }, + { "matrix": [ 2, 11 ], "flags": 4, "x": 146, "y": 32 }, + { "matrix": [ 2, 13 ], "flags": 4, "x": 166, "y": 32 }, + { "matrix": [ 2, 15 ], "flags": 4, "x": 187, "y": 32 }, + + { "matrix": [ 3, 0 ], "flags": 4, "x": 8, "y": 48 }, + { "matrix": [ 3, 2 ], "flags": 4, "x": 28, "y": 48 }, + { "matrix": [ 3, 3 ], "flags": 4, "x": 40, "y": 48 }, + { "matrix": [ 3, 4 ], "flags": 4, "x": 53, "y": 48 }, + { "matrix": [ 3, 5 ], "flags": 4, "x": 65, "y": 48 }, + { "matrix": [ 3, 6 ], "flags": 4, "x": 78, "y": 48 }, + { "matrix": [ 3, 7 ], "flags": 4, "x": 90, "y": 48 }, + { "matrix": [ 3, 8 ], "flags": 4, "x": 103, "y": 48 }, + { "matrix": [ 3, 9 ], "flags": 4, "x": 115, "y": 48 }, + { "matrix": [ 3, 10 ], "flags": 4, "x": 128, "y": 48 }, + { "matrix": [ 3, 11 ], "flags": 4, "x": 140, "y": 48 }, + { "matrix": [ 3, 13 ], "flags": 4, "x": 157, "y": 48 }, + { "matrix": [ 3, 14 ], "flags": 4, "x": 174, "y": 48 }, + { "matrix": [ 3, 15 ], "flags": 4, "x": 187, "y": 48 }, + + { "matrix": [ 4, 0 ], "flags": 4, "x": 2, "y": 64 }, + { "matrix": [ 4, 1 ], "flags": 4, "x": 17, "y": 64 }, + { "matrix": [ 4, 2 ], "flags": 4, "x": 33, "y": 64 }, + { "matrix": [ 4, 6 ], "flags": 4, "x": 79, "y": 64 }, + { "matrix": [ 4, 10 ], "flags": 4, "x": 124, "y": 64 }, + { "matrix": [ 4, 11 ], "flags": 4, "x": 137, "y": 64 }, + { "matrix": [ 4, 12 ], "flags": 4, "x": 149, "y": 64 }, + { "matrix": [ 4, 13 ], "flags": 4, "x": 162, "y": 64 }, + { "matrix": [ 4, 14 ], "flags": 4, "x": 174, "y": 64 }, + { "matrix": [ 4, 15 ], "flags": 4, "x": 187, "y": 64 } + ] + } + +} diff --git a/keyboards/keychron/k6/rgb/ansi/readme.md b/keyboards/keychron/k6/rgb/ansi/readme.md new file mode 100644 index 000000000000..47146a35c4b8 --- /dev/null +++ b/keyboards/keychron/k6/rgb/ansi/readme.md @@ -0,0 +1,28 @@ +# Keychron K6 RGB ANSI + + +*A 65% keyboard sold by keychron* + +* Hardware Supported: *Keychron K6 RGB, MCU: SN32F248BF* +* Hardware Availability: *https://www.keychron.com/products/keychron-k6-wireless-mechanical-keyboard + +Compile example for this keyboard (after setting up your build environment): + + qmk compile -kb keychron/k6/rgb/ansi -km default + +Compile example for this keyboard with VIA (after setting up your build environment): + + qmk compile -kb keychron/k6/rgb/ansi -km via + +This keyboard must be flashed with an external [GUI](https://github.com/SonixQMK/sonix-flasher) or [CLI](https://github.com/SonixQMK/SonixFlasherC) + + + +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). + +## Bootloader + +Enter the bootloader in 2 ways: + +* **Physical Bootloader Pins**: Turn off the keyboard, Using a pair of tweezers or a paperclip, short the 2 pins left from spacebar switch holes and hold the tweezers on the pins while turning the keyboard on, this should put it into the bootloader. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. In the default keymap Fn+Esc. diff --git a/keyboards/keychron/k6/rgb/config.h b/keyboards/keychron/k6/rgb/config.h new file mode 100644 index 000000000000..1ef5ddbfe916 --- /dev/null +++ b/keyboards/keychron/k6/rgb/config.h @@ -0,0 +1,22 @@ +/* Copyright 2022 Philip Mourdjis + * Copyright 2023 KeijoMika (https://github.com/KeijoMika) + * Copyright 2023 Santanu Paik (https://github.com/ITNerd69) + * Copyright 2024 Uttarayan Mondal (https://github.com/uttarayan21) + * + * 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 SN32F2XX_RGB_MATRIX_ROW_PINS { C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 } +#define DIP_SWITCH_PINS { D4 } diff --git a/keyboards/keychron/k6/rgb/info.json b/keyboards/keychron/k6/rgb/info.json new file mode 100644 index 000000000000..15b276496de9 --- /dev/null +++ b/keyboards/keychron/k6/rgb/info.json @@ -0,0 +1,103 @@ +{ + "keyboard_name": "Keychron K6", + "manufacturer": "Keychron", + "url": "https://www.keychron.com/products/keychron-k6-wireless-mechanical-keyboard", + "maintainer": "tbowmo", + "debounce": 1, + "development_board": "sn32f240b_shared_matrix", + "diode_direction": "COL2ROW", + "features": { + "rgb_matrix": true, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": false, + "nkro": true, + "dip_switch": true + }, + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "typing_heatmap": true + }, + "driver": "sn32f2xx", + "react_on_keyup": true, + "sleep": true + }, + "matrix_pins": { + "cols": [ + "A8", + "A9", + "A10", + "A11", + "A12", + "A13", + "A14", + "A15", + "B0", + "B1", + "B2", + "B3", + "B4", + "B5", + "B6", + "B7" + ], + "rows": [ + "D11", + "D10", + "D9", + "D8", + "D7" + ] + }, + "indicators": { + "caps_lock": "B9" + }, + "usb": { + "vid": "0x3434", + "device_version": "1.0.0" + } +} diff --git a/keyboards/keychron/k6/rgb/keymaps/default/keymap.c b/keyboards/keychron/k6/rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..9c14f5275d04 --- /dev/null +++ b/keyboards/keychron/k6/rgb/keymaps/default/keymap.c @@ -0,0 +1,159 @@ +/* +Copyright 2022 Dimitris Mantzouranis +Copyright 2022 Pablo Ramirez +Copyright 2023 Santanu Paik (https://github.com/ITNerd69) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + WIN_BASE = 0, + WIN_FN1 = 1, + MAC_BASE = 2, + MAC_FN1 = 3, + FN2 = 4, +}; +#define KC_TASK LGUI(KC_TAB) // Task viewer +#define KC_FLXP LGUI(KC_E) // Windows file explorer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Windows Base + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│MOD│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │HOM│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PGU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PGD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│GUI │Alt │ Space │Ctl│Fn1│Fn2│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + [WIN_BASE] = LAYOUT_65_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, RGB_MOD, + 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_HOME, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, MO(WIN_FN1), MO(FN2), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Windows FN1 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │`~ │BRU│BRD│TSK│FLX│VAD│VAI│PRV│PLY│NXT│MTE│VLD│VLU│ │TOG│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │INS│DEL│END│ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │Alt│ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + [WIN_FN1] = LAYOUT_65_ansi( + KC_GRV, KC_BRIU, KC_BRID, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, KC_END, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_RALT, _______, _______, _______, _______, _______ + ), + /* Mac Base + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│MOD│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │HOM│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PGU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PGD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│Alt │GUI │ Space │GUI│Fn1│Fn2│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + [MAC_BASE] = LAYOUT_65_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, RGB_MOD, + 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_HOME, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN1), MO(FN2), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Mac FN1 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │`~ │BRU│BRD│MCT│LPD│VAD│VAI│PRV│PLY│NXT│MTE│VLD│VLU│ │TOG│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │INS│DEL│END│ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │Alt│ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + [MAC_FN1] = LAYOUT_65_ansi( + KC_GRV, KC_BRIU, KC_BRID, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, KC_END, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_RALT, _______, _______, _______, _______, _______ + ), + /* FN2 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ~ │ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│ RESET │MOD│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │M_P│M_B│M_R│MSW│ │ │ │ │ │ │ │ │ │RMD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │SPI│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │SAI│SPD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │HUD│SAD│HUI│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + [FN2] = LAYOUT_65_ansi( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, Q_RESET, RGB_MOD, + _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_SPD, + _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI + ) +}; + + +bool dip_switch_update_user(uint8_t index, bool active) { + switch(index) { + case 0: // OS switch + if (active) { // Mac/iOS mode + layer_move(WIN_BASE); + } + else { // Windows/Android mode + layer_move(MAC_BASE); + } + break; + } + return true; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + // debug_enable = true; + // debug_matrix = true; + // debug_keyboard = true; + // debug_mouse = true; +}