瀏覽代碼

Felix: Refactor, Rules, and Configurator Support (#3160)

* Refactor

* Configurator support

* Add LAYOUTS = ortho_5x4 to rules.mk
noroadsleft 7 年之前
父節點
當前提交
769854b8a2
共有 4 個文件被更改,包括 27 次插入11 次删除
  1. 3 1
      keyboards/felix/felix.h
  2. 12 0
      keyboards/felix/info.json
  3. 9 9
      keyboards/felix/keymaps/default/keymap.c
  4. 3 1
      keyboards/felix/rules.mk

+ 3 - 1
keyboards/felix/felix.h

@@ -3,7 +3,7 @@
 
 #include "quantum.h"
 
-#define KEYMAP( \
+#define LAYOUT_ortho_5x4( \
     K000, K001, K002, K003, \
     K100, K101, K102, K103, \
     K200, K201, K202, K203, \
@@ -17,4 +17,6 @@
     { K400, K401, K402, K403 }  \
 }
 
+#define LAYOUT LAYOUT_ortho_5x4
+
 #endif

文件差異過大導致無法顯示
+ 12 - 0
keyboards/felix/info.json


+ 9 - 9
keyboards/felix/keymaps/default/keymap.c

@@ -1,20 +1,20 @@
-#include "felix.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
-    KEYMAP(
-        KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
-        KC_P7,   KC_P8,   KC_P9,   KC_PPLS,
-        KC_P4,   KC_P5,   KC_P6,   KC_HOME,
-        KC_P1,   KC_P2,   KC_P3,   KC_END,
-        KC_P0,   KC_PEQL, KC_PDOT, KC_PENT),
+  LAYOUT(
+    KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+    KC_P7,   KC_P8,   KC_P9,   KC_PPLS,
+    KC_P4,   KC_P5,   KC_P6,   KC_HOME,
+    KC_P1,   KC_P2,   KC_P3,   KC_END,
+    KC_P0,   KC_PEQL, KC_PDOT, KC_PENT
+  ),
 
 };
 
 void persistant_default_layer_set(uint16_t default_layer) {
 }
-  
+
 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
   }

+ 3 - 1
keyboards/felix/rules.mk

@@ -53,4 +53,6 @@ SLEEP_LED_ENABLE = no  # Breathing sleep LED during USB suspend
 NKRO_ENABLE = yes		# USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
 BACKLIGHT_ENABLE = no  # Enable keyboard backlight functionality
 AUDIO_ENABLE = no
-RGBLIGHT_ENABLE = no
+RGBLIGHT_ENABLE = no
+
+LAYOUTS = ortho_5x4