diff --git a/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/config.h b/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/config.h new file mode 100644 index 00000000000..5ace973ccca --- /dev/null +++ b/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/config.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0x48, 0xB3, 0x3A, 0x21, 0xAD, 0xC2, 0x00, 0x47} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 } +#define VIAL_UNLOCK_COMBO_COLS { 1, 14 } diff --git a/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/keymap.c b/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/keymap.c new file mode 100644 index 00000000000..4af969cac99 --- /dev/null +++ b/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2023 @ Keychron (https://www.keychron.com) + * + * 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 +#include "keychron_common.h" + +enum layers { + MAC_BASE, + WIN_BASE, + MAC_FN1, + WIN_FN1, + FN2 +}; +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [MAC_BASE] = LAYOUT_ansi_73( + KC_MUTE, 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, KC_DEL, + MC_2, 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, + MC_3, 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, + MC_4, 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, + MC_5, KC_LCTL, KC_LOPTN,KC_LCMMD, KC_SPC, KC_RCMMD, MO(MAC_FN1),MO(FN2),KC_LEFT, KC_DOWN, KC_RGHT), + + [WIN_BASE] = LAYOUT_ansi_73( + KC_MUTE, 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, KC_DEL, + MC_2, 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, + MC_3, 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, + MC_4, 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, + MC_5, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN1),MO(FN2),KC_LEFT, KC_DOWN, KC_RGHT), + + [MAC_FN1] = LAYOUT_ansi_73( + RGB_TOG, KC_GRV, KC_BRID, KC_BRIU, KC_MCTRL,KC_LNPAD,RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, _______, BT_HST1, BT_HST2, BT_HST3, P2P4G, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [WIN_FN1] = LAYOUT_ansi_73( + RGB_TOG, KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FILE, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, _______, BT_HST1, BT_HST2, BT_HST3, P2P4G, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [FN2] = LAYOUT_ansi_73( + _______, 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, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, BAT_LVL, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +// clang-format on +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [MAC_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [WIN_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [MAC_FN1] = {ENCODER_CCW_CW(RGB_VAD, RGB_VAI)}, + [WIN_FN1] = {ENCODER_CCW_CW(RGB_VAD, RGB_VAI)}, + [FN2] = {ENCODER_CCW_CW(_______, _______)}, +}; +#endif // ENCODER_MAP_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keychron_common(keycode, record)) { + return false; + } + return true; +} diff --git a/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/rules.mk b/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/rules.mk new file mode 100644 index 00000000000..c0a1cb3cc76 --- /dev/null +++ b/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +VIALRGB_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/vial.json b/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/vial.json new file mode 100644 index 00000000000..80eec52eea4 --- /dev/null +++ b/keyboards/keychron/q65_max/ansi_encoder/keymaps/vial/vial.json @@ -0,0 +1,231 @@ +{ + "name": "Keychron Q65 Max ANSI Knob", + "vendorId": "0x3434", + "productId": "0x08B0", + "lighting": "vialrgb", + "customKeycodes": [ + {"name": "Left Option", "title": "Left Option", "shortName": "LOpt"}, + {"name": "Right Option", "title": "Right Option", "shortName": "ROpt"}, + {"name": "Left Cmd", "title": "Left Command", "shortName": "LCmd"}, + {"name": "Right Cmd", "title": "Right Command", "shortName": "RCmd"}, + {"name": "Misson Control", "title": "Misson Control in Mac", "shortName": "MCtl"}, + {"name": "Lanuch Pad", "title": "Lanuch Pad in Windows", "shortName": "LPad"}, + {"name": "Task View", "title": "Task View in Windows", "shortName": "Task"}, + {"name": "File Explorer", "title": "File Explorer in Windows", "shortName": "File"}, + {"name": "Screen shot", "title": "Screenshot in macOS", "shortName": "SShot"}, + {"name": "Cortana", "title": "Cortana in Windows", "shortName": "Cortana"}, + {"name": "Siri", "title": "Siri in macOS", "shortName": "Siri"}, + {"name": "Bluetooth Host 1", "title": "Bluetooth Host 1", "shortName": "BTH1"}, + {"name": "Bluetooth Host 2", "title": "Bluetooth Host 2", "shortName": "BTH2"}, + {"name": "Bluetooth Host 3", "title": "Bluetooth Host 3", "shortName": "BTH3"}, + {"name": "2.4G", "title": "2.4G", "shortName": "2.4G"}, + {"name": "Battery Level", "title": "Show battery level", "shortName": "Batt"} + ], + "matrix": {"rows": 5, "cols" : 16}, + "layouts": { + "keymap": [ + [ + "0,0\n\n\n\n\n\n\n\n\ne", + "0,1\n\n\n\n\n\n\n\n\ne" + ], + [ + { + "x": 0.5 + }, + "0,0" + ], + [ + { + "y": -0.75, + "x": 2, + "c": "#777777" + }, + "0,1\nESC", + { + "c": "#cccccc" + }, + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + "0,11", + "0,12", + "0,13", + { + "c": "#aaaaaa", + "w": 2 + }, + "0,14", + { + "x": 0.5 + }, + "0,15" + ], + [ + { + "x": 0.5, + "c": "#cccccc" + }, + "1,0", + { + "x": 0.5, + "c": "#aaaaaa", + "w": 1.5 + }, + "1,1", + { + "c": "#cccccc" + }, + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + "1,11", + "1,12", + "1,13", + { + "w": 1.5 + }, + "1,14", + { + "x": 0.5, + "c": "#aaaaaa" + }, + "1,15" + ], + [ + { + "x": 0.5, + "c": "#cccccc" + }, + "2,0", + { + "x": 0.5, + "c": "#aaaaaa", + "w": 1.75 + }, + "2,1", + { + "c": "#cccccc" + }, + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11", + "2,12", + { + "c": "#777777", + "w": 2.25 + }, + "2,14", + { + "x": 0.5, + "c": "#aaaaaa" + }, + "2,15" + ], + [ + { + "x": 0.5, + "c": "#cccccc" + }, + "3,0", + { + "x": 0.5, + "c": "#aaaaaa", + "w": 2.25 + }, + "3,1", + { + "c": "#cccccc" + }, + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + "3,10", + "3,11", + "3,12", + { + "c": "#aaaaaa", + "w": 1.75 + }, + "3,13", + { + "x": 1.5 + }, + "3,15" + ], + [ + { + "y": -0.75, + "x": 16.25, + "c": "#777777" + }, + "3,14" + ], + [ + { + "y": -0.25, + "x": 0.5, + "c": "#cccccc" + }, + "4,0", + { + "x": 0.5, + "c": "#aaaaaa", + "w": 1.25 + }, + "4,1", + { + "w": 1.25 + }, + "4,2", + { + "w": 1.25 + }, + "4,3", + { + "c": "#cccccc", + "w": 6.25 + }, + "4,7", + { + "c": "#aaaaaa" + }, + "4,10", + "4,11", + "4,12" + ], + [ + { + "y": -0.75, + "x": 15.25, + "c": "#777777" + }, + "4,13", + "4,14", + "4,15" + ] + ] + } +} diff --git a/keyboards/keychron/q65_max/info.json b/keyboards/keychron/q65_max/info.json index 4658a01f12a..01c20004cc8 100644 --- a/keyboards/keychron/q65_max/info.json +++ b/keyboards/keychron/q65_max/info.json @@ -14,7 +14,6 @@ "mousekey" : true, "dip_switch" : true, "encoder": true, - "encoder_map": true, "nkro" : true, "rgb_matrix": true, "raw" : true,