diff options
author | zvecr <git@zvecr.com> | 2019-02-13 01:04:47 +0000 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-02-12 17:04:47 -0800 |
commit | 6fcc6538c71abd649ff8c8ac60b190ebd26f3b61 (patch) | |
tree | 111817df095c17f96def62faf6157a23deb89893 /keyboards | |
parent | b2ee290c9f506e42dd9c4577c8147646c405aeb0 (diff) |
[Keyboard] Refactor jj4x4 to enable ortho_4x4 LAYOUT (#5112)
* Correct configurator info.json
* Refactor to support ortho_4x4
* Refactor to support ortho_4x4 - remove commented out code
Diffstat (limited to 'keyboards')
-rw-r--r-- | keyboards/jj4x4/config.h | 6 | ||||
-rw-r--r-- | keyboards/jj4x4/info.json | 39 | ||||
-rw-r--r-- | keyboards/jj4x4/jj4x4.h | 15 | ||||
-rw-r--r-- | keyboards/jj4x4/keymaps/default/keymap.c | 2 | ||||
-rw-r--r-- | keyboards/jj4x4/rules.mk | 2 |
5 files changed, 29 insertions, 35 deletions
diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h index d48df5f1db..3ecdc06eae 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 <http://www.gnu.org/licenses/>. */ +#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 <http://www.gnu.org/licenses/>. #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 c6416ce168..602fdc90a3 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 03cf5d8a62..5a24b90333 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 <http://www.gnu.org/licenses/>. */ -#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 d4130e8090..51d4e7d618 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 3e222c620d..d99aebbd20 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 |