Open3

claw44 v3 改造メモ

悠希@ariela悠希@ariela

猫山王さんという方が記事を書いてくださっていますが、自身がわかりやすいようにステップバイでファーム改修/改造する手順をまとめていく。

事前準備

QMK MSYS

Vial対応QMK

claw44 QMKファームウェアソース

dailycraftkeyboard/qmk_firmwaredailycraft-0.22 をダウンロードして、vial-qmk以下にソースコードを統合する

  1. qmk_firmware/keybords/dailycraft/claw44/rev2vial-qmk/keybords/dailycraft/claw44/rev2 にコピー
  2. users/yfukuvial-qmk/users/yfuku にコピー
悠希@ariela悠希@ariela

RP2040対応

ProMicro互換のRP2040のブレイクアウトボードを使用する。
自分はAliExpressで購入したが、安心して購入したい場合は国内サイトから探すほうが良い。

ファームウェアのRP2040対応

rules.mk

+ # RP2040用にシリアルドライバーを指定
+ SERIAL_DRIVER = vendor

info.json

プロセッサとピン番号の修正を行う。

引用: Claw44であそぼ。⑦(RP2040編)|猫山王
リセットボタンがある側から見たPin配列

  {
      "keyboard_name": "claw44 rev2",
      "manufacturer": "yfuku",
      "url": "",
      "maintainer": "yfuku",
      "usb": {
          "vid": "0x5946",
          "pid": "0x0006",
          "device_version": "0.0.1"
      },
      "matrix_pins": {
-         "cols": ["F4", "F5", "F6", "F7", "B1", "B3"],
+         "cols": ["GP29", "GP28", "GP27", "GP26", "GP22", "GP20"],
-         "rows": ["D4", "C6", "D7", "E6", null]
+         "rows": ["GP4", "GP5", "GP6", "GP7", null]
      },
      "diode_direction": "COL2ROW",
      "features": {
        "encoder": true
      },
      "encoder": {
          "rotary": [
-             { "pin_a": "B5", "pin_b": "B4" },
+             { "pin_a": "GP9", "pin_b": "GP8" },
-             { "pin_a": "B6", "pin_b": "B2" }
+             { "pin_a": "GP21", "pin_b": "GP23" }
          ]
      },
      "split": {
          "enabled": true,
-         "soft_serial_pin": "D2",
+         "soft_serial_pin": "GP1",
          "encoder": {
              "right": {
                  "rotary": [
-                     { "pin_a": "B4", "pin_b": "B5" },
+                     { "pin_a": "GP8", "pin_b": "GP9" },
-                     { "pin_a": "B2", "pin_b": "B6" }
+                     { "pin_a": "GP23", "pin_b": "GP21" }
                  ]
              }
          }
      },
-     "processor": "atmega32u4",
+     "processor": "RP2040",
-     "bootloader": "caterina",
+     "bootloader": "rp2040",
      "layouts": {
          "LAYOUT": {
              "layout": [
                  {"matrix": [0, 0], "x": 0, "y": 0},
                  {"matrix": [0, 1], "x": 1, "y": 0},
                  {"matrix": [0, 2], "x": 2, "y": 0},
                  {"matrix": [0, 3], "x": 3, "y": 0},
                  {"matrix": [0, 4], "x": 4, "y": 0},
                  {"matrix": [0, 5], "x": 5, "y": 0},
  
                  {"matrix": [5, 5], "x": 9, "y": 0},
                  {"matrix": [5, 4], "x": 10, "y": 0},
                  {"matrix": [5, 3], "x": 11, "y": 0},
                  {"matrix": [5, 2], "x": 12, "y": 0},
                  {"matrix": [5, 1], "x": 13, "y": 0},
                  {"matrix": [5, 0], "x": 14, "y": 0},
  
                  {"matrix": [1, 0], "x": 0, "y": 1},
                  {"matrix": [1, 1], "x": 1, "y": 1},
                  {"matrix": [1, 2], "x": 2, "y": 1},
                  {"matrix": [1, 3], "x": 3, "y": 1},
                  {"matrix": [1, 4], "x": 4, "y": 1},
                  {"matrix": [1, 5], "x": 5, "y": 1},
  
                  {"matrix": [3, 1], "x": 6, "y": 1},
                  {"matrix": [8, 1], "x": 7, "y": 1},
  
                  {"matrix": [6, 5], "x": 9, "y": 1},
                  {"matrix": [6, 4], "x": 10, "y": 1},
                  {"matrix": [6, 3], "x": 11, "y": 1},
                  {"matrix": [6, 2], "x": 12, "y": 1},
                  {"matrix": [6, 1], "x": 13, "y": 1},
                  {"matrix": [6, 0], "x": 14, "y": 1},
                  
                  {"matrix": [2, 0], "x": 0, "y": 2},
                  {"matrix": [2, 1], "x": 1, "y": 2},
                  {"matrix": [2, 2], "x": 2, "y": 2},
                  {"matrix": [2, 3], "x": 3, "y": 2},
                  {"matrix": [2, 4], "x": 4, "y": 2},
                  {"matrix": [2, 5], "x": 5, "y": 2},
  
                  {"matrix": [3, 0], "x": 7, "y": 2},
                  {"matrix": [8, 0], "x": 8, "y": 2},
  
                  {"matrix": [7, 5], "x": 9, "y": 2},
                  {"matrix": [7, 4], "x": 10, "y": 2},
                  {"matrix": [7, 3], "x": 11, "y": 2},
                  {"matrix": [7, 2], "x": 12, "y": 2},
                  {"matrix": [7, 1], "x": 13, "y": 2},
                  {"matrix": [7, 0], "x": 14, "y": 2},
  
                  {"matrix": [3, 2], "x": 4, "y": 3},
                  {"matrix": [3, 3], "x": 5, "y": 3},
                  {"matrix": [3, 4], "x": 6, "y": 3},
                  {"matrix": [3, 5], "x": 7, "y": 3},
  
                  {"matrix": [8, 5], "x": 9, "y": 3},
                  {"matrix": [8, 4], "x": 10, "y": 3},
                  {"matrix": [8, 3], "x": 11, "y": 3},
                  {"matrix": [8, 2], "x": 12, "y": 3}
              ]
          }
      }
  }

