aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/tetris
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/tetris')
-rw-r--r--keyboards/tetris/info.json12
-rw-r--r--keyboards/tetris/keymaps/default/keymap.c31
-rw-r--r--keyboards/tetris/keymaps/default/rules.mk1
-rw-r--r--keyboards/tetris/rules.mk6
4 files changed, 32 insertions, 18 deletions
diff --git a/keyboards/tetris/info.json b/keyboards/tetris/info.json
new file mode 100644
index 000000000..b21a46d63
--- /dev/null
+++ b/keyboards/tetris/info.json
@@ -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}]
+ }
+ }
+}
diff --git a/keyboards/tetris/keymaps/default/keymap.c b/keyboards/tetris/keymaps/default/keymap.c
index b0d22c533..61f2961b4 100644
--- a/keyboards/tetris/keymaps/default/keymap.c
+++ b/keyboards/tetris/keymaps/default/keymap.c
@@ -1,5 +1,4 @@
-#include "tetris.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#ifdef AUDIO_ENABLE
#include "audio.h"
@@ -101,11 +100,11 @@ qk_tap_dance_action_t tap_dance_actions[] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 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| Z | X | C | V | B | N | M | , | . | / | Mute |
+ * | Shift| Z | X | C | V | B | N | M | , | . | / | Mute |
* |------+------+------+------+------+------+------+------+------+------+------+------| <-- tap: 1.Mute 2.Next
* | 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 */
- _______, 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, _______,
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, TO( 0 ),
+ _______, 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, _______,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, TO( 0 ),
_______, _______, _______, _______, _______, XXXXXXX, KC_0, KC_00, KC_DOT, XXXXXXX, _______ ),
/* MARO Empty
@@ -279,11 +278,11 @@ static uint16_t TAP_RGB_timer;
static uint16_t RGB_encoder_timer;
/* Encoder state RGB_display */
-static uint8_t RGB_encoder_count=6;
+static uint8_t RGB_encoder_count=6;
static bool RGB_encoder_bool = false;
/* RGB tap HUE */
-static uint16_t Type_Hue=270;
+static uint16_t Type_Hue=270;
void matrix_init_user( void )
{
@@ -362,7 +361,7 @@ void matrix_scan_user( void )
case 1:
rgblight_setrgb_at(0, 255, 0,0);
break;
- }
+ }
/* End of Encoder state RGB_display */
/* Start of Set Encoder Keycode */
@@ -435,7 +434,7 @@ void matrix_scan_user( void )
case 10:
rgblight_setrgb_at(0, 0,128,11);
break;
- }
+ }
/* End of Encoder state RGB_display */
/* Start of Set Encoder Keycode */
@@ -465,11 +464,11 @@ void matrix_scan_user( void )
unregister_code( KC_VOLU );
}
/* End of Set Encoder Keycode */
-
+
}
/* End of Encoder anti-clockwise */
-
+
encoder_value %= 4;
/* Start of RGB with Layer change */
@@ -512,7 +511,7 @@ void matrix_scan_user( void )
/* set all the RGB color under the switch */
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 */
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 matrix_scan_user
+} // End of matrix_scan_user
@@ -768,7 +767,7 @@ bool process_record_user( uint16_t keycode, keyrecord_t *record ){
}else{
/* If disenable,the 'oFf' key will be red */
RGB_TAP_STATE=true;
- rgblight_mode( 1 );
+ rgblight_mode( 1 );
rgblight_setrgb( RGB_TAP_Base_Color );
rgblight_setrgb_at(RGB_TAP_On_Color,9); // F - off
}
diff --git a/keyboards/tetris/keymaps/default/rules.mk b/keyboards/tetris/keymaps/default/rules.mk
new file mode 100644
index 000000000..e5ddcae8d
--- /dev/null
+++ b/keyboards/tetris/keymaps/default/rules.mk
@@ -0,0 +1 @@
+TAP_DANCE_ENABLE = yes
diff --git a/keyboards/tetris/rules.mk b/keyboards/tetris/rules.mk
index 40b098ae6..784f6e462 100644
--- a/keyboards/tetris/rules.mk
+++ b/keyboards/tetris/rules.mk
@@ -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
AUDIO_ENABLE ?= yes
RGBLIGHT_ENABLE ?= yes
-TAP_DANCE_ENABLE = yes
-EXTRAFLAGS += -flto # Make the hex smaller \ No newline at end of file
+TAP_DANCE_ENABLE = no
+EXTRAFLAGS += -flto # Make the hex smaller
+
+LAYOUTS = planck_mit