[Keyboard] Support for Feker ik75 (#271)

* feat: added ik75 still error

- quantum/vial_ensure_keycode.h:164:1: error: static assertion failed: ""
 _Static_assert(KC_LSPO == 0x5CD7, "");

* fix: add via settings

* fix: disable unused matrix for firmware size

- remove matrix that causes error

* feat: use home as default layout

* fix: rotary click is K4F should be 4,15 not 0,14

* refactor: disable some matrix to free some bytes
This commit is contained in:
Dicko 2022-10-29 23:58:38 +07:00 committed by GitHub
parent 350df140fa
commit 80b6695ffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 344 additions and 14 deletions

View File

@ -60,9 +60,9 @@
#define DRIVER_2_LED_TOTAL 64
/* RGB Matrix effect */
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_BREATHING
#define ENABLE_RGB_MATRIX_BAND_SAT
#define ENABLE_RGB_MATRIX_BAND_VAL
@ -75,10 +75,10 @@
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
#define ENABLE_RGB_MATRIX_DUAL_BEACON
// #define ENABLE_RGB_MATRIX_DUAL_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
#define ENABLE_RGB_MATRIX_RAINDROPS
@ -87,22 +87,19 @@
#define ENABLE_RGB_MATRIX_HUE_PENDULUM
#define ENABLE_RGB_MATRIX_HUE_WAVE
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
#define ENABLE_RGB_MATRIX_PIXEL_FLOW
// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define ENABLE_RGB_MATRIX_SPLASH
#define ENABLE_RGB_MATRIX_MULTISPLASH
// #define ENABLE_RGB_MATRIX_MULTISPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif

View File

@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#define VIAL_KEYBOARD_UID {0x61, 0xF2, 0x04, 0xFA, 0xB8, 0xB2, 0x32, 0x42}
#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 }
#define VIAL_UNLOCK_COMBO_COLS { 1, 2 }

View File

@ -0,0 +1,166 @@
/* Copyright 2022 Feker
* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#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 {
_BASE,
_FN,
};
// enum layer_keycodes { };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
EscF1 F2 F3 F4 F5 F6 F7 F8 F9 F10F11F12Del Mut
` 1 2 3 4 5 6 7 8 9 0 - = Bckspc Hom
Tab q w e r t y u i o p [ ] \ End
Caps a s d f g h j k l ; ' Enter PgU
LShift z x c v b n m , . / RSft PgD
LCrlGUI LAlt Space RAtFn Rcl
! @ # $ % ^ & * ( ) _ +
Q W E R T Y U I O P { } |
Caps A S D F G H J K L : " │ │ │ │
LShift Z X C V B N M < > ? RSft
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
[_BASE] = 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_MUTE,
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_END,
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_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
/*
RstMcmHomCalSelPrvNxtPlyStpMutVoDVoUMai Tog
NKO SpdSpi Mod
Prt Hui
Scr Sai
Num Sad
Vai
GTog
Vad
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
[_FN] = LAYOUT(
QK_BOOT, KC_MYCM, KC_WHOM, KC_CALC, KC_SLCT, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_MAIL, _______, RGB_TOG,
NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, RGB_HUI,
_______, _______, KC_SCRL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI,
_______, _______, _______, _______, _______, _______, KC_NUM, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD,
_______, GUI_TOG, _______, _______, _______, _______, _______, _______, RGB_VAD, _______
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case (LED_FLAG_UNDERGLOW): {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_enable_noeeprom();
}
break;
}
}
return false;
}
return true;
}
void rgb_matrix_indicators_user(void) {
rgb_matrix_set_color(46, 0, 0, 0);
rgb_matrix_set_color(104, 0, 0, 0);
uint8_t red = host_keyboard_led_state().caps_lock ? 255 : 0;
uint8_t green = host_keyboard_led_state().scroll_lock ? 255 : 0;
uint8_t blue = keymap_config.no_gui ? 255 : 0;
if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) {
if (host_keyboard_led_state().num_lock) {
rgb_matrix_set_color(46, 255, 0, 0);
}
rgb_matrix_set_color(104, red, green, blue);
} else {
if (host_keyboard_led_state().num_lock) {
rgb_matrix_set_color(46, 255, 0, 0);
} else {
rgb_matrix_set_color(46, 0, 0, 0);
}
rgb_matrix_set_color(104, red, green, blue);
}
}
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_FN] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
};
#endif

View File

@ -0,0 +1,9 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
VIALRGB_ENABLE = yes
# Firmware Optimization
QMK_SETTINGS = no
TAP_DANCE_ENABLE = no
COMBO_ENABLE = no
KEY_OVERRIDE_ENABLE = no

View File

@ -0,0 +1,149 @@
{
"name": "Feker IK75",
"vendorId": "0xF2E7",
"productId": "0x1226",
"lighting": "vialrgb",
"matrix": {
"rows": 6,
"cols": 16
},
"layouts": {
"keymap": [
[
{ "y": 0.25 },
"0,0",
{ "x": 0.25 },
"0,1",
"0,2",
"0,3",
"0,4",
{ "x": 0.25 },
"0,5",
"0,6",
"0,7",
"0,8",
{ "x": 0.25 },
"0,9",
"0,10",
"0,11",
"0,12",
{ "x": 0.25 },
"0,13",
{ "x": 0.5 },
"4,15",
{ "x": 0.25 },
"0,0\n\n\n\n\n\n\n\n\ne",
"0,1\n\n\n\n\n\n\n\n\ne"
],
[
{ "y": 0.25 },
"1,0\n`",
"1,1\n1",
"1,2\n2",
"1,3\n3",
"1,4\n4",
"1,5\n5",
"1,6\n6",
"1,7\n7",
"1,8\n8",
"1,9\n9",
"1,10\n0",
"1,11\n-",
"1,12\n=",
{ "w": 2 },
"1,13",
{ "x": 0.5 },
"1,15"
],
[
{ "w": 1.5 },
"2,0",
"2,1",
"2,2",
"2,3",
"2,4",
"2,5",
"2,6",
"2,7",
"2,8",
"2,9",
"2,10",
"2,11\n[",
"2,12\n]",
{ "w": 1.5 },
"2,13\n\\",
{ "x": 0.5 },
"2,15"
],
[
{ "w": 1.75 },
"3,0",
"3,1",
"3,2",
"3,3",
"3,4",
"3,5",
"3,6",
"3,7",
"3,8",
"3,9",
"3,10\n;",
"3,11\n'",
{ "w": 2.25 },
"3,13",
{ "x": 0.5 },
"3,14"
],
[
{ "w": 2.25 },
"4,0",
"4,2",
"4,3",
"4,4",
"4,5",
"4,6",
"4,7",
"4,8",
"4,9\n,",
"4,10\n.",
"4,11\n/",
{ "w": 1.75 },
"4,13",
{ "x": 1.5 },
"3,15"
],
[
{
"y": -0.75,
"x": 14.25
},
"4,14"
],
[
{
"y": -0.25,
"w": 1.25
},
"5,0",
{ "w": 1.25 },
"5,1",
{ "w": 1.25 },
"5,2",
{ "w": 6.25 },
"5,6",
"5,12",
"5,10",
"5,9"
],
[
{
"y": -0.75,
"x": 13.25
},
"5,13",
"5,14",
"5,15"
]
]
}
}

View File

@ -27,3 +27,4 @@ RGB_MATRIX_DRIVER = IS31FL3733
# Encoder enabled
ENCODER_ENABLE = yes
ENCODER_MAP_ENABLE = yes