- 設計者は各キーボードのGitHubリポジトリのルートに prk_info.jsonを置く
- 設定アプリはusername/keyboard_nameの指定を受けてprk_info.jsonを取りに行く(無理かも)
- 保存ファイル名はkeymap.rb
- keymap.rbからの読み込み機能も付ける。エリアの識別はコメントで行う。
- prk_info.jsonに含まれる情報
- 準拠バージョン(0.0.1)
- キー配置・物理配置と論理配置の読み替え(KLE?)
- 1レイヤーのキー数
- 機能
- 各機能の使用ピン
| import board | |
| import digitalio | |
| import time | |
| import touchio | |
| import usb_hid | |
| from adafruit_hid.mouse import Mouse | |
| mouse = Mouse(usb_hid.devices) | |
| forward = digitalio.DigitalInOut(board.D7) |
Seeed Fusion XIAO Keyboard Contestのページに
review your experience with us
とあるので書いています。
| /** | |
| * Copyright (c) 2014 - 2021, Nordic Semiconductor ASA | |
| * | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without modification, | |
| * are permitted provided that the following conditions are met: | |
| * | |
| * 1. Redistributions of source code must retain the above copyright notice, this | |
| * list of conditions and the following disclaimer. |
| import board | |
| from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard | |
| from kmk.matrix import DiodeOrientation | |
| class KMKKeyboard(_KMKKeyboard): | |
| col_pins = ( | |
| board.A3, | |
| board.A2, | |
| board.A1, |
このドキュメントは古いです。最新のPRKの実装については公式Wikiをご覧ください
kbd.define_mode_keyではなくvia.define_mode_keyを使う(引数は同一)kbd.start!の前にkbd.append viaする
kbd.append viaしなければVIA機能のないPRKとして使えますkbd.append viaしていなくてもRemapにデバイスが表示されますが、仕様です。:defaultレイヤーはVIAのレイヤー0で上書きされるlayer_count * rows_size * cols_sizeは240を上回ってはいけない(メモリが不足して動かなくなる)| # rbenv install 3.0.0 | |
| # rbenv install mruby-3.0.0 | |
| git clone https://github.com/yswallow/prk_firmware.git | |
| export PRK_HOME=$(pwd)/prk_firmware | |
| cd $PRK_HOME | |
| git checkout monkey | |
| git submodule update --init |