Tetris Configurator support and Rules update (#3317)
* Configurator support * Add LAYOUTS = planck_mit to rules.mk * Disable Tap Dance at the keyboard level * Keymap refactor: QMK_KEYBOARD_H; enable Tap Dance for default keymap * Add keymaps/default/rules.mk to enable Tap Dance * Reverse the addition of config.h in keyboards/tetris/keymaps/default/
This commit is contained in:
parent
c418608c1e
commit
0a8d529d74
4 changed files with 32 additions and 18 deletions
12
keyboards/tetris/info.json
Normal file
12
keyboards/tetris/info.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"keyboard_name": "Tetris",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 12,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_planck_mit": {
|
||||||
|
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
#include "tetris.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
@ -101,11 +100,11 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* BASE - QWERTY
|
/* BASE - QWERTY
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | BS |
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | BS |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* shift + Esc = ~ --> | Esc | A | S | D | F | G | H | J | K | L | ; | Enter| <-- shift + Enter = "
|
* shift + Esc = ~ --> | Esc | A | S | D | F | G | H | J | K | L | ; | Enter| <-- shift + Enter = "
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| Z | X | C | V | B | N | M | , | . | / | Mute |
|
* | Shift| Z | X | C | V | B | N | M | , | . | / | Mute |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------| <-- tap: 1.Mute 2.Next
|
* |------+------+------+------+------+------+------+------+------+------+------+------| <-- tap: 1.Mute 2.Next
|
||||||
* | Ctrl | GUI | Alt | [ | - | Space | = | ] | Fx | \ | Del |
|
* | Ctrl | GUI | Alt | [ | - | Space | = | ] | Fx | \ | Del |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
@ -203,9 +202,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_NUMB] = LAYOUT_planck_mit( /* 5 - Numpad */
|
[_NUMB] = LAYOUT_planck_mit( /* 5 - Numpad */
|
||||||
_______, KC_PPLS, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, _______,
|
_______, KC_PPLS, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, _______,
|
||||||
_______, KC_PAST, KC_PSLS, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, _______,
|
_______, KC_PAST, KC_PSLS, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, _______,
|
||||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, TO( 0 ),
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, TO( 0 ),
|
||||||
_______, _______, _______, _______, _______, XXXXXXX, KC_0, KC_00, KC_DOT, XXXXXXX, _______ ),
|
_______, _______, _______, _______, _______, XXXXXXX, KC_0, KC_00, KC_DOT, XXXXXXX, _______ ),
|
||||||
|
|
||||||
/* MARO Empty
|
/* MARO Empty
|
||||||
|
@ -279,11 +278,11 @@ static uint16_t TAP_RGB_timer;
|
||||||
static uint16_t RGB_encoder_timer;
|
static uint16_t RGB_encoder_timer;
|
||||||
|
|
||||||
/* Encoder state RGB_display */
|
/* Encoder state RGB_display */
|
||||||
static uint8_t RGB_encoder_count=6;
|
static uint8_t RGB_encoder_count=6;
|
||||||
static bool RGB_encoder_bool = false;
|
static bool RGB_encoder_bool = false;
|
||||||
|
|
||||||
/* RGB tap HUE */
|
/* RGB tap HUE */
|
||||||
static uint16_t Type_Hue=270;
|
static uint16_t Type_Hue=270;
|
||||||
|
|
||||||
void matrix_init_user( void )
|
void matrix_init_user( void )
|
||||||
{
|
{
|
||||||
|
@ -362,7 +361,7 @@ void matrix_scan_user( void )
|
||||||
case 1:
|
case 1:
|
||||||
rgblight_setrgb_at(0, 255, 0,0);
|
rgblight_setrgb_at(0, 255, 0,0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* End of Encoder state RGB_display */
|
/* End of Encoder state RGB_display */
|
||||||
|
|
||||||
/* Start of Set Encoder Keycode */
|
/* Start of Set Encoder Keycode */
|
||||||
|
@ -435,7 +434,7 @@ void matrix_scan_user( void )
|
||||||
case 10:
|
case 10:
|
||||||
rgblight_setrgb_at(0, 0,128,11);
|
rgblight_setrgb_at(0, 0,128,11);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* End of Encoder state RGB_display */
|
/* End of Encoder state RGB_display */
|
||||||
|
|
||||||
/* Start of Set Encoder Keycode */
|
/* Start of Set Encoder Keycode */
|
||||||
|
@ -465,11 +464,11 @@ void matrix_scan_user( void )
|
||||||
unregister_code( KC_VOLU );
|
unregister_code( KC_VOLU );
|
||||||
}
|
}
|
||||||
/* End of Set Encoder Keycode */
|
/* End of Set Encoder Keycode */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End of Encoder anti-clockwise */
|
/* End of Encoder anti-clockwise */
|
||||||
|
|
||||||
encoder_value %= 4;
|
encoder_value %= 4;
|
||||||
|
|
||||||
/* Start of RGB with Layer change */
|
/* Start of RGB with Layer change */
|
||||||
|
@ -512,7 +511,7 @@ void matrix_scan_user( void )
|
||||||
|
|
||||||
/* set all the RGB color under the switch */
|
/* set all the RGB color under the switch */
|
||||||
rgblight_mode( 1 );
|
rgblight_mode( 1 );
|
||||||
rgblight_setrgb(RGB_Layer_1_Base_Color);
|
rgblight_setrgb(RGB_Layer_1_Base_Color);
|
||||||
|
|
||||||
/* set each of the RGB led color under the switch */
|
/* set each of the RGB led color under the switch */
|
||||||
rgblight_setrgb_at(64, 64, 64,1); // Q
|
rgblight_setrgb_at(64, 64, 64,1); // Q
|
||||||
|
@ -672,7 +671,7 @@ void matrix_scan_user( void )
|
||||||
}
|
}
|
||||||
/* End of RGB with Layer change */
|
/* End of RGB with Layer change */
|
||||||
|
|
||||||
} // End of matrix_scan_user
|
} // End of matrix_scan_user
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -768,7 +767,7 @@ bool process_record_user( uint16_t keycode, keyrecord_t *record ){
|
||||||
}else{
|
}else{
|
||||||
/* If disenable,the 'oFf' key will be red */
|
/* If disenable,the 'oFf' key will be red */
|
||||||
RGB_TAP_STATE=true;
|
RGB_TAP_STATE=true;
|
||||||
rgblight_mode( 1 );
|
rgblight_mode( 1 );
|
||||||
rgblight_setrgb( RGB_TAP_Base_Color );
|
rgblight_setrgb( RGB_TAP_Base_Color );
|
||||||
rgblight_setrgb_at(RGB_TAP_On_Color,9); // F - off
|
rgblight_setrgb_at(RGB_TAP_On_Color,9); // F - off
|
||||||
}
|
}
|
||||||
|
|
1
keyboards/tetris/keymaps/default/rules.mk
Normal file
1
keyboards/tetris/keymaps/default/rules.mk
Normal file
|
@ -0,0 +1 @@
|
||||||
|
TAP_DANCE_ENABLE = yes
|
|
@ -54,5 +54,7 @@ NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https:
|
||||||
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
|
||||||
AUDIO_ENABLE ?= yes
|
AUDIO_ENABLE ?= yes
|
||||||
RGBLIGHT_ENABLE ?= yes
|
RGBLIGHT_ENABLE ?= yes
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = no
|
||||||
EXTRAFLAGS += -flto # Make the hex smaller
|
EXTRAFLAGS += -flto # Make the hex smaller
|
||||||
|
|
||||||
|
LAYOUTS = planck_mit
|
||||||
|
|
Loading…
Reference in a new issue