1
0
Fork 0
forked from forks/qmk_firmware
qmk_firmware/keyboards/clueboard/66/keymaps/tetris
Ryan 5e4b076af3
Remove legacy keycodes, part 5 (#18710)
* `KC_SLCK` -> `KC_SCRL`
* `KC_NLCK` -> `KC_NUM`
2022-10-15 22:29:43 +01:00
..
keymap.c Remove legacy keycodes, part 5 (#18710) 2022-10-15 22:29:43 +01:00
readme.md Reorganize clueboard into a single directory (#1855) 2017-10-17 18:05:21 -07:00
rules.mk make the tetris keymap fit 2021-01-30 13:11:33 -08:00
tetris_text.c Reorganize clueboard into a single directory (#1855) 2017-10-17 18:05:21 -07:00
tetris_text.h Reorganize clueboard into a single directory (#1855) 2017-10-17 18:05:21 -07:00

Default layout but with a tetris game

Tetris works by outputting key-presses to make ascii-art in a regular text editor. It reads key presses to rotate and move the bricks like a regular tetris game.

Example

tetris

Usage

  1. Open a default text editor
  2. Press the tetris button (Fn + t)
  3. Play tetris

It makes ascii-art by sending keycodes: left, right, up, down, qwerty characters, and numbers.

Problems

Drawing ascii-art is too slow to make a pleasant playing experience. While drawing ascii-art, the keyboard does not record key-presses, so its pretty unresponsive.

Adds 5000 bytes to the hex file.

Implement in other keyboards

  • Copy-paste the files tetris_text.c and tetrix_text.h to your keymap folder.
  • Add/update your-keyboard/your-keymap/Makefile to include SRC = tetris_text.c
  • Copy-paste the tetris-related code from this keymap.c to yours.
  • Set a key to trigger F(1) to start tetris mode.
  • Its also a good idea to set a key to stop tetris, here its escape.

You can find a simple tetris keyboard definition at https://github.com/danamlund/meckb_tetris/