diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h index d48df5f1dbb..3ecdc06eaee 100644 --- a/keyboards/jj4x4/config.h +++ b/keyboards/jj4x4/config.h @@ -15,10 +15,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#pragma once + #include "config_common.h" -#ifndef CONFIG_H -#define CONFIG_H #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D @@ -49,5 +49,3 @@ along with this program. If not, see . #define RGBLED_NUM 5 #define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. #define RGBLIGHT_ANIMATIONS - -#endif diff --git a/keyboards/jj4x4/info.json b/keyboards/jj4x4/info.json index c6416ce1681..602fdc90a37 100644 --- a/keyboards/jj4x4/info.json +++ b/keyboards/jj4x4/info.json @@ -1,23 +1,30 @@ { - "keyboard_name": "jj40", + "keyboard_name": "jj4x4", "url": "", "maintainer": "qmk", - "width": 12, + "width": 4, "height": 4, "layouts": { - "LAYOUT_planck_mit": { - "key_count": 47, - "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}] - }, - - "LAYOUT_ortho_4x12": { - "key_count": 48, - "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}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] - }, - - "LAYOUT_planck_1x2uR": { - "key_count": 47, - "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}, {"x":6, "y":3, "w":2}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + "LAYOUT_ortho_4x4": { + "key_count": 16, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3} + ] } } -} +} \ No newline at end of file diff --git a/keyboards/jj4x4/jj4x4.h b/keyboards/jj4x4/jj4x4.h index 03cf5d8a62c..5a24b90333d 100644 --- a/keyboards/jj4x4/jj4x4.h +++ b/keyboards/jj4x4/jj4x4.h @@ -15,20 +15,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once #include "quantum.h" -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" void matrix_init_user(void); // TODO port this to other PS2AVRGB boards - -#define XXX KC_NO - -#define LAYOUT( \ +#define LAYOUT_ortho_4x4( \ K01, K02, K03, K04, \ K11, K12, K13, K14, \ K21, K22, K23, K24, \ @@ -40,7 +33,3 @@ void matrix_init_user(void); // TODO port this to other PS2AVRGB boards { K21, K22, K23, K24 }, \ { K31, K32, K33, K34 } \ } - - - -#endif diff --git a/keyboards/jj4x4/keymaps/default/keymap.c b/keyboards/jj4x4/keymaps/default/keymap.c index d4130e80906..51d4e7d6186 100644 --- a/keyboards/jj4x4/keymaps/default/keymap.c +++ b/keyboards/jj4x4/keymaps/default/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | M | N | O | P | * ----------------------------' */ -[_QWERTY] = LAYOUT( \ +[_QWERTY] = LAYOUT_ortho_4x4( \ KC_A, KC_B, KC_C, KC_D, \ KC_E, KC_F, KC_G, KC_H, \ KC_I, KC_J, KC_K, KC_L, \ diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk index 3e222c620da..d99aebbd20d 100644 --- a/keyboards/jj4x4/rules.mk +++ b/keyboards/jj4x4/rules.mk @@ -55,4 +55,4 @@ SRC = i2c.c backlight.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex - +LAYOUTS = ortho_4x4