config.h

+ //==+====1====+====2====+====3====+====4====+====5====+====6====+====7====+====8====+====9====+====0
+ // RP2040用 定義
+ //==+====1====+====2====+====3====+====4====+====5====+====6====+====7====+====8====+====9====+====0
+ // リセットボタンをダブルタップすることでブートローダーモードをアクティブ化する
+ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
+ // リセットボタンのダブルタップのタイムアウト(200ms)
+ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U

+ // 分割キーボードの識別タイムアウト(7秒/デフォルト2秒)
+ #define SPLIT_USB_TIMEOUT 7000 //Default 2000
+ // 分割キーボードの識別インターバル(25ms/デフォルト10ms)
+ #define SPLIT_USB_TIMEOUT_POLL 25
悠希@ariela悠希@ariela

Vial対応

rules.mk

  # RP2040用にシリアルドライバーを指定
  SERIAL_DRIVER = vendor
  
+ # Vial有効化
+ VIA_ENABLE = yes
+ VIAL_ENABLE = yes

config.h

  //==+====1====+====2====+====3====+====4====+====5====+====6====+====7====+====8====+====9====+====0
  // RP2040用 定義
  //==+====1====+====2====+====3====+====4====+====5====+====6====+====7====+====8====+====9====+====0
  // リセットボタンをダブルタップすることでブートローダーモードをアクティブ化する
  #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
  // リセットボタンのダブルタップのタイムアウト(200ms)
  #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U

  // 分割キーボードの識別タイムアウト(7秒/デフォルト2秒)
  #define SPLIT_USB_TIMEOUT 7000 //Default 2000
  // 分割キーボードの識別インターバル(25ms/デフォルト10ms)
  #define SPLIT_USB_TIMEOUT_POLL 25
  
+ //==+====1====+====2====+====3====+====4====+====5====+====6====+====7====+====8====+====9====+====0
+ // Vial用 定義
+ //==+====1====+====2====+====3====+====4====+====5====+====6====+====7====+====8====+====9====+====0
+ // キーボードのUIDを指定
+ #define VIAL_KEYBOARD_UID {0xAD, 0x42, 0xC2, 0xA6, 0xB8, 0x86, 0xA4, 0x65}
+ // Vialのロック解除キーコンボの指定
+ #define VIAL_UNLOCK_COMBO_ROWS {0, 4}
+ #define VIAL_UNLOCK_COMBO_COLS {2, 3}

vial.json

{
    "matrix": {
      "rows": 10,
      "cols": 6
    },
    "layouts": {
        "keymap": [
            [{"x":3},"0,3","0,4","0,5",{"x":6},"5,5","5,4","5,3"],
            [{"y":-0.5,"x":2},"0,2",{"x":12},"5,2"],
            [{"y":-0.5,"x":3},"1,3","1,4","1,5",{"x":0.25},"3,1",{"x":3.5},"8,1",{"x":0.25},"6,5","6,4","6,3"],
            [{"y":-0.75,"x":1},"0,1",{"x":14},"5,1"],
            [{"y":-0.75},"0,0",{"x":1},"1,2",{"x":12},"6,2",{"x":1},"5,0"],
            [{"y":-0.5,"x":3},"2,3","2,4","2,5",{"x":0.25},"3,0",{"x":3.5},"8,0",{"x":0.25},"7,5","7,4","7,3"],
            [{"y":-0.75,"x":1},"1,1",{"x":14},"6,1"],
            [{"y":-0.75},"1,0",{"x":1},"2,2",{"x":12},"7,2",{"x":1},"6,0"],
            [{"y":-0.25,"x":1},"2,1",{"x":14},"7,1"],
            [{"y":-0.75},"2,0",{"x":16},"7,0"],
            [{"y":1.75,"x":6.25},"0,0\n\n\n\n\n\n\n\n\ne","0,1\n\n\n\n\n\n\n\n\ne",{"x":1.5},"2,0\n\n\n\n\n\n\n\n\ne","2,1\n\n\n\n\n\n\n\n\ne"],
            [{"x":6.25},"1,0\n\n\n\n\n\n\n\n\ne","1,1\n\n\n\n\n\n\n\n\ne",{"x":1.5},"3,0\n\n\n\n\n\n\n\n\ne","3,1\n\n\n\n\n\n\n\n\ne"],
            [{"r":7.5,"rx":5,"ry":3.25},"3,3"],
            [{"r":15,"ry":4.25,"y":-1,"x":1,"c":"#3f6dba","w":1.25},"3,4"],
            [{"rx":13,"ry":4.75,"y":-1.5,"c":"#cccccc"},"8,2"],
            [{"r":45,"rx":5.75,"ry":4.25,"y":-1,"x":1.5},"3,5"],
            [{"r":-45,"rx":12.25,"y":-1,"x":-2.5},"8,5"],
            [{"r":-15,"rx":5,"ry":4.75,"y":-1.5,"x":-1},"3,2"],
            [{"rx":13,"ry":4.25,"y":-1,"x":-2.25,"c":"#ed752d","w":1.25},"8,4"],
            [{"r":-7.5,"ry":3.5,"y":-0.25,"x":-1,"c":"#cccccc"},"8,3"]
            
        ]
    }
}