相關鏈接
購買Hasu USB to USB Controller Converter:https://www.1upkeyboards.com/shop/controllers/usb-to-usb-converter/
TMK按鍵編輯器:http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?usb_usb
TMK固件:https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb
刷寫方法:https://github.com/tmk/tmk_keyboard/wiki#flash-firmware
論壇中的介紹:https://geekhack.org/index.php?topic=69169.0
步驟
- 推薦使用在線生成工具,跳轉到第7步。如果希望自己編譯請繼續。下載固件源碼,准備編譯。
自己編譯的固件可以修改編譯的參數,從而使用鍵盤上的絕大多數按鍵。具體參見https://github.com/tmk/tmk_core/blob/master/doc/keymap.md
筆者沒有研究具體交換按鍵的方法,但測試了在Ubuntu下的依賴關系,確保可以編譯通過。 - 這里使用Ubuntu 16.04.3 LTS
- 安裝依賴
sudo apt install gcc-avr dfu-programmer gcc-arm-non-eabi avr-libc
- 克隆源碼
git clone https://github.com/tmk/tmk_keyboard.git; cd tmk_keyboard
- 克隆Git submodule
git submodule init; git submodule update
- 編譯源碼
cd converter/usb_usb; make -f Makefile.unimap
。跳轉到第8步。 - 訪問TMK按鍵編輯器修改自己需要的按鍵序列,並下載固件
- 你就會得到一個
.hex
的文件,這個就是固件准備刷入。 - 下載刷寫工具
https://www.microchip.com/developmenttools/ProductDetails/flip
不清楚為什么沒有Mac版的,也只能識別為鍵盤驅動,無法掛載到虛擬機。推薦使用Windows系統進行刷寫。 - 打開刷寫工具flip,點擊
Device - Select
選擇你芯片上的型號,我這里是ATmega32U4
- 選擇
Settings - Communication - USB
,再點擊控制器上的按鈕。如果這里提示AtLibUsbDfu.dll
找不到,請查看https://imgur.com/a/bnwzy - 選擇
File - Load HEX File
,並選擇剛才的.hex
文件。 - 勾選
Erase
Blank Check
Program
Verify
並點擊Run
按鈕。 - 重新插拔USB設備,或點擊
Start Application
按鈕。以使用新固件。