Keyboard: LFKPad refactor and Configurator support (#3439)
* LFKPad: matrix refactor * LFKPad: keymap refactor (QMK_KEYBOARD_H; matrix update) * LFKPad: Configurator support * LFKPad: added community layout numpad_6x4 to rules.mk * LFKPad: Update rgb_sequence to match new matrix * LFKPad: delete deprecated makefile include block from rules.mkdaktil_thumb_popravljen
parent
2869d51ba8
commit
9234f9c964
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"keyboard_name": "LFKPad",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 4,
|
||||||
|
"height": 6,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_numpad_6x4": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Tab", "x":1, "y":0}, {"label":"=", "x":2, "y":0}, {"label":"Fn", "x":3, "y":0}, {"label":"Num Lock", "x":0, "y":1}, {"label":"/", "x":1, "y":1}, {"label":"*", "x":2, "y":1}, {"label":"-", "x":3, "y":1}, {"label":"7", "x":0, "y":2}, {"label":"8", "x":1, "y":2}, {"label":"9", "x":2, "y":2}, {"label":"4", "x":0, "y":3}, {"label":"5", "x":1, "y":3}, {"label":"6", "x":2, "y":3}, {"label":"+", "x":3, "y":2, "h":2}, {"label":"1", "x":0, "y":4}, {"label":"2", "x":1, "y":4}, {"label":"3", "x":2, "y":4}, {"label":"0", "x":0, "y":5, "w":2}, {"label":".", "x":2, "y":5}, {"label":"Enter", "x":3, "y":4, "h":2}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,24 +1,27 @@
|
||||||
#include "lfkpad.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "issi.h"
|
|
||||||
#include "lighting.h"
|
// readability
|
||||||
#include "action_layer.h"
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT( /* Base */
|
[0] = LAYOUT_numpad_6x4( /* Base */
|
||||||
KC_ESC, KC_TAB, KC_PEQL, MO(1), \
|
KC_ESC, KC_TAB, KC_PEQL, MO(1), \
|
||||||
KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, \
|
KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
KC_P7, KC_P8, KC_P9, KC_PPLS, \
|
KC_P7, KC_P8, KC_P9, \
|
||||||
KC_P4, KC_P5, KC_P6, \
|
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
||||||
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
KC_P1, KC_P2, KC_P3, \
|
||||||
KC_P0, KC_PDOT),
|
KC_P0, KC_PDOT, KC_PENT \
|
||||||
|
),
|
||||||
|
|
||||||
[1] = LAYOUT( /* RGB */
|
[1] = LAYOUT_numpad_6x4( /* RGB */
|
||||||
RGB_SAI, RGB_VAI, RGB_HUI, KC_TRNS, \
|
RGB_SAI, RGB_VAI, RGB_HUI, _______, \
|
||||||
RGB_SAD, RGB_VAD, RGB_HUD, KC_TRNS, \
|
RGB_SAD, RGB_VAD, RGB_HUD, _______, \
|
||||||
RGB_M_X, RGB_M_G, RGB_MOD, RGB_RMOD, \
|
RGB_M_X, RGB_M_G, RGB_MOD, \
|
||||||
RGB_M_SW, RGB_M_SN, RGB_M_K, \
|
RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_RMOD, \
|
||||||
RGB_M_P, RGB_M_B, RGB_M_R, RGB_TOG, \
|
RGB_M_P, RGB_M_B, RGB_M_R, \
|
||||||
KC_NO, KC_NO),
|
XXXXXXX, XXXXXXX, RGB_TOG \
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -163,10 +163,10 @@ const uint8_t rgb_matrices[] = {0, 1};
|
||||||
const uint8_t rgb_sequence[] = {
|
const uint8_t rgb_sequence[] = {
|
||||||
32, 1, 2, 3,
|
32, 1, 2, 3,
|
||||||
31, 30, 5, 6,
|
31, 30, 5, 6,
|
||||||
28, 27, 7, 8,
|
28, 27, 7,
|
||||||
17, 18, 9,
|
17, 18, 9, 8,
|
||||||
19, 21, 11, 12,
|
19, 21, 11,
|
||||||
22, 14,
|
22, 14, 12,
|
||||||
|
|
||||||
16, 26,
|
16, 26,
|
||||||
4, 25,
|
4, 25,
|
||||||
|
|
|
@ -54,20 +54,24 @@ enum action_functions {
|
||||||
void reset_keyboard_kb(void);
|
void reset_keyboard_kb(void);
|
||||||
void click(uint16_t freq, uint16_t duration);
|
void click(uint16_t freq, uint16_t duration);
|
||||||
|
|
||||||
#define LAYOUT( \
|
// readability
|
||||||
|
#define ___ KC_NO
|
||||||
|
|
||||||
|
|
||||||
|
#define LAYOUT_numpad_6x4( \
|
||||||
k00, k01, k02, k03, \
|
k00, k01, k02, k03, \
|
||||||
k10, k11, k12, k13, \
|
k10, k11, k12, k13, \
|
||||||
k20, k21, k22, k23,\
|
k20, k21, k22, \
|
||||||
k30, k31, k32,\
|
k30, k31, k32, k23, \
|
||||||
k40, k41, k42, k43,\
|
k40, k41, k42, \
|
||||||
k50, k52\
|
k50, k52, k43 \
|
||||||
) { \
|
) { \
|
||||||
{ k00, k01, k02, k03 }, \
|
{ k00, k01, k02, k03 }, \
|
||||||
{ k10, k11, k12, k13 }, \
|
{ k10, k11, k12, k13 }, \
|
||||||
{ k20, k21, k22, k23 }, \
|
{ k20, k21, k22, k23 }, \
|
||||||
{ k30, k31, k32, KC_NO }, \
|
{ k30, k31, k32, ___ }, \
|
||||||
{ k40, k41, k42, k43 }, \
|
{ k40, k41, k42, k43 }, \
|
||||||
{ k50, KC_NO, k52, KC_NO } \
|
{ k50, ___, k52, ___ } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //LFKPAD_H
|
#endif //LFKPAD_H
|
||||||
|
|
|
@ -9,6 +9,5 @@ ARCH = AVR8
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
# Interrupt driven control endpoint task(+60)
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../Makefile
|
LAYOUTS = numpad_6x4
|
||||||
endif
|
|
||||||
|
|
Loading…
Reference in New Issue