From d09a342aa1ac5724076f23550d308febae351c61 Mon Sep 17 00:00:00 2001 From: Adam Lickel Date: Thu, 25 Nov 2021 14:21:57 -0800 Subject: [PATCH 1/4] Lickel's sinc layout --- .../keebio/sinc/keymaps/lickel/README.md | 18 +++ keyboards/keebio/sinc/keymaps/lickel/keymap.c | 106 ++++++++++++++++++ keyboards/keebio/sinc/keymaps/lickel/rules.mk | 2 + 3 files changed, 126 insertions(+) create mode 100644 keyboards/keebio/sinc/keymaps/lickel/README.md create mode 100644 keyboards/keebio/sinc/keymaps/lickel/keymap.c create mode 100644 keyboards/keebio/sinc/keymaps/lickel/rules.mk diff --git a/keyboards/keebio/sinc/keymaps/lickel/README.md b/keyboards/keebio/sinc/keymaps/lickel/README.md new file mode 100644 index 000000000000..5f8478b93c4d --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/lickel/README.md @@ -0,0 +1,18 @@ +# lickel's Sinc keymap + +- Via support is enabled by default +- Function Row is optimized for macOS +- RGB controls mimic the stock Keychron Q1 layout +- F3 opens Mission Control and F4 opens Launchpad +- Left macros are: F1->F10 +- Right macros are: Play, Home, Pg Up, Pg Dn, End, Right + +![Layout](https://imgur.com/uQnzMSe) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/e0350d8914cac3166abcca6abfd093b7)) + +## Changelog + +### 11/27/2021 - 1.0 + +- Initial release diff --git a/keyboards/keebio/sinc/keymaps/lickel/keymap.c b/keyboards/keebio/sinc/keymaps/lickel/keymap.c new file mode 100644 index 000000000000..020d3d4a004a --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/lickel/keymap.c @@ -0,0 +1,106 @@ +/* Copyright 2021 @ Adam Lickel + * + * 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 + +enum custom_keycodes { +#ifdef VIA_ENABLE + KC_MISSION_CONTROL = USER00, +#else + KC_MISSION_CONTROL = SAFE_RANGE, +#endif + KC_LAUNCHPAD +}; + +#define KC_MCTL KC_MISSION_CONTROL +#define KC_LPAD KC_LAUNCHPAD + +// clang-format off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_80_with_macro( + KC_MUTE, KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_MPLY, + KC_F1, KC_F2, 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_BSPC, KC_HOME, + KC_F3, KC_F4, 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_F5, KC_F6, 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_F7, KC_F8, 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_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_80_with_macro( + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_80_with_macro( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_80_with_macro( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +// clang-format on + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_MISSION_CONTROL: + if (record->event.pressed) { + host_consumer_send(0x29F); + } else { + host_consumer_send(0); + } + return false; // Skip all further processing of this key + case KC_LAUNCHPAD: + if (record->event.pressed) { + host_consumer_send(0x2A0); + } else { + host_consumer_send(0); + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} diff --git a/keyboards/keebio/sinc/keymaps/lickel/rules.mk b/keyboards/keebio/sinc/keymaps/lickel/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/lickel/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 5eb9dbd0a00ad8b24535d1d258b84c70c0e3e9ac Mon Sep 17 00:00:00 2001 From: Adam Lickel Date: Sat, 27 Nov 2021 19:30:44 -0800 Subject: [PATCH 2/4] Review comment --- keyboards/keebio/sinc/keymaps/lickel/keymap.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/keyboards/keebio/sinc/keymaps/lickel/keymap.c b/keyboards/keebio/sinc/keymaps/lickel/keymap.c index 020d3d4a004a..abdb33e93643 100644 --- a/keyboards/keebio/sinc/keymaps/lickel/keymap.c +++ b/keyboards/keebio/sinc/keymaps/lickel/keymap.c @@ -74,14 +74,17 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_PGUP); } + return false; } else if (index == 1) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); } + return false; + } else { + return true; } - return true; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -92,15 +95,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { host_consumer_send(0); } - return false; // Skip all further processing of this key + return false; case KC_LAUNCHPAD: if (record->event.pressed) { host_consumer_send(0x2A0); } else { host_consumer_send(0); } - return false; // Skip all further processing of this key + return false; default: - return true; // Process all other keycodes normally + return true; } } From 698a25bcac58ae5115334c95361b16ac25a93a88 Mon Sep 17 00:00:00 2001 From: Adam Lickel Date: Mon, 29 Nov 2021 07:35:31 -0800 Subject: [PATCH 3/4] Lowercased --- keyboards/keebio/sinc/keymaps/lickel/{README.md => readme.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/keebio/sinc/keymaps/lickel/{README.md => readme.md} (100%) diff --git a/keyboards/keebio/sinc/keymaps/lickel/README.md b/keyboards/keebio/sinc/keymaps/lickel/readme.md similarity index 100% rename from keyboards/keebio/sinc/keymaps/lickel/README.md rename to keyboards/keebio/sinc/keymaps/lickel/readme.md From b1b8789eb370392c4deb86e942eb88adf3033688 Mon Sep 17 00:00:00 2001 From: Adam Lickel Date: Mon, 29 Nov 2021 21:59:49 -0800 Subject: [PATCH 4/4] Update keyboards/keebio/sinc/keymaps/lickel/readme.md Co-authored-by: Ryan --- keyboards/keebio/sinc/keymaps/lickel/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/keebio/sinc/keymaps/lickel/readme.md b/keyboards/keebio/sinc/keymaps/lickel/readme.md index 5f8478b93c4d..a41c16de236f 100644 --- a/keyboards/keebio/sinc/keymaps/lickel/readme.md +++ b/keyboards/keebio/sinc/keymaps/lickel/readme.md @@ -7,7 +7,7 @@ - Left macros are: F1->F10 - Right macros are: Play, Home, Pg Up, Pg Dn, End, Right -![Layout](https://imgur.com/uQnzMSe) +![Layout](https://i.imgur.com/uQnzMSe.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/e0350d8914cac3166abcca6abfd093b7))