]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
[Keyboard] Refactor jj4x4 to enable ortho_4x4 LAYOUT (#5112)
authorzvecr <git@zvecr.com>
Wed, 13 Feb 2019 01:04:47 +0000 (01:04 +0000)
committerDrashna Jaelre <drashna@live.com>
Wed, 13 Feb 2019 01:04:47 +0000 (17:04 -0800)
* Correct configurator info.json

* Refactor to support ortho_4x4

* Refactor to support ortho_4x4 - remove commented out code

keyboards/jj4x4/config.h
keyboards/jj4x4/info.json
keyboards/jj4x4/jj4x4.h
keyboards/jj4x4/keymaps/default/keymap.c
keyboards/jj4x4/rules.mk

index d48df5f1dbbe2eb6a54c6e46896d0794095cfa37..3ecdc06eaeecfe53422535faf9fc8898a27c8878 100644 (file)
@@ -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
index c6416ce16814284340a326b069d9f2747335f571..602fdc90a37e2c6504e1ab85bd2556ea6344ce8a 100644 (file)
@@ -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
index 03cf5d8a62caf119c7f8970b8fbbf331a4ce87ef..5a24b90333dcc1efe72b1d6d2280f56bdf2c0289 100644 (file)
@@ -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
index d4130e809063de93266e2ab6b38e7618101e9334..51d4e7d6186b2674b9bffba56288b615338a871f 100644 (file)
@@ -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, \
index 3e222c620da6a079fc260740fa9d2464c4058a5f..d99aebbd20d9454d781869a20bd73f852406781c 100644 (file)
@@ -55,4 +55,4 @@ SRC = i2c.c backlight.c
 # programming options
 PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
 
-
+LAYOUTS = ortho_4x4