mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-25 01:47:10 +06:00
VIA keymap for djinn (#19881)
This commit is contained in:
parent
3d0f03f21e
commit
c1664ac6e3
63
keyboards/tzarc/djinn/keymaps/via/config.h
Normal file
63
keyboards/tzarc/djinn/keymaps/via/config.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
// Copyright 2018-2022 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
// Uncomment the following if your board uses 1.5A and 3.0A hold current fuses.
|
||||
//#define DJINN_SUPPORTS_3A_FUSE
|
||||
|
||||
// Encoder settings
|
||||
#define ENCODER_RESOLUTION 2
|
||||
|
||||
// LCD blanking period
|
||||
#define LCD_ACTIVITY_TIMEOUT 30000
|
||||
|
||||
// RGB settings
|
||||
#define RGB_MATRIX_KEYPRESSES
|
||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
|
||||
// Allow for an extra sync command over the split
|
||||
#define SPLIT_TRANSACTION_IDS_USER THEME_DATA_SYNC
|
||||
|
||||
// RGB Effects
|
||||
#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
|
||||
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#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_PINWHEEL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
#define ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#define ENABLE_RGB_MATRIX_RAINDROPS
|
||||
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
#define ENABLE_RGB_MATRIX_HUE_BREATHING
|
||||
#define ENABLE_RGB_MATRIX_HUE_PENDULUM
|
||||
#define ENABLE_RGB_MATRIX_HUE_WAVE
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
|
||||
#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_CROSS
|
||||
#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_SPLASH
|
||||
#define ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
107
keyboards/tzarc/djinn/keymaps/via/keymap.c
Normal file
107
keyboards/tzarc/djinn/keymaps/via/keymap.c
Normal file
|
@ -0,0 +1,107 @@
|
|||
// Copyright 2018-2022 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "theme_djinn_default.h"
|
||||
|
||||
// Layer definitions
|
||||
enum { _QWERTY, _LOWER, _RAISE, _ADJUST };
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Key map
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT_all(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
KC_LGUI, MO(_LOWER),KC_SPC, KC_NO, KC_NO, KC_SPC, MO(_RAISE),KC_LALT,
|
||||
RGB_RMOD, RGB_MOD,
|
||||
KC_UP, KC_UP,
|
||||
KC_LEFT, _______, KC_RIGHT, KC_LEFT, _______, KC_RIGHT,
|
||||
KC_DOWN, KC_DOWN
|
||||
),
|
||||
[_LOWER] = LAYOUT_all(
|
||||
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
BL_DOWN, BL_UP,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______
|
||||
),
|
||||
[_RAISE] = LAYOUT_all(
|
||||
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______,_______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______,KC_LEFT, KC_DOWN, KC_RIGHT,_______, KC_UNDS, KC_NO, KC_NO, KC_EQL, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, KC_MINS, KC_NO, KC_NO, KC_PLUS, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______
|
||||
),
|
||||
[_ADJUST] = LAYOUT_all(
|
||||
_______, KC_CAPS, KC_NUM, KC_SCRL, _______, _______, _______, _______, _______, _______, _______, DB_TOGG, EE_CLR, QK_BOOT,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______
|
||||
)
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Encoder map
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[_QWERTY] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_LOWER] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
|
||||
[_RAISE] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
|
||||
[_ADJUST] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Layer naming
|
||||
|
||||
const char *current_layer_name(void) {
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
return "qwerty";
|
||||
case _LOWER:
|
||||
return "lower";
|
||||
case _RAISE:
|
||||
return "raise";
|
||||
case _ADJUST:
|
||||
return "adjust";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Overrides
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Initialise the theme
|
||||
theme_init();
|
||||
|
||||
void keyboard_post_init_display(void);
|
||||
keyboard_post_init_display();
|
||||
}
|
||||
|
||||
void housekeeping_task_user(void) {
|
||||
// Update kb_state so we can send to slave
|
||||
theme_state_update();
|
||||
|
||||
// Data sync from master to slave
|
||||
theme_state_sync();
|
||||
}
|
17
keyboards/tzarc/djinn/keymaps/via/rules.mk
Normal file
17
keyboards/tzarc/djinn/keymaps/via/rules.mk
Normal file
|
@ -0,0 +1,17 @@
|
|||
DEBUG_MATRIX_SCAN_RATE_ENABLE ?= api
|
||||
ENCODER_MAP_ENABLE = yes
|
||||
SWAP_HANDS_ENABLE = no
|
||||
|
||||
VPATH += keyboards/tzarc/djinn/graphics
|
||||
SRC += \
|
||||
theme_djinn_default.c \
|
||||
djinn.qgf.c \
|
||||
lock-caps-ON.qgf.c \
|
||||
lock-scrl-ON.qgf.c \
|
||||
lock-num-ON.qgf.c \
|
||||
lock-caps-OFF.qgf.c \
|
||||
lock-scrl-OFF.qgf.c \
|
||||
lock-num-OFF.qgf.c \
|
||||
thintel15.qff.c
|
||||
|
||||
VIA_ENABLE = yes
|
Loading…
Reference in New Issue
Block a user