]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Novelpad refactor and Configurator support (#3276)
authornoroadsleft <18669334+noroadsleft@users.noreply.github.com>
Sun, 1 Jul 2018 18:06:00 +0000 (11:06 -0700)
committerDrashna Jaelre <drashna@live.com>
Sun, 1 Jul 2018 18:06:00 +0000 (11:06 -0700)
* Matrix refactor

* Keymap refactor

* Configurator support

* Add LAYOUTS = ortho_5x4 to rules.mk

* Readme formatting fix

* #include != #define

* Removed an extra comma

keyboards/novelpad/info.json [new file with mode: 0644]
keyboards/novelpad/keymaps/default/keymap.c
keyboards/novelpad/novelpad.h
keyboards/novelpad/readme.md
keyboards/novelpad/rules.mk

diff --git a/keyboards/novelpad/info.json b/keyboards/novelpad/info.json
new file mode 100644 (file)
index 0000000..7523bf5
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    "keyboard_name": "NovelPad",
+    "url": "",
+    "maintainer": "qmk",
+    "width": 4,
+    "height": 5,
+    "layouts": {
+        "LAYOUT_ortho_5x4": {
+            "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}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}]
+        }
+    }
+}
index 59cc1adc8632687813eb5326485613e72767c989..78cdff512e114c18f4c1af8949f805b394f309f2 100755 (executable)
@@ -16,6 +16,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include QMK_KEYBOARD_H
 
+#define _______ KC_TRNS
+
 enum custom_keycodes {
   BL = SAFE_RANGE,
   WK_RED,
@@ -25,20 +27,21 @@ enum custom_keycodes {
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
-KEYMAP(
+  [0] = LAYOUT(
     KC_NLCK, KC_PSLS, KC_PAST, KC_ESC,
-    KC_P7, KC_P8, KC_P9, KC_PMNS,
-    KC_P4, KC_P5, KC_P6, KC_PPLS,
-    KC_P1, KC_P2, KC_P3, KC_TAB,
-    MO(1), KC_P0, KC_PDOT, KC_ENT),
-
-KEYMAP(
-    KC_TRNS, BL, RGB_MODE_SWIRL, RESET, \
-    RGB_TOG,  RGB_MOD, RGB_MODE_PLAIN, RGB_MODE_SNAKE,   \
-        RGB_HUI,  RGB_SAI, RGB_VAI, RGB_MODE_KNIGHT,   \
-        RGB_HUD ,  RGB_SAD, RGB_VAD, RGB_MODE_XMAS,   \
-        KC_TRNS, WK_RED,  WK_GREEN, WK_BLUE    \
-        ),
+    KC_P7,   KC_P8,   KC_P9,   KC_PMNS,
+    KC_P4,   KC_P5,   KC_P6,   KC_PPLS,
+    KC_P1,   KC_P2,   KC_P3,   KC_TAB,
+    MO(1),   KC_P0,   KC_PDOT, KC_ENT
+  ),
+
+  [1] = LAYOUT(
+    _______, BL,      RGB_MODE_SWIRL, RESET,
+    RGB_TOG, RGB_MOD, RGB_MODE_PLAIN, RGB_MODE_SNAKE,
+    RGB_HUI, RGB_SAI, RGB_VAI,        RGB_MODE_KNIGHT,
+    RGB_HUD, RGB_SAD, RGB_VAD,        RGB_MODE_XMAS,
+    _______, WK_RED,  WK_GREEN,       WK_BLUE
+  ),
 
 };
 
index 079dc30c53e4b6c3b4fcea4bd24f0277792f7a2e..f5a0b95f59c19b9bc61af800c9d557670fd9e4c9 100755 (executable)
@@ -19,7 +19,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include "quantum.h"
 
-#define KEYMAP( \
+#define LAYOUT_ortho_5x4( \
        K00, K01, K02, K03, \
        K10, K11, K12, K13, \
        K20, K21, K22, K23, \
@@ -33,4 +33,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   { K40,   K41,   K42,   K43 } \
 }
 
+#define LAYOUT LAYOUT_ortho_5x4
+
 #endif
index b743b92049e51a3405a020482e266eceb9f5001d..70bd6b6be72a8844ff1c2012390d8ffd29ab0f1f 100644 (file)
@@ -4,7 +4,7 @@
 
 A 5x4 macropad/numpad, sold by NovelKeys.xyz. There are two versions of the PCB, the NovelPad for MX switches and the NumChoc for Kailh Choc low profile switches. Both utilize the same firmware with no changes required.
 
-Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) / [Woodkeys.click](https://woodkeys.click)
+Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) / [Woodkeys.click](https://woodkeys.click)  
 Hardware Supported: NovelPad  
 Hardware Availability: [Novelkeys.xyz](https://novelkeys.xyz)
 
index d90dd6265e50425a72a17404e197eb2a7b74b12c..8d35c6c05cc933cc9c8404febe485211dbe5a885 100755 (executable)
@@ -53,4 +53,6 @@ SLEEP_LED_ENABLE = no  # Breathing sleep LED during USB suspend
 NKRO_ENABLE = no               # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
 BACKLIGHT_ENABLE = yes  # In-switch LEDs
 AUDIO_ENABLE = no      # There is no available timer or pin for audio on the NovelPad
-RGBLIGHT_ENABLE = yes  # RGB LEDs for underglow, installed and enabled by default for the NovelPad
\ No newline at end of file
+RGBLIGHT_ENABLE = yes  # RGB LEDs for underglow, installed and enabled by default for the NovelPad
+
+LAYOUTS = ortho_5x4