Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23d6ca9942 | ||
|
|
b16bfac107 | ||
|
|
09dfc08207 | ||
|
|
07fce7ba13 | ||
|
|
52d8cbf092 | ||
|
|
73b8f85816 | ||
|
|
aadea5ab97 | ||
|
|
54f7708eaa | ||
|
|
d7aa245c33 | ||
|
|
2cb0b41ce7 | ||
|
|
e25f05224f | ||
|
|
7639b5aa3e | ||
|
|
4d41645598 | ||
|
|
b1a8fafa62 | ||
|
|
6461087c86 | ||
|
|
7aa74c227b |
No files matched your search
+1
-1
@@ -97,7 +97,7 @@ MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
|
|||||||
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
|
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
|
||||||
|
|
||||||
# Pull in rules from info.json
|
# Pull in rules from info.json
|
||||||
INFO_RULES_MK = $(shell bin/qmk generate-rules-mk --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk)
|
INFO_RULES_MK = $(shell bin/qmk generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk)
|
||||||
include $(INFO_RULES_MK)
|
include $(INFO_RULES_MK)
|
||||||
|
|
||||||
# Check for keymap.json first, so we can regenerate keymap.c
|
# Check for keymap.json first, so we can regenerate keymap.c
|
||||||
|
|||||||
@@ -0,0 +1,574 @@
|
|||||||
|
# キーコードの概要
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.11.64:docs/keycodes.md
|
||||||
|
git diff 0.11.64 HEAD -- docs/keycodes.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
[キーマップ](ja/keymap.md) を定義するときは、それぞれのキーに有効な定義が必要です。このページは、QMK で使えるキーコードに相当するシンボルについて記述しています。
|
||||||
|
|
||||||
|
このページは参照のみです。それぞれのキーの種類毎のリンク先のページに、それぞれのキーの機能についてもっと詳細に記載しています。
|
||||||
|
|
||||||
|
## 基本的なキーコード :id=basic-keycodes
|
||||||
|
|
||||||
|
[基本的なキーコード](ja/keycodes_basic.md) も見てください。
|
||||||
|
|
||||||
|
?> 訳注: 以下の説明は、OS のキーボード配列の設定が「US」の場合のものです。OS のキーボード配列の設定が「JIS」の場合、一部のキーは下の表と異なる文字が入力されます。例えば、`KC_LBRC` は、OS のキーボード配列の設定が US であれば「`[` または `{`」が入力されますが、JIS の場合「`@` または <code>`</code>」が入力されます。
|
||||||
|
?> これは、OS がキーボードから送信されたキーコードを解釈する際に、キーボード配列の設定によって対応する文字を変えるためです。もし、OS のキーボード配列の設定を JIS にする場合、`#include "keymap_jp.h"` を `keymap.c` に追加すると`JP_AT` のような JIS キーボードのキーキャップに対応したキーを指定できます。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |Windows |macOS |Linux<sup>1</sup>|
|
||||||
|
|-----------------------|------------------------------|-----------------------------------------|-------------|-------------|-----------------|
|
||||||
|
|`KC_NO` |`XXXXXXX` |このキーを無視します (何もしません) 。 |*N/A* |*N/A* |*N/A* |
|
||||||
|
|`KC_TRANSPARENT` |`KC_TRNS`, `_______` | 次に低いレイヤーの非透過キーを使う |*N/A* |*N/A* |*N/A* |
|
||||||
|
|`KC_A` | |`a` と `A` |✔ |✔ |✔ |
|
||||||
|
|`KC_B` | |`b` と `B` |✔ |✔ |✔ |
|
||||||
|
|`KC_C` | |`c` と `C` |✔ |✔ |✔ |
|
||||||
|
|`KC_D` | |`d` と `D` |✔ |✔ |✔ |
|
||||||
|
|`KC_E` | |`e` と `E` |✔ |✔ |✔ |
|
||||||
|
|`KC_F` | |`f` と `F` |✔ |✔ |✔ |
|
||||||
|
|`KC_G` | |`g` と `G` |✔ |✔ |✔ |
|
||||||
|
|`KC_H` | |`h` と `H` |✔ |✔ |✔ |
|
||||||
|
|`KC_I` | |`i` と `I` |✔ |✔ |✔ |
|
||||||
|
|`KC_J` | |`j` と `J` |✔ |✔ |✔ |
|
||||||
|
|`KC_K` | |`k` と `K` |✔ |✔ |✔ |
|
||||||
|
|`KC_L` | |`l` と `L` |✔ |✔ |✔ |
|
||||||
|
|`KC_M` | |`m` と `M` |✔ |✔ |✔ |
|
||||||
|
|`KC_N` | |`n` と `N` |✔ |✔ |✔ |
|
||||||
|
|`KC_O` | |`o` と `O` |✔ |✔ |✔ |
|
||||||
|
|`KC_P` | |`p` と `P` |✔ |✔ |✔ |
|
||||||
|
|`KC_Q` | |`q` と `Q` |✔ |✔ |✔ |
|
||||||
|
|`KC_R` | |`r` と `R` |✔ |✔ |✔ |
|
||||||
|
|`KC_S` | |`s` と `S` |✔ |✔ |✔ |
|
||||||
|
|`KC_T` | |`t` と `T` |✔ |✔ |✔ |
|
||||||
|
|`KC_U` | |`u` と `U` |✔ |✔ |✔ |
|
||||||
|
|`KC_V` | |`v` と `V` |✔ |✔ |✔ |
|
||||||
|
|`KC_W` | |`w` と `W` |✔ |✔ |✔ |
|
||||||
|
|`KC_X` | |`x` と `X` |✔ |✔ |✔ |
|
||||||
|
|`KC_Y` | |`y` と `Y` |✔ |✔ |✔ |
|
||||||
|
|`KC_Z` | |`z` と `Z` |✔ |✔ |✔ |
|
||||||
|
|`KC_1` | |`1` と `!` |✔ |✔ |✔ |
|
||||||
|
|`KC_2` | |`2` と `@` |✔ |✔ |✔ |
|
||||||
|
|`KC_3` | |`3` と `#` |✔ |✔ |✔ |
|
||||||
|
|`KC_4` | |`4` と `$` |✔ |✔ |✔ |
|
||||||
|
|`KC_5` | |`5` と `%` |✔ |✔ |✔ |
|
||||||
|
|`KC_6` | |`6` と `^` |✔ |✔ |✔ |
|
||||||
|
|`KC_7` | |`7` と `&` |✔ |✔ |✔ |
|
||||||
|
|`KC_8` | |`8` と `*` |✔ |✔ |✔ |
|
||||||
|
|`KC_9` | |`9` と `(` |✔ |✔ |✔ |
|
||||||
|
|`KC_0` | |`0` と `)` |✔ |✔ |✔ |
|
||||||
|
|`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ |
|
||||||
|
|`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ |
|
||||||
|
|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ |
|
||||||
|
|`KC_TAB` | |Tab |✔ |✔ |✔ |
|
||||||
|
|`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ |
|
||||||
|
|`KC_MINUS` |`KC_MINS` |`-` と `_` |✔ |✔ |✔ |
|
||||||
|
|`KC_EQUAL` |`KC_EQL` |`=` と `+` |✔ |✔ |✔ |
|
||||||
|
|`KC_LBRACKET` |`KC_LBRC` |`[` と `{` |✔ |✔ |✔ |
|
||||||
|
|`KC_RBRACKET` |`KC_RBRC` |`]` と `}` |✔ |✔ |✔ |
|
||||||
|
|`KC_BSLASH` |`KC_BSLS` |`\` と `\|` |✔ |✔ |✔ |
|
||||||
|
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` と `~` |✔ |✔ |✔ |
|
||||||
|
|`KC_SCOLON` |`KC_SCLN` |`;` と `:` |✔ |✔ |✔ |
|
||||||
|
|`KC_QUOTE` |`KC_QUOT` |`'` と `"` |✔ |✔ |✔ |
|
||||||
|
|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |<code>`</code> と `~`, JIS 全角/半角 |✔ |✔ |✔ |
|
||||||
|
|`KC_COMMA` |`KC_COMM` |`,` と `<` |✔ |✔ |✔ |
|
||||||
|
|`KC_DOT` | |`.` と `>` |✔ |✔ |✔ |
|
||||||
|
|`KC_SLASH` |`KC_SLSH` |`/` と `?` |✔ |✔ |✔ |
|
||||||
|
|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS` |Caps Lock |✔ |✔ |✔ |
|
||||||
|
|`KC_F1` | |F1 |✔ |✔ |✔ |
|
||||||
|
|`KC_F2` | |F2 |✔ |✔ |✔ |
|
||||||
|
|`KC_F3` | |F3 |✔ |✔ |✔ |
|
||||||
|
|`KC_F4` | |F4 |✔ |✔ |✔ |
|
||||||
|
|`KC_F5` | |F5 |✔ |✔ |✔ |
|
||||||
|
|`KC_F6` | |F6 |✔ |✔ |✔ |
|
||||||
|
|`KC_F7` | |F7 |✔ |✔ |✔ |
|
||||||
|
|`KC_F8` | |F8 |✔ |✔ |✔ |
|
||||||
|
|`KC_F9` | |F9 |✔ |✔ |✔ |
|
||||||
|
|`KC_F10` | |F10 |✔ |✔ |✔ |
|
||||||
|
|`KC_F11` | |F11 |✔ |✔ |✔ |
|
||||||
|
|`KC_F12` | |F12 |✔ |✔ |✔ |
|
||||||
|
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |✔ |✔<sup>2</sup>|✔ |
|
||||||
|
|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD` |Scroll Lock, 画面の明るさダウン (macOS) |✔ |✔<sup>2</sup>|✔ |
|
||||||
|
|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, 画面の明るさアップ (macOS) |✔ |✔<sup>2</sup>|✔ |
|
||||||
|
|`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ |
|
||||||
|
|`KC_HOME` | |Home |✔ |✔ |✔ |
|
||||||
|
|`KC_PGUP` | |Page Up |✔ |✔ |✔ |
|
||||||
|
|`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ |
|
||||||
|
|`KC_END` | |End |✔ |✔ |✔ |
|
||||||
|
|`KC_PGDOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ |
|
||||||
|
|`KC_RIGHT` |`KC_RGHT` |右矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_LEFT` | |左矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_DOWN` | |下矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_UP` | |上矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_NUMLOCK` |`KC_NLCK` |テンキー Num Lock と Clear |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_SLASH` |`KC_PSLS` |テンキー `/` |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_ASTERISK` |`KC_PAST` |テンキー `*` |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_MINUS` |`KC_PMNS` |テンキー `-` |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_PLUS` |`KC_PPLS` |テンキー `+` |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_ENTER` |`KC_PENT` |テンキー Enter |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_1` |`KC_P1` |テンキー `1` と End |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_2` |`KC_P2` |テンキー `2` と下矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_3` |`KC_P3` |テンキー `3` と Page Down |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_4` |`KC_P4` |テンキー `4` と左矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_5` |`KC_P5` |テンキー `5` |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_6` |`KC_P6` |テンキー `6` と右矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_7` |`KC_P7` |テンキー `7` と Home |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_8` |`KC_P8` |テンキー `8` と上矢印 |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_9` |`KC_P9` |テンキー `9` と Page Up |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_0` |`KC_P0` |テンキー `0` と Insert |✔ |✔ |✔ |
|
||||||
|
|`KC_KP_DOT` |`KC_PDOT` |テンキー `.` と Delete |✔ |✔ |✔ |
|
||||||
|
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` と `\|` |✔ |✔ |✔ |
|
||||||
|
|`KC_APPLICATION` |`KC_APP` |アプリケーションキー (Windows コンテキストメニューキー) |✔ | |✔ |
|
||||||
|
|`KC_POWER` | |システム電源 | |✔<sup>3</sup>|✔ |
|
||||||
|
|`KC_KP_EQUAL` |`KC_PEQL` |テンキー `=` |✔ |✔ |✔ |
|
||||||
|
|`KC_F13` | |F13 |✔ |✔ |✔ |
|
||||||
|
|`KC_F14` | |F14 |✔ |✔ |✔ |
|
||||||
|
|`KC_F15` | |F15 |✔ |✔ |✔ |
|
||||||
|
|`KC_F16` | |F16 |✔ |✔ |✔ |
|
||||||
|
|`KC_F17` | |F17 |✔ |✔ |✔ |
|
||||||
|
|`KC_F18` | |F18 |✔ |✔ |✔ |
|
||||||
|
|`KC_F19` | |F19 |✔ |✔ |✔ |
|
||||||
|
|`KC_F20` | |F20 |✔ | |✔ |
|
||||||
|
|`KC_F21` | |F21 |✔ | |✔ |
|
||||||
|
|`KC_F22` | |F22 |✔ | |✔ |
|
||||||
|
|`KC_F23` | |F23 |✔ | |✔ |
|
||||||
|
|`KC_F24` | |F24 |✔ | |✔ |
|
||||||
|
|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ |
|
||||||
|
|`KC_HELP` | |Help | | |✔ |
|
||||||
|
|`KC_MENU` | |Menu | | |✔ |
|
||||||
|
|`KC_SELECT` |`KC_SLCT` |Select | | |✔ |
|
||||||
|
|`KC_STOP` | |Stop | | |✔ |
|
||||||
|
|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ |
|
||||||
|
|`KC_UNDO` | |アンドゥ | | |✔ |
|
||||||
|
|`KC_CUT` | |カット | | |✔ |
|
||||||
|
|`KC_COPY` | |コピー | | |✔ |
|
||||||
|
|`KC_PASTE` |`KC_PSTE` |ペースト | | |✔ |
|
||||||
|
|`KC_FIND` | |検索 | | |✔ |
|
||||||
|
|`KC__MUTE` | |ミュート | |✔ |✔ |
|
||||||
|
|`KC__VOLUP` | |音量アップ | |✔ |✔ |
|
||||||
|
|`KC__VOLDOWN` | |音量ダウン | |✔ |✔ |
|
||||||
|
|`KC_LOCKING_CAPS` |`KC_LCAP` |Caps Lock のロック |✔ |✔ | |
|
||||||
|
|`KC_LOCKING_NUM` |`KC_LNUM` |Num Lock のロック |✔ |✔ | |
|
||||||
|
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Scroll Lock のロック |✔ |✔ | |
|
||||||
|
|`KC_KP_COMMA` |`KC_PCMM` |テンキー `,` | | |✔ |
|
||||||
|
|`KC_KP_EQUAL_AS400` | |AS/400 キーボードのテンキー `=` | | | |
|
||||||
|
|`KC_INT1` |`KC_RO` |JIS `\` と `_` |✔ | |✔ |
|
||||||
|
|`KC_INT2` |`KC_KANA` |JIS カタカナ/ひらがな |✔ | |✔ |
|
||||||
|
|`KC_INT3` |`KC_JYEN` |JIS `¥` と `\|` |✔ | |✔ |
|
||||||
|
|`KC_INT4` |`KC_HENK` |JIS 変換 |✔ | |✔ |
|
||||||
|
|`KC_INT5` |`KC_MHEN` |JIS 無変換 |✔ | |✔ |
|
||||||
|
|`KC_INT6` | |JIS テンキー `,` | | |✔ |
|
||||||
|
|`KC_INT7` | |International 7 | | | |
|
||||||
|
|`KC_INT8` | |International 8 | | | |
|
||||||
|
|`KC_INT9` | |International 9 | | | |
|
||||||
|
|`KC_LANG1` |`KC_HAEN` |ハングル/英語 | | |✔ |
|
||||||
|
|`KC_LANG2` |`KC_HANJ` |韓文漢字 | | |✔ |
|
||||||
|
|`KC_LANG3` | |JIS カタカナ | | |✔ |
|
||||||
|
|`KC_LANG4` | |JIS ひらがな | | |✔ |
|
||||||
|
|`KC_LANG5` | |JIS 全角/半角 | | |✔ |
|
||||||
|
|`KC_LANG6` | |Language 6 | | | |
|
||||||
|
|`KC_LANG7` | |Language 7 | | | |
|
||||||
|
|`KC_LANG8` | |Language 8 | | | |
|
||||||
|
|`KC_LANG9` | |Language 9 | | | |
|
||||||
|
|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | | | |
|
||||||
|
|`KC_SYSREQ` | |SysReq/Attention | | | |
|
||||||
|
|`KC_CANCEL` | |Cancel | | | |
|
||||||
|
|`KC_CLEAR` |`KC_CLR` |Clear | | |✔ |
|
||||||
|
|`KC_PRIOR` | |Prior | | | |
|
||||||
|
|`KC_RETURN` | |Return | | | |
|
||||||
|
|`KC_SEPARATOR` | |Separator | | | |
|
||||||
|
|`KC_OUT` | |Out | | | |
|
||||||
|
|`KC_OPER` | |Oper | | | |
|
||||||
|
|`KC_CLEAR_AGAIN` | |Clear/Again | | | |
|
||||||
|
|`KC_CRSEL` | |CrSel/Props | | | |
|
||||||
|
|`KC_EXSEL` | |ExSel | | | |
|
||||||
|
|`KC_LCTRL` |`KC_LCTL` |左 Control |✔ |✔ |✔ |
|
||||||
|
|`KC_LSHIFT` |`KC_LSFT` |左 Shift |✔ |✔ |✔ |
|
||||||
|
|`KC_LALT` |`KC_LOPT` |左 Alt (Option) |✔ |✔ |✔ |
|
||||||
|
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |左 GUI (Windows/Command/Meta key) |✔ |✔ |✔ |
|
||||||
|
|`KC_RCTRL` |`KC_RCTL` |右 Control |✔ |✔ |✔ |
|
||||||
|
|`KC_RSHIFT` |`KC_RSFT` |右 Shift |✔ |✔ |✔ |
|
||||||
|
|`KC_RALT` |`KC_ROPT`, `KC_ALGR` |右 Alt (Option/AltGr) |✔ |✔ |✔ |
|
||||||
|
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |右 GUI (Windows/Command/Meta key) |✔ |✔ |✔ |
|
||||||
|
|`KC_SYSTEM_POWER` |`KC_PWR` |システム電源オフ |✔ |✔<sup>3</sup>|✔ |
|
||||||
|
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |システムスリープ |✔ |✔<sup>3</sup>|✔ |
|
||||||
|
|`KC_SYSTEM_WAKE` |`KC_WAKE` |システムスリープ解除 | |✔<sup>3</sup>|✔ |
|
||||||
|
|`KC_AUDIO_MUTE` |`KC_MUTE` |ミュート |✔ |✔ |✔ |
|
||||||
|
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |音量アップ |✔ |✔<sup>4</sup>|✔ |
|
||||||
|
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |音量ダウン |✔ |✔<sup>4</sup>|✔ |
|
||||||
|
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |次の曲へ |✔ |✔<sup>5</sup>|✔ |
|
||||||
|
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |前の曲へ |✔ |✔<sup>5</sup>|✔ |
|
||||||
|
|`KC_MEDIA_STOP` |`KC_MSTP` |再生停止 |✔ | |✔ |
|
||||||
|
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |再生/一時停止 |✔ |✔ |✔ |
|
||||||
|
|`KC_MEDIA_SELECT` |`KC_MSEL` |Media Player 起動 |✔ | |✔ |
|
||||||
|
|`KC_MEDIA_EJECT` |`KC_EJCT` |イジェクト | |✔ |✔ |
|
||||||
|
|`KC_MAIL` | |メール起動 |✔ | |✔ |
|
||||||
|
|`KC_CALCULATOR` |`KC_CALC` |電卓起動 |✔ | |✔ |
|
||||||
|
|`KC_MY_COMPUTER` |`KC_MYCM` |マイコンピュータを開く |✔ | |✔ |
|
||||||
|
|`KC_WWW_SEARCH` |`KC_WSCH` |ブラウザ検索 |✔ | |✔ |
|
||||||
|
|`KC_WWW_HOME` |`KC_WHOM` |ブラウザホーム画面 |✔ | |✔ |
|
||||||
|
|`KC_WWW_BACK` |`KC_WBAK` |ブラウザ戻る |✔ | |✔ |
|
||||||
|
|`KC_WWW_FORWARD` |`KC_WFWD` |ブラウザ進む |✔ | |✔ |
|
||||||
|
|`KC_WWW_STOP` |`KC_WSTP` |ブラウザ読み込み中止 |✔ | |✔ |
|
||||||
|
|`KC_WWW_REFRESH` |`KC_WREF` |ブラウザ再読み込み |✔ | |✔ |
|
||||||
|
|`KC_WWW_FAVORITES` |`KC_WFAV` |ブラウザお気に入り |✔ | |✔ |
|
||||||
|
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |次の曲へ |✔ |✔<sup>5</sup>|✔ |
|
||||||
|
|`KC_MEDIA_REWIND` |`KC_MRWD` |前の曲へ |✔<sup>6</sup>|✔<sup>5</sup>|✔ |
|
||||||
|
|`KC_BRIGHTNESS_UP` |`KC_BRIU` |画面の明るさアップ |✔ |✔ |✔ |
|
||||||
|
|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |画面の明るさダウン |✔ |✔ |✔ |
|
||||||
|
|
||||||
|
<sup>1. Linux カーネル HID ドライバは [ほぼ全てのキーコード](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c) を識別しますが、デフォルトの関連付けは デスクトップ環境/ウィンドウマネージャによって決まります。</sup><br/>
|
||||||
|
<sup>2. F13-F15 として取り扱われます。</sup><br/>
|
||||||
|
<sup>3. 約3秒間押していると、プロンプトが表示されます。</sup><br/>
|
||||||
|
<sup>4. Shift と Option を押していると、ボリュームレベルの細かいコントロールが可能になります。</sup><br/>
|
||||||
|
<sup>5. iTunes では、タップすると1曲全体がスキップされます。押していると曲の中で早送り/巻き戻しになります。</sup><br/>
|
||||||
|
<sup>6. Windows Media Player は巻き戻しキーを識別しませんが、VLC では早送り/巻き戻しキーで再生速度が変更されます。</sup>
|
||||||
|
|
||||||
|
## Quantum キーコード :id=quantum-keycodes
|
||||||
|
|
||||||
|
[Quantum キーコード](ja/quantum_keycodes.md#qmk-keycodes) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|--------------|-----------|---------------------------------------------------------|
|
||||||
|
|`RESET` | |ファームウエア書き込みのためにキーボードをブートローダーモードにします |
|
||||||
|
|`DEBUG` | |デバッグモードを切り替えます |
|
||||||
|
|`EEPROM_RESET`|`EEP_RST` |キーボードの EEPROM (不揮発メモリ) を再初期化します |
|
||||||
|
|
||||||
|
## オーディオキー :id=audio-keys
|
||||||
|
|
||||||
|
[オーディオ](ja/feature_audio.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|----------------|------------|---------------------------------------|
|
||||||
|
|`AU_ON` | |オーディオモードオン |
|
||||||
|
|`AU_OFF` | |オーディオモードオフ |
|
||||||
|
|`AU_TOG` | |オーディオモードを切り替えます |
|
||||||
|
|`CLICKY_TOGGLE` |`CK_TOGG` |オーディオクリックモードを切り替えます |
|
||||||
|
|`CLICKY_UP` |`CK_UP` |クリック音の周波数を増やします |
|
||||||
|
|`CLICKY_DOWN` |`CK_DOWN` |クリック音の周波数を減らします |
|
||||||
|
|`CLICKY_RESET` |`CK_RST` |周波数をデフォルトに再設定します |
|
||||||
|
|`MU_ON` | |音楽モードをオンにします |
|
||||||
|
|`MU_OFF` | |音楽モードをオフにします |
|
||||||
|
|`MU_TOG` | |音楽モードを切り替えます |
|
||||||
|
|`MU_MOD` | |音楽モードを循環します |
|
||||||
|
|
||||||
|
## バックライト :id=backlighting
|
||||||
|
|
||||||
|
[バックライト](ja/feature_backlight.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|---------|-------------------------------------|
|
||||||
|
|`BL_TOGG`|バックライトをオンあるいはオフにする |
|
||||||
|
|`BL_STEP`|バックライトレベルを循環する |
|
||||||
|
|`BL_ON` |バックライトを最大輝度にセットする |
|
||||||
|
|`BL_OFF` |バックライトをオフにする |
|
||||||
|
|`BL_INC` |バックライトのレベルを上げる |
|
||||||
|
|`BL_DEC` |バックライトのレベルを下げる |
|
||||||
|
|`BL_BRTG`|バックライトの明滅動作を切り替える |
|
||||||
|
|
||||||
|
## ブートマジック :id=bootmagic
|
||||||
|
|
||||||
|
[ブートマジック](ja/feature_bootmagic.md) も見てください。
|
||||||
|
|
||||||
|
| キー | エイリアス| 説明 |
|
||||||
|
|------------------------------------|-----------|-------------------------------------------------------|
|
||||||
|
| `MAGIC_SWAP_CONTROL_CAPSLOCK` | `CL_SWAP` | Caps Lock と左 Control の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_CONTROL_CAPSLOCK` | `CL_NORM` | Caps Lock と左 Control の入れ替えの解除 |
|
||||||
|
| `MAGIC_CAPSLOCK_TO_CONTROL` | `CL_CTRL` | Caps Lock を Control として扱う |
|
||||||
|
| `MAGIC_UNCAPSLOCK_TO_CONTROL` | `CL_CAPS` | Caps Lock を Control として扱うことを止める |
|
||||||
|
| `MAGIC_SWAP_LCTL_LGUI` | `LCG_SWP` | 左 Control と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_LCTL_LGUI` | `LCG_NRM` | 左 Control と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_RCTL_RGUI` | `RCG_SWP` | 右 Control と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_RCTL_RGUI` | `RCG_NRM` | 右 Control と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_CTL_GUI` | `CG_SWAP` | 両側の Control と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_CTL_GUI` | `CG_NORM` | 両側の Control と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_TOGGLE_CTL_GUI` | `CG_TOGG` | 両側の Control と GUI の入れ替えの切り替え |
|
||||||
|
| `MAGIC_SWAP_LALT_LGUI` | `LAG_SWP` | 左 Alt と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_LALT_LGUI` | `LAG_NRM` | 左 Alt と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_RALT_RGUI` | `RAG_SWP` | 右 Alt と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_RALT_RGUI` | `RAG_NRM` | 右 Alt と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_ALT_GUI` | `AG_SWAP` | 両側の Alt と GUI の入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_ALT_GUI` | `AG_NORM` | 両側の Alt と GUI の入れ替えを解除 |
|
||||||
|
| `MAGIC_TOGGLE_ALT_GUI` | `AG_TOGG` | 両側の Alt と GUI の入れ替えの切り替え |
|
||||||
|
| `MAGIC_NO_GUI` | `GUI_OFF` | GUI キーを無効にする |
|
||||||
|
| `MAGIC_UNNO_GUI` | `GUI_ON` | GUI キーを有効にする |
|
||||||
|
| `MAGIC_SWAP_GRAVE_ESC` | `GE_SWAP` | <code>`</code> とエスケープの入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_GRAVE_ESC` | `GE_NORM` | <code>`</code> とエスケープの入れ替えを解除 |
|
||||||
|
| `MAGIC_SWAP_BACKSLASH_BACKSPACE` | `BS_SWAP` | `\` と Backspace を入れ替え |
|
||||||
|
| `MAGIC_UNSWAP_BACKSLASH_BACKSPACE` | `BS_NORM` | `\` と Backspace の入れ替えを解除する |
|
||||||
|
| `MAGIC_HOST_NKRO` | `NK_ON` | N キーロールオーバーを有効にする |
|
||||||
|
| `MAGIC_UNHOST_NKRO` | `NK_OFF` | N キーロールオーバーを無効にする |
|
||||||
|
| `MAGIC_TOGGLE_NKRO` | `NK_TOGG` | N キーロールオーバーの有効・無効を切り替え |
|
||||||
|
| `MAGIC_EE_HANDS_LEFT` | `EH_LEFT` | 分割キーボードのマスター側を左手に設定(`EE_HANDS` 用) |
|
||||||
|
| `MAGIC_EE_HANDS_RIGHT` | `EH_RGHT` | 分割キーボードのマスター側を右手に設定(`EE_HANDS` 用) |
|
||||||
|
|
||||||
|
## Bluetooth :id=bluetooth
|
||||||
|
|
||||||
|
[Bluetooth](ja/feature_bluetooth.md) も見てください。
|
||||||
|
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|----------|--------------------------------------|
|
||||||
|
|`OUT_AUTO`|USB と Bluetooth を自動的に切り替える |
|
||||||
|
|`OUT_USB` |USB のみ |
|
||||||
|
|`OUT_BT` |Bluetooth のみ |
|
||||||
|
|
||||||
|
## 動的マクロ :id=dynamic-macros
|
||||||
|
|
||||||
|
[動的マクロ](ja/feature_dynamic_macros.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|-----------------|---------|-------------------------------------|
|
||||||
|
|`DYN_REC_START1` |`DM_REC1`|マクロ 1 の記録を開始します |
|
||||||
|
|`DYN_REC_START2` |`DM_REC2`|マクロ 2 の記録を開始します |
|
||||||
|
|`DYN_MACRO_PLAY1`|`DM_PLY1`|マクロ 1 を再生します |
|
||||||
|
|`DYN_MACRO_PLAY2`|`DM_PLY2`|マクロ 2 を再生します |
|
||||||
|
|`DYN_REC_STOP` |`DM_RSTP`|現在記録中のマクロの記録を終了します |
|
||||||
|
|
||||||
|
## グレイブエスケープ :id=grave-escape
|
||||||
|
|
||||||
|
[グレイブエスケープ](ja/feature_grave_esc.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|-----------|---------|------------------------------------------------------------------|
|
||||||
|
|`GRAVE_ESC`|`KC_GESC`|押された場合に Escape。Shift あるいは GUI が押されたままの場合は <code>`</code>|
|
||||||
|
|
||||||
|
## キーロック :id=key-lock
|
||||||
|
|
||||||
|
[キーロック](ja/feature_key_lock.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|---------|--------------------------------------------------|
|
||||||
|
|`KC_LOCK`|キーが再び押されるまで次のキーを押したままにします |
|
||||||
|
|
||||||
|
## レイヤー切り替え :id=layer-switching
|
||||||
|
|
||||||
|
[レイヤー切り替え](ja/feature_layers.md#switching-and-toggling-layers) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|----------------|--------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
|`DF(layer)` |指定されたレイヤーを基本 (デフォルト) レイヤーに設定する |
|
||||||
|
|`MO(layer)` |キーを押したら一時的に `layer` を切り替える。(切り替え先のレイヤーには `KC_TRNS` が必要です) |
|
||||||
|
|`OSL(layer)` |次のキーが押されるまで、一時的にレイヤーをアクティブにします。詳細は [ワンショットキー](ja/one_shot_keys.md) のとおり。 |
|
||||||
|
|`LM(layer, mod)`|`mod` がアクティブな状態で (MO のように) 一時的にレイヤーをアクティブにします。ここでは、`mod` は mods_bit のことです。Mod については [こちら](ja/mod_tap.md) で見ることができます。実装例: `LM(LAYER_1, MOD_LALT)` |
|
||||||
|
|`LT(layer, kc)` |押していると `layer` をオンにし、タップすると `kc` になります。 |
|
||||||
|
|`TG(layer)` |`layer` のオン・オフを切り替え |
|
||||||
|
|`TO(layer)` |`layer` をオンにして、デフォルトレイヤーを除く他のレイヤーをオフにします。 |
|
||||||
|
|`TT(layer)` |複数回タップしない限り `MO` のように動作し、複数回タップすると `layer` をオンにトグルします。 |
|
||||||
|
|
||||||
|
## リーダーキー :id=leader-key
|
||||||
|
|
||||||
|
[リーダーキー](ja/feature_leader_key.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|---------|-------------------------------|
|
||||||
|
|`KC_LEAD`|リーダーキーのシーケンスを開始 |
|
||||||
|
|
||||||
|
## マウスキー :id=mouse-keys
|
||||||
|
|
||||||
|
[マウスキー](ja/feature_mouse_keys.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|----------------|---------|-------------------------|
|
||||||
|
|`KC_MS_UP` |`KC_MS_U`|マウスカーソルを上に移動 |
|
||||||
|
|`KC_MS_DOWN` |`KC_MS_D`|マウスカーソルを下に移動 |
|
||||||
|
|`KC_MS_LEFT` |`KC_MS_L`|マウスカーソルを左に移動 |
|
||||||
|
|`KC_MS_RIGHT` |`KC_MS_R`|マウスカーソルを右に移動 |
|
||||||
|
|`KC_MS_BTN1` |`KC_BTN1`|ボタン1を押す |
|
||||||
|
|`KC_MS_BTN2` |`KC_BTN2`|ボタン2を押す |
|
||||||
|
|`KC_MS_BTN3` |`KC_BTN3`|ボタン3を押す |
|
||||||
|
|`KC_MS_BTN4` |`KC_BTN4`|ボタン4を押す |
|
||||||
|
|`KC_MS_BTN5` |`KC_BTN5`|ボタン5を押す |
|
||||||
|
|`KC_MS_WH_UP` |`KC_WH_U`|ホイールを向こう側に回転 |
|
||||||
|
|`KC_MS_WH_DOWN` |`KC_WH_D`|ホイールを手前側に回転 |
|
||||||
|
|`KC_MS_WH_LEFT` |`KC_WH_L`|ホイールを左に倒す |
|
||||||
|
|`KC_MS_WH_RIGHT`|`KC_WH_R`|ホイールを右に倒す |
|
||||||
|
|`KC_MS_ACCEL0` |`KC_ACL0`|速度を0に設定 |
|
||||||
|
|`KC_MS_ACCEL1` |`KC_ACL1`|速度を1に設定 |
|
||||||
|
|`KC_MS_ACCEL2` |`KC_ACL2`|速度を2に設定 |
|
||||||
|
|
||||||
|
## 修飾キー :id=modifiers
|
||||||
|
|
||||||
|
[修飾キー](ja/feature_advanced_keycodes.md#modifier-keys) も見てください。
|
||||||
|
|
||||||
|
| キー | エイリアス | 説明 |
|
||||||
|
|------------|---------------------------------|---------------------------------------------------------------|
|
||||||
|
| `LCTL(kc)` | `C(kc)` | 左 Control を押しながら `kc` を押します。 |
|
||||||
|
| `LSFT(kc)` | `S(kc)` | 左 Shift を押しながら `kc` を押します。 |
|
||||||
|
| `LALT(kc)` | `A(kc)`, `LOPT(kc)` | 左 Alt を押しながら `kc`を押します。 |
|
||||||
|
| `LGUI(kc)` | `G(kc)`, `LCMD(kc)`, `LWIN(kc)` | 左 GUI を押しながら `kc` を押します。 |
|
||||||
|
| `RCTL(kc)` | | 右 Control を押しながら `kc` を押します。 |
|
||||||
|
| `RSFT(kc)` | | 右 Shift を押しながら `kc` を押します。 |
|
||||||
|
| `RALT(kc)` | `ROPT(kc)`, `ALGR(kc)` | 右 Alt (AltGr) を押しながら `kc` を押します。 |
|
||||||
|
| `RGUI(kc)` | `RCMD(kc)`, `LWIN(kc)` | 右 GUI を押しながら `kc` を押します。 |
|
||||||
|
| `SGUI(kc)` | `SCMD(kc)`, `SWIN(kc)` | 左 Shift と GUI を押しながら `kc` を押します。 |
|
||||||
|
| `LCA(kc)` | | 左 Control と Alt を押しながら `kc` を押します。 |
|
||||||
|
| `LSA(kc)` | | 左 Shift と Alt を押しながら `kc` を押します。 |
|
||||||
|
| `RSA(kc)` |`SAGR(kc)` | 右 Shift と Alt (AltGr) を押しながら `kc` を押します。 |
|
||||||
|
| `RCS(kc)` | | 右 Control と Shift を押しながら `kc` を押します。 |
|
||||||
|
| `LCAG(kc)` | | 左 Control、Alt、GUI を押しながら `kc` を押します。 |
|
||||||
|
| `MEH(kc)` | | 左 Control、Shift、Alt を押しながら `kc` を押します。 |
|
||||||
|
| `HYPR(kc)` | | 左 Control、Shift、Alt、GUI を押しながら `kc` を押します。 |
|
||||||
|
| `KC_MEH` | | 左 Control、Shift、Alt |
|
||||||
|
| `KC_HYPR` | | 左 Control、Shift、Alt、GUI |
|
||||||
|
|
||||||
|
|
||||||
|
## モッドタップキー :id=mod-tap-keys
|
||||||
|
|
||||||
|
[モッドタップキー](ja/mod_tap.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス | 説明 |
|
||||||
|
|--------------|-------------------------------------------------------------------|------------------------------------------------------------------------|
|
||||||
|
| `MT(mod, kc)`| |押したままの場合は `mod` 、タップした場合は `kc` |
|
||||||
|
| `LCTL_T(kc)` | `CTL_T(kc)` | 押したままの場合は左 Control、タップした場合は `kc` |
|
||||||
|
| `LSFT_T(kc)` | `SFT_T(kc)` | 押したままの場合は左 Shift、タップした場合は `kc` |
|
||||||
|
| `LALT_T(kc)` | `LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` | 押したままの場合は左 Alt、タップした場合は `kc` |
|
||||||
|
| `LGUI_T(kc)` | `LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)` | 押したままの場合は左 GUI、タップした場合は `kc` |
|
||||||
|
| `RCTL_T(kc)` | | 押したままの場合は右 Control、タップした場合は `kc` |
|
||||||
|
| `RSFT_T(kc)` | | 押したままの場合は右 Shift、タップした場合は `kc` |
|
||||||
|
| `RALT_T(kc)` | `ROPT_T(kc)`, `ALGR_T(kc)` | 押したままの場合は右 Alt (AltGr) 、タップした場合は `kc` |
|
||||||
|
| `RGUI_T(kc)` | `RCMD_T(kc)`, `RWIN_T(kc)` | 押したままの場合は右 GUI、タップした場合は `kc` |
|
||||||
|
| `SGUI_T(kc)` | `SCMD_T(kc)`, `SWIN_T(kc)` | 押したままの場合は左 Shift と GUI、タップした場合は `kc` |
|
||||||
|
| `LCA_T(kc)` | | 押したままの場合は左 Control と Alt、タップした場合は `kc` |
|
||||||
|
| `LSA_T(kc)` | | 押したままの場合は左 Shift と Alt、タップした場合は `kc` |
|
||||||
|
| `RSA_T(kc)` |`SAGR_T(kc)` | 押したままの場合は右 Shift と Alt (AltGr) 、タップした場合は `kc` |
|
||||||
|
| `RCS_T(kc)` | | 押したままの場合は右 Control と Shift、タップした場合は `kc` |
|
||||||
|
| `LCAG_T(kc)` | | 押したままの場合は左 Control、Alt、GUI、タップした場合は `kc` |
|
||||||
|
| `RCAG_T(kc)` | | 押したままの場合は右 Control、Alt、GUI、タップした場合は `kc` |
|
||||||
|
| `C_S_T(kc)` | | 押したままの場合は左 Control と Shift、タップした場合は `kc` |
|
||||||
|
| `MEH_T(kc)` | | 押したままの場合は左 Control、Shift、Alt、タップした場合は `kc` |
|
||||||
|
| `HYPR_T(kc)` | `ALL_T(kc)` | 押したままの場合は左 Control、Shift、Alt、GUI、タップした場合は `kc` - より詳しくは[ここ](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)を見てください |
|
||||||
|
|
||||||
|
## RGB ライト :id=rgb-lighting
|
||||||
|
|
||||||
|
[RGB ライト](ja/feature_rgblight.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス|説明 |
|
||||||
|
|-------------------|----------|---------------------------------------------------------------------|
|
||||||
|
|`RGB_TOG` | |RGB ライトのオン・オフを切り替え |
|
||||||
|
|`RGB_MODE_FORWARD` |`RGB_MOD` |RGB モードを順送りで変更し、Shift を押していると逆順で変更します。 |
|
||||||
|
|`RGB_MODE_REVERSE` |`RGB_RMOD`|RGB モードを逆順で変更し、Shift を押していると順送りで変更します。 |
|
||||||
|
|`RGB_HUI` | |色相 (HUE) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_HUD` | |色相 (HUE) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_SAI` | |彩度 (SAT) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_SAD` | |彩度 (SAT) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_VAI` | |明度 (VAL/brightness) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_VAD` | |明度 (VAL/brightness) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_MODE_PLAIN` |`RGB_M_P `|静止(動き無し) モードに固定します |
|
||||||
|
|`RGB_MODE_BREATHE` |`RGB_M_B` |明滅アニメーションモード |
|
||||||
|
|`RGB_MODE_RAINBOW` |`RGB_M_R` |レインボーアニメーションモード |
|
||||||
|
|`RGB_MODE_SWIRL` |`RGB_M_SW`|渦巻アニメーションモード |
|
||||||
|
|`RGB_MODE_SNAKE` |`RGB_M_SN`|スネークアニメーションモード |
|
||||||
|
|`RGB_MODE_KNIGHT` |`RGB_M_K` |「ナイトライダー」アニメーションモード |
|
||||||
|
|`RGB_MODE_XMAS` |`RGB_M_X` |クリスマスアニメーションモード |
|
||||||
|
|`RGB_MODE_GRADIENT`|`RGB_M_G` |固定階調アニメーションモード |
|
||||||
|
|`RGB_MODE_RGBTEST` |`RGB_M_T` |赤、緑、青のテストアニメーションモード |
|
||||||
|
|
||||||
|
## RGB マトリックスライト :id=rgb-matrix-lighting
|
||||||
|
|
||||||
|
[RGB マトリックスライト](ja/feature_rgb_matrix.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス|説明 |
|
||||||
|
|-------------------|----------|--------------------------------------------------------------------------------------------------------|
|
||||||
|
|`RGB_TOG` | |RGB ライトのオン・オフを切り替え |
|
||||||
|
|`RGB_MODE_FORWARD` |`RGB_MOD` |RGB モードを順送りで変更し、Shift を押していると逆順で変更します。 |
|
||||||
|
|`RGB_MODE_REVERSE` |`RGB_RMOD`|RGB モードを逆順で変更し、Shift を押していると順送りで変更します。 |
|
||||||
|
|`RGB_HUI` | |色相 (HUE) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_HUD` | |色相 (HUE) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_SAI` | |彩度 (SAT) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_SAD` | |彩度 (SAT) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_VAI` | |明度 (VAL/brightness) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_VAD` | |明度 (VAL/brightness) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|`RGB_SPI` | |エフェクトのスピード (EEPROM はまだサポートしていません) を増加させ、Shift を押していると減少させます。 |
|
||||||
|
|`RGB_SPD` | |エフェクトのスピード (EEPROM はまだサポートしていません) を減少させ、Shift を押していると増加させます。 |
|
||||||
|
|
||||||
|
## 感熱式プリンタ :id=thermal-printer
|
||||||
|
|
||||||
|
[感熱式プリンタ](ja/feature_thermal_printer.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|-----------|---------------------------------|
|
||||||
|
|`PRINT_ON` |ユーザが入力した全ての印刷を開始 |
|
||||||
|
|`PRINT_OFF`|ユーザが入力した全ての印刷を停止 |
|
||||||
|
|
||||||
|
## US ANSI シフト済シンボル :id=us-ansi-shifted-symbols
|
||||||
|
|
||||||
|
[US ANSI シフト済シンボル](ja/keycodes_us_ansi_shifted.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明|
|
||||||
|
|------------------------|-------------------|-----------|
|
||||||
|
|`KC_TILDE` |`KC_TILD` |`~` |
|
||||||
|
|`KC_EXCLAIM` |`KC_EXLM` |`!` |
|
||||||
|
|`KC_AT` | |`@` |
|
||||||
|
|`KC_HASH` | |`#` |
|
||||||
|
|`KC_DOLLAR` |`KC_DLR` |`$` |
|
||||||
|
|`KC_PERCENT` |`KC_PERC` |`%` |
|
||||||
|
|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` |
|
||||||
|
|`KC_AMPERSAND` |`KC_AMPR` |`&` |
|
||||||
|
|`KC_ASTERISK` |`KC_ASTR` |`*` |
|
||||||
|
|`KC_LEFT_PAREN` |`KC_LPRN` |`(` |
|
||||||
|
|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` |
|
||||||
|
|`KC_UNDERSCORE` |`KC_UNDS` |`_` |
|
||||||
|
|`KC_PLUS` | |`+` |
|
||||||
|
|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` |
|
||||||
|
|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` |
|
||||||
|
|`KC_PIPE` | |`\|` |
|
||||||
|
|`KC_COLON` |`KC_COLN` |`:` |
|
||||||
|
|`KC_DOUBLE_QUOTE` |`KC_DQUO`, `KC_DQT`|`"` |
|
||||||
|
|`KC_LEFT_ANGLE_BRACKET` |`KC_LABK`, `KC_LT` |`<` |
|
||||||
|
|`KC_RIGHT_ANGLE_BRACKET`|`KC_RABK`, `KC_GT` |`>` |
|
||||||
|
|`KC_QUESTION` |`KC_QUES` |`?` |
|
||||||
|
|
||||||
|
## ワンショットキー :id=one-shot-keys
|
||||||
|
|
||||||
|
[ワンショットキー](ja/one_shot_keys.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|------------|--------------------------------|
|
||||||
|
|`OSM(mod)` | 次のキーが押されるまで、`mod` を押したままにします |
|
||||||
|
|`OSL(layer)`| 次のキーが押されるまで、一時的にレイヤーをアクティブにします |
|
||||||
|
|
||||||
|
## Space Cadet :id=space-cadet
|
||||||
|
|
||||||
|
[Space Cadet](ja/feature_space_cadet.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|-----------|-------------------------------------------|
|
||||||
|
|`KC_LCPO` |押したままの場合は左 Control、タップした場合は `(` |
|
||||||
|
|`KC_RCPC` |押したままの場合は右 Control、タップした場合は `)` |
|
||||||
|
|`KC_LSPO` |押したままの場合は左 Shift、タップした場合は `(`、 |
|
||||||
|
|`KC_RSPC` |押したままの場合は右 Shift、タップした場合は `)`、 |
|
||||||
|
|`KC_LAPO` |押したままの場合は左 Alt、タップした場合は `(`、 |
|
||||||
|
|`KC_RAPC` |押したままの場合は右 Alt、タップした場合は `)`、 |
|
||||||
|
|`KC_SFTENT`|押したままの場合は右 Shift、タップした場合は Enter |
|
||||||
|
|
||||||
|
## スワップハンド :id=swap-hands
|
||||||
|
|
||||||
|
[スワップハンド](ja/feature_swap_hands.md) も見てください。
|
||||||
|
|
||||||
|
|キー |説明 |
|
||||||
|
|-------------|----------------------------------------------------------------------------------|
|
||||||
|
| `SH_T(key)` | タップで `key` を送信する。押している時に一時的に入れ替え。 |
|
||||||
|
| `SH_ON` | 入れ替えをオンにして、そのままにする。 |
|
||||||
|
| `SH_OFF` | 入れ替えをオフにして、そのままにする。既知の状態に戻るのに適しています。 |
|
||||||
|
| `SH_MON` | 押すとスワップハンドし、放すと通常に戻る (一時的)。 |
|
||||||
|
| `SH_MOFF` | 一時的に入れ替えをオフする。 |
|
||||||
|
| `SH_TG` | キーを押すたびにオンとオフを切り替える。 |
|
||||||
|
| `SH_TT` | タップで切り替える。押している時に一時的に切り替える。 |
|
||||||
|
| `SH_OS` | ワンショットスワップハンド: 押している時あるいは次のキーを押すまで切り替える。 |
|
||||||
|
|
||||||
|
## ユニコードサポート :id=unicode-support
|
||||||
|
|
||||||
|
[ユニコードサポート](ja/feature_unicode.md) も見てください。
|
||||||
|
|
||||||
|
|キー |エイリアス |説明 |
|
||||||
|
|----------------------|-----------|----------------------------------------------------------------------|
|
||||||
|
|`UC(c)` | |コードポイント `c` のユニコードを送信 |
|
||||||
|
|`X(i)` | |`unicode_map` のインデックス `i` のユニコードを送信 |
|
||||||
|
|`XP(i, j)` | |Shift/Capsが有効なら、インデックス `i` または `j` のユニコードを送信 |
|
||||||
|
|`UNICODE_MODE_FORWARD`|`UC_MOD` |ユニコード入力方式を順送りで選択 |
|
||||||
|
|`UNICODE_MODE_REVERSE`|`UC_RMOD` |ユニコード入力方式を逆順で選択 |
|
||||||
|
|`UNICODE_MODE_OSX` |`UC_M_OS` |ユニコード入力方式を macOS 方式に切り替え |
|
||||||
|
|`UNICODE_MODE_LNX` |`UC_M_LN` |ユニコード入力方式を Linux 方式に切り替え |
|
||||||
|
|`UNICODE_MODE_WIN` |`UC_M_WI` |ユニコード入力方式を Windows 方式に切り替え |
|
||||||
|
|`UNICODE_MODE_BSD` |`UC_M_BS` |ユニコード入力方式を BSD 方式に切り替え (実装されていません) |
|
||||||
|
|`UNICODE_MODE_WINC` |`UC_M_WC` |ユニコード入力方式を WinCompose を使う Windows 方式に切り替え |
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 0xCB - Conor Burns
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "1337.h"
|
||||||
|
|
||||||
|
void eeconfig_init_kb(void) {
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_enable();
|
||||||
|
backlight_level(5);
|
||||||
|
#endif
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
rgblight_enable();
|
||||||
|
rgblight_sethsv(0, 255, 255);
|
||||||
|
#ifdef RGBLIGHT_ANIMATIONS
|
||||||
|
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
eeconfig_update_kb(0);
|
||||||
|
eeconfig_init_user();
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 0xCB - Conor Burns
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT( \
|
||||||
|
KA1, KA2, KA3, \
|
||||||
|
KB1, KB2, KB3, \
|
||||||
|
KC1, KC2, KC3 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ KA1, KA2, KA3 }, \
|
||||||
|
{ KB1, KB2, KB3 }, \
|
||||||
|
{ KC1, KC2, KC3 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 0xCB - Conor Burns
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xCB00
|
||||||
|
#define PRODUCT_ID 0x1337
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER 0xCB
|
||||||
|
#define PRODUCT 1337
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 3
|
||||||
|
#define MATRIX_COLS 3
|
||||||
|
|
||||||
|
/* Keyboard Matrix Assignments */
|
||||||
|
#define DIRECT_PINS { \
|
||||||
|
{ D2, D4, F4 }, \
|
||||||
|
{ D7, B1, B3 }, \
|
||||||
|
{ E6, B4, B2 } \
|
||||||
|
}
|
||||||
|
#define TAP_CODE_DELAY 10
|
||||||
|
#define ENCODER_RESOLUTION 4
|
||||||
|
#define ENCODERS_PAD_A { F5 }
|
||||||
|
#define ENCODERS_PAD_B { F6 }
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B5
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
#define BACKLIGHT_LEVELS 7
|
||||||
|
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLED_NUM 5
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
/*== all animations enable ==*/
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
/* Oled Size */
|
||||||
|
#define OLED_DISPLAY_128X64
|
||||||
|
|
||||||
|
/* QMK DFU */
|
||||||
|
#define QMK_LED B0
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "0xCB 1337",
|
||||||
|
"url": "https://0xCB.dev",
|
||||||
|
"maintainer": "Conor-Burns",
|
||||||
|
"width": 3,
|
||||||
|
"height": 3,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0},
|
||||||
|
{"x":1, "y":0},
|
||||||
|
{"x":2, "y":0},
|
||||||
|
{"x":0, "y":1},
|
||||||
|
{"x":1, "y":1},
|
||||||
|
{"x":2, "y":1},
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1, "y":2},
|
||||||
|
{"x":2, "y":2}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 0xCB - Conor Burns
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_HOME,
|
||||||
|
_MISC,
|
||||||
|
_RGB,
|
||||||
|
_BLED
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_HOME] = LAYOUT(
|
||||||
|
KC_MPRV, KC_MNXT, KC_MPLY,
|
||||||
|
KC_PGUP, KC_PGDN, TO(3),
|
||||||
|
KC_HOME, KC_END, TO(1)
|
||||||
|
),
|
||||||
|
[_MISC] = LAYOUT(
|
||||||
|
_______, _______, _______,
|
||||||
|
_______, _______, TO(0),
|
||||||
|
_______, _______, TO(2)
|
||||||
|
),
|
||||||
|
[_RGB] = LAYOUT(
|
||||||
|
RGB_HUI, RGB_HUD, RGB_MOD,
|
||||||
|
RGB_SAI, RGB_SAD, TO(1),
|
||||||
|
RGB_SPI, RGB_SPD, TO(3)
|
||||||
|
),
|
||||||
|
[_BLED] = LAYOUT(
|
||||||
|
BL_STEP, BL_BRTG, BL_TOGG,
|
||||||
|
BL_ON, BL_OFF, TO(2),
|
||||||
|
BL_INC, BL_DEC, TO(0)
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */
|
||||||
|
#ifdef ENCODER_ENABLE
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (IS_LAYER_ON(_RGB)) {
|
||||||
|
if (clockwise) {
|
||||||
|
rgblight_increase_val();
|
||||||
|
} else {
|
||||||
|
rgblight_decrease_val();
|
||||||
|
}
|
||||||
|
} else if (IS_LAYER_ON(_BLED)) {
|
||||||
|
if (clockwise) {
|
||||||
|
backlight_increase();
|
||||||
|
} else {
|
||||||
|
backlight_decrease();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* oled stuff :) */
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
uint16_t startup_timer;
|
||||||
|
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
startup_timer = timer_read();
|
||||||
|
return rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void render_logo(void) {
|
||||||
|
static const char PROGMEM logo[] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||||
|
0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x01, 0x01, 0x01,
|
||||||
|
0x01, 0x01, 0x02, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05,
|
||||||
|
0xf8, 0x05, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0x70, 0x78,
|
||||||
|
0x38, 0x3f, 0x1c, 0x0e, 0x0e, 0x0e, 0xfe, 0x0e, 0x0e, 0x1e, 0x1c, 0x3f, 0x38, 0x78, 0x70, 0xe0,
|
||||||
|
0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0xf8, 0x05, 0x02, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xa0,
|
||||||
|
0x13, 0xa2, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfc,
|
||||||
|
0xfe, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x3c, 0x3c, 0x00, 0x00,
|
||||||
|
0x01, 0xff, 0xff, 0xff, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xa2, 0x13, 0xa0, 0x40, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0xc0, 0x40, 0x40, 0xc0, 0x80,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0xc0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x80, 0xc0, 0x40,
|
||||||
|
0x40, 0xc0, 0x80, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xf9, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x7f, 0xff, 0xff, 0xc0, 0x80, 0x80, 0x0f,
|
||||||
|
0x1f, 0x1f, 0x01, 0x01, 0x01, 0x01, 0xff, 0x00, 0x00, 0x00, 0x1e, 0x1e, 0x0e, 0x0e, 0x80, 0xc0,
|
||||||
|
0xc0, 0xff, 0xff, 0x7f, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf9, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x1f, 0x31, 0x40, 0x4e, 0x40, 0x31, 0x1f, 0x00, 0x00, 0x61, 0x16, 0x08, 0x16, 0x61,
|
||||||
|
0x00, 0x00, 0x1f, 0x31, 0x60, 0x40, 0x40, 0x60, 0x20, 0x00, 0x00, 0x7f, 0x44, 0x44, 0x64, 0x3b,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f,
|
||||||
|
0x40, 0x40, 0x00, 0x00, 0x00, 0x20, 0x64, 0x44, 0x44, 0x6e, 0x3b, 0x00, 0x00, 0x20, 0x64, 0x44,
|
||||||
|
0x44, 0x6e, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x03, 0x01, 0x00, 0x00, 0x00, 0x08, 0x14,
|
||||||
|
0x23, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x07, 0x07,
|
||||||
|
0x0f, 0xfe, 0x1e, 0x1c, 0x1c, 0x1c, 0xff, 0x1c, 0x1c, 0x1c, 0x1e, 0xfe, 0x0f, 0x07, 0x03, 0x03,
|
||||||
|
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0a, 0x11, 0x0a, 0x04, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||||
|
0x10, 0x1f, 0x00, 0x00, 0x10, 0x28, 0x47, 0x28, 0x10, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x10,
|
||||||
|
0x10, 0x10, 0x28, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
oled_write_raw_P(logo, sizeof(logo));
|
||||||
|
}
|
||||||
|
/* Shows the name of the current layer and locks for the host (CAPS etc.) */
|
||||||
|
static void render_info(void) {
|
||||||
|
oled_write_P(PSTR("Layer: "), false);
|
||||||
|
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _HOME:
|
||||||
|
oled_write_ln_P(PSTR("HOME"), false);
|
||||||
|
break;
|
||||||
|
case _MISC:
|
||||||
|
oled_write_ln_P(PSTR("MISC"), false);
|
||||||
|
break;
|
||||||
|
case _RGB:
|
||||||
|
oled_write_ln_P(PSTR("RGB"), false);
|
||||||
|
break;
|
||||||
|
case _BLED:
|
||||||
|
oled_write_ln_P(PSTR("Backlight"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_ln_P(PSTR("Undefined"), false);
|
||||||
|
}
|
||||||
|
led_t led_state = host_keyboard_led_state();
|
||||||
|
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
static bool finished_timer = false;
|
||||||
|
if ((timer_elapsed(startup_timer) < 3000) && !finished_timer) {
|
||||||
|
render_logo();
|
||||||
|
} else {
|
||||||
|
finished_timer = true;
|
||||||
|
render_info();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 0xCB - Conor Burns
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_HOME,
|
||||||
|
_MISC,
|
||||||
|
_RGB,
|
||||||
|
_BLED
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_HOME] = LAYOUT(
|
||||||
|
KC_MPRV, KC_MNXT, KC_MPLY,
|
||||||
|
KC_PGUP, KC_PGDN, TO(3),
|
||||||
|
KC_HOME, KC_END, TO(1)
|
||||||
|
),
|
||||||
|
[_MISC] = LAYOUT(
|
||||||
|
_______, _______, _______,
|
||||||
|
_______, _______, TO(0),
|
||||||
|
_______, _______, TO(2)
|
||||||
|
),
|
||||||
|
[_RGB] = LAYOUT(
|
||||||
|
RGB_HUI, RGB_HUD, RGB_MOD,
|
||||||
|
RGB_SAI, RGB_SAD, TO(1),
|
||||||
|
RGB_SPI, RGB_SPD, TO(3)
|
||||||
|
),
|
||||||
|
[_BLED] = LAYOUT(
|
||||||
|
BL_STEP, BL_BRTG, BL_TOGG,
|
||||||
|
BL_ON, BL_OFF, TO(2),
|
||||||
|
BL_INC, BL_DEC, TO(0)
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */
|
||||||
|
#ifdef ENCODER_ENABLE
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (IS_LAYER_ON(_RGB)) {
|
||||||
|
if (clockwise) {
|
||||||
|
rgblight_increase_val();
|
||||||
|
} else {
|
||||||
|
rgblight_decrease_val();
|
||||||
|
}
|
||||||
|
} else if (IS_LAYER_ON(_BLED)) {
|
||||||
|
if (clockwise) {
|
||||||
|
backlight_increase();
|
||||||
|
} else {
|
||||||
|
backlight_decrease();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* oled stuff :) */
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
uint16_t startup_timer;
|
||||||
|
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
startup_timer = timer_read();
|
||||||
|
return rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void render_logo(void) {
|
||||||
|
static const char PROGMEM logo[] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||||
|
0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x01, 0x01, 0x01,
|
||||||
|
0x01, 0x01, 0x02, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05,
|
||||||
|
0xf8, 0x05, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0x70, 0x78,
|
||||||
|
0x38, 0x3f, 0x1c, 0x0e, 0x0e, 0x0e, 0xfe, 0x0e, 0x0e, 0x1e, 0x1c, 0x3f, 0x38, 0x78, 0x70, 0xe0,
|
||||||
|
0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0xf8, 0x05, 0x02, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xa0,
|
||||||
|
0x13, 0xa2, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfc,
|
||||||
|
0xfe, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x3c, 0x3c, 0x00, 0x00,
|
||||||
|
0x01, 0xff, 0xff, 0xff, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xa2, 0x13, 0xa0, 0x40, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0xc0, 0x40, 0x40, 0xc0, 0x80,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0xc0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x80, 0xc0, 0x40,
|
||||||
|
0x40, 0xc0, 0x80, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xf9, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x7f, 0xff, 0xff, 0xc0, 0x80, 0x80, 0x0f,
|
||||||
|
0x1f, 0x1f, 0x01, 0x01, 0x01, 0x01, 0xff, 0x00, 0x00, 0x00, 0x1e, 0x1e, 0x0e, 0x0e, 0x80, 0xc0,
|
||||||
|
0xc0, 0xff, 0xff, 0x7f, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf9, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x1f, 0x31, 0x40, 0x4e, 0x40, 0x31, 0x1f, 0x00, 0x00, 0x61, 0x16, 0x08, 0x16, 0x61,
|
||||||
|
0x00, 0x00, 0x1f, 0x31, 0x60, 0x40, 0x40, 0x60, 0x20, 0x00, 0x00, 0x7f, 0x44, 0x44, 0x64, 0x3b,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f,
|
||||||
|
0x40, 0x40, 0x00, 0x00, 0x00, 0x20, 0x64, 0x44, 0x44, 0x6e, 0x3b, 0x00, 0x00, 0x20, 0x64, 0x44,
|
||||||
|
0x44, 0x6e, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x03, 0x01, 0x00, 0x00, 0x00, 0x08, 0x14,
|
||||||
|
0x23, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x07, 0x07,
|
||||||
|
0x0f, 0xfe, 0x1e, 0x1c, 0x1c, 0x1c, 0xff, 0x1c, 0x1c, 0x1c, 0x1e, 0xfe, 0x0f, 0x07, 0x03, 0x03,
|
||||||
|
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0a, 0x11, 0x0a, 0x04, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||||
|
0x10, 0x1f, 0x00, 0x00, 0x10, 0x28, 0x47, 0x28, 0x10, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x10,
|
||||||
|
0x10, 0x10, 0x28, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
oled_write_raw_P(logo, sizeof(logo));
|
||||||
|
}
|
||||||
|
/* Shows the name of the current layer and locks for the host (CAPS etc.) */
|
||||||
|
static void render_info(void) {
|
||||||
|
oled_write_P(PSTR("Layer: "), false);
|
||||||
|
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _HOME:
|
||||||
|
oled_write_ln_P(PSTR("HOME"), false);
|
||||||
|
break;
|
||||||
|
case _MISC:
|
||||||
|
oled_write_ln_P(PSTR("MISC"), false);
|
||||||
|
break;
|
||||||
|
case _RGB:
|
||||||
|
oled_write_ln_P(PSTR("RGB"), false);
|
||||||
|
break;
|
||||||
|
case _BLED:
|
||||||
|
oled_write_ln_P(PSTR("Backlight"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_ln_P(PSTR("Undefined"), false);
|
||||||
|
}
|
||||||
|
led_t led_state = host_keyboard_led_state();
|
||||||
|
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
static bool finished_timer = false;
|
||||||
|
if ((timer_elapsed(startup_timer) < 3000) && !finished_timer) {
|
||||||
|
render_logo();
|
||||||
|
} else {
|
||||||
|
finished_timer = true;
|
||||||
|
render_info();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# 0xCB 1337
|
||||||
|
|
||||||
|
Macro keypad
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Conor Burns](https://github.com/conor-burns)
|
||||||
|
* Hardware Supported: https://github.com/conor-burns/0xcb-1337
|
||||||
|
* Hardware Availability: Soon on tindie or order your own parts - the hardware in the repo is Open Source :D
|
||||||
|
* PCB renders :)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
To go to bootloader press row 0 col 0 key (top left) while plugging in the board.
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 0xcb/1337:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make 0xcb/1337:default:flash
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = qmk-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
|
OLED_DRIVER_ENABLE = yes
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"width": 17,
|
"width": 17,
|
||||||
"height": 8,
|
"height": 8,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT_split_4x6_5": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"label":"L00", "x":0, "y":0},
|
{"label":"L00", "x":0, "y":0},
|
||||||
{"label":"L01", "x":1, "y":0},
|
{"label":"L01", "x":1, "y":0},
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/* Copyright 2020 Pylon
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "boston.h"
|
||||||
|
|
||||||
|
void keyboard_post_init_kb(void) {
|
||||||
|
/* this is to set an LED color at startup so it's not some random color*/
|
||||||
|
rgblight_enable_noeeprom();
|
||||||
|
rgblight_sethsv_noeeprom(0, 0, 128);
|
||||||
|
keyboard_post_init_user();
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/* Copyright 2020 Pylon
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define ___ KC_NO
|
||||||
|
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K5E, K2E, K2F, K2G, K2H, K2I, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, \
|
||||||
|
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, \
|
||||||
|
K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5F, K5G, K5H, K5I, \
|
||||||
|
K60, K61, K62, K64, K65, K67, K69, K6A, K6B, K6C, K6D, K6E, K6F, K6G, K6H \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I}, \
|
||||||
|
{K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I}, \
|
||||||
|
{K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I}, \
|
||||||
|
{K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I}, \
|
||||||
|
{K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I}, \
|
||||||
|
{K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I}, \
|
||||||
|
{K60, K61, K62, ___, K64, K65, ___, K67, ___, K69, K6A, K6B, K6C, K6D, K6E, K6F, K6G, K6H, ___ } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,700 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file rt/templates/chconf.h
|
||||||
|
* @brief Configuration file template.
|
||||||
|
* @details A copy of this file must be placed in each project directory, it
|
||||||
|
* contains the application specific kernel settings.
|
||||||
|
*
|
||||||
|
* @addtogroup config
|
||||||
|
* @details Kernel related settings and hooks.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CHCONF_H
|
||||||
|
# define CHCONF_H
|
||||||
|
|
||||||
|
# define _CHIBIOS_RT_CONF_
|
||||||
|
# define _CHIBIOS_RT_CONF_VER_6_0_
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name System timers settings
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System time counter resolution.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_ST_RESOLUTION)
|
||||||
|
# define CH_CFG_ST_RESOLUTION 32
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick frequency.
|
||||||
|
* @details Frequency of the system timer that drives the system ticks. This
|
||||||
|
* setting also defines the system tick time unit.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_ST_FREQUENCY)
|
||||||
|
# define CH_CFG_ST_FREQUENCY 10000
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time intervals data size.
|
||||||
|
* @note Allowed values are 16, 32 or 64 bits.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_INTERVALS_SIZE)
|
||||||
|
# define CH_CFG_INTERVALS_SIZE 32
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time types data size.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_TIME_TYPES_SIZE)
|
||||||
|
# define CH_CFG_TIME_TYPES_SIZE 32
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time delta constant for the tick-less mode.
|
||||||
|
* @note If this value is zero then the system uses the classic
|
||||||
|
* periodic tick. This value represents the minimum number
|
||||||
|
* of ticks that is safe to specify in a timeout directive.
|
||||||
|
* The value one is not valid, timeouts are rounded up to
|
||||||
|
* this value.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_ST_TIMEDELTA)
|
||||||
|
# define CH_CFG_ST_TIMEDELTA 2
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel parameters and options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Round robin interval.
|
||||||
|
* @details This constant is the number of system ticks allowed for the
|
||||||
|
* threads before preemption occurs. Setting this value to zero
|
||||||
|
* disables the preemption for threads with equal priority and the
|
||||||
|
* round robin becomes cooperative. Note that higher priority
|
||||||
|
* threads can still preempt, the kernel is always preemptive.
|
||||||
|
* @note Disabling the round robin preemption makes the kernel more compact
|
||||||
|
* and generally faster.
|
||||||
|
* @note The round robin preemption is not supported in tickless mode and
|
||||||
|
* must be set to zero in that case.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_TIME_QUANTUM)
|
||||||
|
# define CH_CFG_TIME_QUANTUM 0
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Managed RAM size.
|
||||||
|
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||||
|
* then the whole available RAM is used. The core memory is made
|
||||||
|
* available to the heap allocator and/or can be used directly through
|
||||||
|
* the simplified core memory allocator.
|
||||||
|
*
|
||||||
|
* @note In order to let the OS manage the whole RAM the linker script must
|
||||||
|
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_MEMCORE_SIZE)
|
||||||
|
# define CH_CFG_MEMCORE_SIZE 0
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread automatic spawn suppression.
|
||||||
|
* @details When this option is activated the function @p chSysInit()
|
||||||
|
* does not spawn the idle thread. The application @p main()
|
||||||
|
* function becomes the idle thread and must implement an
|
||||||
|
* infinite loop.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_NO_IDLE_THREAD)
|
||||||
|
# define CH_CFG_NO_IDLE_THREAD FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Performance options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OS optimization.
|
||||||
|
* @details If enabled then time efficient rather than space efficient code
|
||||||
|
* is used when two possible implementations exist.
|
||||||
|
*
|
||||||
|
* @note This is not related to the compiler optimization options.
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_OPTIMIZE_SPEED)
|
||||||
|
# define CH_CFG_OPTIMIZE_SPEED FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Subsystem options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time Measurement APIs.
|
||||||
|
* @details If enabled then the time measurement APIs are included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_TM)
|
||||||
|
# define CH_CFG_USE_TM FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads registry APIs.
|
||||||
|
* @details If enabled then the registry APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_REGISTRY)
|
||||||
|
# define CH_CFG_USE_REGISTRY TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads synchronization APIs.
|
||||||
|
* @details If enabled then the @p chThdWait() function is included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_WAITEXIT)
|
||||||
|
# define CH_CFG_USE_WAITEXIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores APIs.
|
||||||
|
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_SEMAPHORES)
|
||||||
|
# define CH_CFG_USE_SEMAPHORES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores queuing mode.
|
||||||
|
* @details If enabled then the threads are enqueued on semaphores by
|
||||||
|
* priority rather than in FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
|
||||||
|
# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mutexes APIs.
|
||||||
|
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MUTEXES)
|
||||||
|
# define CH_CFG_USE_MUTEXES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables recursive behavior on mutexes.
|
||||||
|
* @note Recursive mutexes are heavier and have an increased
|
||||||
|
* memory footprint.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
|
||||||
|
# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs.
|
||||||
|
* @details If enabled then the conditional variables APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_CONDVARS)
|
||||||
|
# define CH_CFG_USE_CONDVARS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs with timeout.
|
||||||
|
* @details If enabled then the conditional variables APIs with timeout
|
||||||
|
* specification are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
|
||||||
|
# define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs.
|
||||||
|
* @details If enabled then the event flags APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_EVENTS)
|
||||||
|
# define CH_CFG_USE_EVENTS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs with timeout.
|
||||||
|
* @details If enabled then the events APIs with timeout specification
|
||||||
|
* are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
|
||||||
|
# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages APIs.
|
||||||
|
* @details If enabled then the synchronous messages APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MESSAGES)
|
||||||
|
# define CH_CFG_USE_MESSAGES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages queuing mode.
|
||||||
|
* @details If enabled then messages are served by priority rather than in
|
||||||
|
* FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
|
||||||
|
# define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mailboxes APIs.
|
||||||
|
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||||
|
* included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MAILBOXES)
|
||||||
|
# define CH_CFG_USE_MAILBOXES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Core Memory Manager APIs.
|
||||||
|
* @details If enabled then the core memory manager APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MEMCORE)
|
||||||
|
# define CH_CFG_USE_MEMCORE TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Heap Allocator APIs.
|
||||||
|
* @details If enabled then the memory heap allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||||
|
* @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
* @note Mutexes are recommended.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_HEAP)
|
||||||
|
# define CH_CFG_USE_HEAP FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Pools Allocator APIs.
|
||||||
|
* @details If enabled then the memory pools allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MEMPOOLS)
|
||||||
|
# define CH_CFG_USE_MEMPOOLS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Objects FIFOs APIs.
|
||||||
|
* @details If enabled then the objects FIFOs APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_OBJ_FIFOS)
|
||||||
|
# define CH_CFG_USE_OBJ_FIFOS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Pipes APIs.
|
||||||
|
* @details If enabled then the pipes APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_PIPES)
|
||||||
|
# define CH_CFG_USE_PIPES FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Dynamic Threads APIs.
|
||||||
|
* @details If enabled then the dynamic threads creation APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||||
|
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_DYNAMIC)
|
||||||
|
# define CH_CFG_USE_DYNAMIC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Objects factory options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Objects Factory APIs.
|
||||||
|
* @details If enabled then the objects factory APIs are included in the
|
||||||
|
* kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_FACTORY)
|
||||||
|
# define CH_CFG_USE_FACTORY FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Maximum length for object names.
|
||||||
|
* @details If the specified length is zero then the name is stored by
|
||||||
|
* pointer but this could have unintended side effects.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
|
||||||
|
# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the registry of generic objects.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
|
||||||
|
# define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for generic buffers.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
|
||||||
|
# define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for semaphores.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_SEMAPHORES)
|
||||||
|
# define CH_CFG_FACTORY_SEMAPHORES FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for mailboxes.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_MAILBOXES)
|
||||||
|
# define CH_CFG_FACTORY_MAILBOXES FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for objects FIFOs.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
|
||||||
|
# define CH_CFG_FACTORY_OBJ_FIFOS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for Pipes.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
|
||||||
|
# define CH_CFG_FACTORY_PIPES FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Debug options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, kernel statistics.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_STATISTICS)
|
||||||
|
# define CH_DBG_STATISTICS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, system state check.
|
||||||
|
* @details If enabled the correct call protocol for system APIs is checked
|
||||||
|
* at runtime.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
|
||||||
|
# define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, parameters checks.
|
||||||
|
* @details If enabled then the checks on the API functions input
|
||||||
|
* parameters are activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_ENABLE_CHECKS)
|
||||||
|
# define CH_DBG_ENABLE_CHECKS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, consistency checks.
|
||||||
|
* @details If enabled then all the assertions in the kernel code are
|
||||||
|
* activated. This includes consistency checks inside the kernel,
|
||||||
|
* runtime anomalies and port-defined checks.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_ENABLE_ASSERTS)
|
||||||
|
# define CH_DBG_ENABLE_ASSERTS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, trace buffer.
|
||||||
|
* @details If enabled then the trace buffer is activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_TRACE_MASK)
|
||||||
|
# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace buffer entries.
|
||||||
|
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||||
|
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
|
||||||
|
# define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stack checks.
|
||||||
|
* @details If enabled then a runtime stack check is performed.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note The stack check is performed in a architecture/port dependent way.
|
||||||
|
* It may not be implemented or some ports.
|
||||||
|
* @note The default failure mode is to halt the system with the global
|
||||||
|
* @p panic_msg variable set to @p NULL.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_ENABLE_STACK_CHECK)
|
||||||
|
# define CH_DBG_ENABLE_STACK_CHECK FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stacks initialization.
|
||||||
|
* @details If enabled then the threads working area is filled with a byte
|
||||||
|
* value when a thread is created. This can be useful for the
|
||||||
|
* runtime measurement of the used stack.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_FILL_THREADS)
|
||||||
|
# define CH_DBG_FILL_THREADS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, threads profiling.
|
||||||
|
* @details If enabled then a field is added to the @p thread_t structure that
|
||||||
|
* counts the system ticks occurred while executing the thread.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note This debug option is not currently compatible with the
|
||||||
|
* tickless mode.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_THREADS_PROFILING)
|
||||||
|
# define CH_DBG_THREADS_PROFILING FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel hooks
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System structure extension.
|
||||||
|
* @details User fields added to the end of the @p ch_system_t structure.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System initialization hook.
|
||||||
|
* @details User initialization code added to the @p chSysInit() function
|
||||||
|
* just before interrupts are enabled globally.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_SYSTEM_INIT_HOOK() \
|
||||||
|
{ /* Add threads initialization code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads descriptor structure extension.
|
||||||
|
* @details User fields added to the end of the @p thread_t structure.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads initialization hook.
|
||||||
|
* @details User initialization code added to the @p _thread_init() function.
|
||||||
|
*
|
||||||
|
* @note It is invoked from within @p _thread_init() and implicitly from all
|
||||||
|
* the threads creation APIs.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_THREAD_INIT_HOOK(tp) \
|
||||||
|
{ /* Add threads initialization code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads finalization hook.
|
||||||
|
* @details User finalization code added to the @p chThdExit() API.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_THREAD_EXIT_HOOK(tp) \
|
||||||
|
{ /* Add threads finalization code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Context switch hook.
|
||||||
|
* @details This hook is invoked just before switching between threads.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
|
||||||
|
{ /* Context switch code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR enter hook.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_IRQ_PROLOGUE_HOOK() \
|
||||||
|
{ /* IRQ prologue code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR exit hook.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_IRQ_EPILOGUE_HOOK() \
|
||||||
|
{ /* IRQ epilogue code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread enter hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to activate a power saving mode.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_IDLE_ENTER_HOOK() \
|
||||||
|
{ /* Idle-enter code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread leave hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_IDLE_LEAVE_HOOK() \
|
||||||
|
{ /* Idle-leave code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle Loop hook.
|
||||||
|
* @details This hook is continuously invoked by the idle thread loop.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_IDLE_LOOP_HOOK() \
|
||||||
|
{ /* Idle loop code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick event hook.
|
||||||
|
* @details This hook is invoked in the system tick handler immediately
|
||||||
|
* after processing the virtual timers queue.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_SYSTEM_TICK_HOOK() \
|
||||||
|
{ /* System tick event code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System halt hook.
|
||||||
|
* @details This hook is invoked in case to a system halting error before
|
||||||
|
* the system is halted.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
|
||||||
|
{ /* System halt code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace hook.
|
||||||
|
* @details This hook is invoked each time a new record is written in the
|
||||||
|
* trace buffer.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_TRACE_HOOK(tep) \
|
||||||
|
{ /* Trace code here.*/ }
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* CHCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
/* Copyright 2020 Pylon
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xAC11
|
||||||
|
#define PRODUCT_ID 0x4175
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Pylon
|
||||||
|
#define PRODUCT Boston
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 7
|
||||||
|
#define MATRIX_COLS 19
|
||||||
|
|
||||||
|
#define MATRIX_COL_PINS \
|
||||||
|
{ B10, B11, B12, B13, B14, B15, A8, A9, A10, A15, B3, B4, B7, B8, B9, C14, C15, F0, A3 }
|
||||||
|
#define MATRIX_ROW_PINS \
|
||||||
|
{ B5, B6, A7, B0, B1, B2, A4 }
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN A6
|
||||||
|
#define BACKLIGHT_PWM_DRIVER PWMD3
|
||||||
|
#define BACKLIGHT_PWM_CHANNEL 1
|
||||||
|
#define BACKLIGHT_PAL_MODE 1
|
||||||
|
#define BACKLIGHT_LEVELS 6
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BREATHING_PERIOD 6
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* Define RGBLED */
|
||||||
|
#define RGB_DI_PIN A5
|
||||||
|
#define RGBLED_NUM 1
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLIGHT_LAYERS
|
||||||
|
|
||||||
|
//The 3D-printed version of Boston uses APA106 LEDs, which are reversed
|
||||||
|
#define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_RGB
|
||||||
|
|
||||||
|
/* Define encoder */
|
||||||
|
#define ENCODERS_PAD_A \
|
||||||
|
{ C13 }
|
||||||
|
#define ENCODERS_PAD_B \
|
||||||
|
{ F1 }
|
||||||
|
#define ENCODER_RESOLUTION 2
|
||||||
|
#define TAP_CODE_DELAY 15
|
||||||
|
|
||||||
|
/* Lock LEDs */
|
||||||
|
#define LED_NUM_LOCK_PIN A0
|
||||||
|
#define LED_CAPS_LOCK_PIN A1
|
||||||
|
#define LED_SCROLL_LOCK_PIN A2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
@@ -0,0 +1,524 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/halconf.h
|
||||||
|
* @brief HAL configuration header.
|
||||||
|
* @details HAL configuration file, this file allows to enable or disable the
|
||||||
|
* various device drivers from your application. You may also use
|
||||||
|
* this file in order to override the device drivers default settings.
|
||||||
|
*
|
||||||
|
* @addtogroup HAL_CONF
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HALCONF_H
|
||||||
|
# define HALCONF_H
|
||||||
|
|
||||||
|
# define _CHIBIOS_HAL_CONF_
|
||||||
|
# define _CHIBIOS_HAL_CONF_VER_7_0_
|
||||||
|
|
||||||
|
# include "mcuconf.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PAL subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_PAL TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ADC subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_ADC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the CAN subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_CAN FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the cryptographic subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_CRY FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the DAC subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_DAC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the GPT subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_GPT FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2C subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_I2C TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2S subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_I2S FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ICU subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_ICU FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MAC subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_MAC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MMC_SPI subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_MMC_SPI FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PWM subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_PWM TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the RTC subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_RTC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SDC subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_SDC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_SERIAL FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL over USB subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_SERIAL_USB FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SIO subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_SIO FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SPI subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_SPI TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the TRNG subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_TRNG FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the UART subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_UART FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the USB subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_USB TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WDG subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_WDG FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WSPI subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_WSPI FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* PAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
|
||||||
|
# define PAL_USE_CALLBACKS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define PAL_USE_WAIT FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* ADC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define ADC_USE_WAIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CAN driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sleep mode related APIs inclusion switch.
|
||||||
|
*/
|
||||||
|
# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||||
|
# define CAN_USE_SLEEP_MODE TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enforces the driver to use direct callbacks rather than OSAL events.
|
||||||
|
*/
|
||||||
|
# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
|
||||||
|
# define CAN_ENFORCE_USE_CALLBACKS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CRY driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SW fall-back of the cryptographic driver.
|
||||||
|
* @details When enabled, this option, activates a fall-back software
|
||||||
|
* implementation for algorithms not supported by the underlying
|
||||||
|
* hardware.
|
||||||
|
* @note Fall-back implementations may not be present for all algorithms.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_CRY_USE_FALLBACK FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Makes the driver forcibly use the fall-back implementations.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_CRY_ENFORCE_FALLBACK FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* DAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define DAC_USE_WAIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define DAC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* I2C driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||||
|
*/
|
||||||
|
# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the zero-copy API.
|
||||||
|
*/
|
||||||
|
# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||||
|
# define MAC_USE_ZERO_COPY FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||||
|
# define MAC_USE_EVENTS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MMC_SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
* This option is recommended also if the SPI driver does not
|
||||||
|
* use a DMA channel and heavily loads the CPU.
|
||||||
|
*/
|
||||||
|
# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
# define MMC_NICE_WAITING TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SDC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of initialization attempts before rejecting the card.
|
||||||
|
* @note Attempts are performed at 10mS intervals.
|
||||||
|
*/
|
||||||
|
# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||||
|
# define SDC_INIT_RETRY 100
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Include support for MMC cards.
|
||||||
|
* @note MMC support is not yet implemented so this option must be kept
|
||||||
|
* at @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||||
|
# define SDC_MMC_SUPPORT FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
*/
|
||||||
|
# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
# define SDC_NICE_WAITING TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OCR initialization constant for V20 cards.
|
||||||
|
*/
|
||||||
|
# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
|
||||||
|
# define SDC_INIT_OCR_V20 0x50FF8000U
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OCR initialization constant for non-V20 cards.
|
||||||
|
*/
|
||||||
|
# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
|
||||||
|
# define SDC_INIT_OCR 0x80100000U
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default bit rate.
|
||||||
|
* @details Configuration parameter, this is the baud rate selected for the
|
||||||
|
* default configuration.
|
||||||
|
*/
|
||||||
|
# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||||
|
# define SERIAL_DEFAULT_BITRATE 38400
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial buffers size.
|
||||||
|
* @details Configuration parameter, you can change the depth of the queue
|
||||||
|
* buffers depending on the requirements of your application.
|
||||||
|
* @note The default is 16 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
# define SERIAL_BUFFERS_SIZE 16
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL_USB driver related setting. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB buffers size.
|
||||||
|
* @details Configuration parameter, the buffer size must be a multiple of
|
||||||
|
* the USB data endpoint maximum packet size.
|
||||||
|
* @note The default is 256 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
# define SERIAL_USB_BUFFERS_SIZE 1
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB number of buffers.
|
||||||
|
* @note The default is 2 buffers.
|
||||||
|
*/
|
||||||
|
# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||||||
|
# define SERIAL_USB_BUFFERS_NUMBER 2
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define SPI_USE_WAIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables circular transfers APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
|
||||||
|
# define SPI_USE_CIRCULAR FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Handling method for SPI CS line.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
|
||||||
|
# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* UART driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define UART_USE_WAIT FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define UART_USE_MUTUAL_EXCLUSION FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* USB driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define USB_USE_WAIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* WSPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define WSPI_USE_WAIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define WSPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif /* HALCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "boston",
|
||||||
|
"url": "https://github.com/bluepylons/Boston",
|
||||||
|
"maintainer": "Pylon",
|
||||||
|
"width": 20.5,
|
||||||
|
"height": 7.75,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"P1", "x":1.5, "y":0},
|
||||||
|
{"label":"P2", "x":2.5, "y":0},
|
||||||
|
{"label":"P3", "x":3.5, "y":0},
|
||||||
|
{"label":"P4", "x":4.5, "y":0},
|
||||||
|
{"label":"P5", "x":5.75, "y":0},
|
||||||
|
{"label":"P6", "x":6.75, "y":0},
|
||||||
|
{"label":"P7", "x":7.75, "y":0},
|
||||||
|
{"label":"P8", "x":8.75, "y":0},
|
||||||
|
{"label":"P9", "x":10, "y":0},
|
||||||
|
{"label":"P10", "x":11, "y":0},
|
||||||
|
{"label":"P11", "x":12, "y":0},
|
||||||
|
{"label":"P12", "x":13, "y":0},
|
||||||
|
{"label":"P13", "x":14.25, "y":0},
|
||||||
|
{"label":"P14", "x":15.25, "y":0},
|
||||||
|
{"label":"P15", "x":16.25, "y":0},
|
||||||
|
{"label":"Insert", "x":17.5, "y":0},
|
||||||
|
{"label":"Home", "x":18.5, "y":0},
|
||||||
|
{"label":"PgUp", "x":19.5, "y":0},
|
||||||
|
{"label":"Esc", "x":0, "y":1},
|
||||||
|
{"label":"F1", "x":1.5, "y":1},
|
||||||
|
{"label":"F2", "x":2.5, "y":1},
|
||||||
|
{"label":"F3", "x":3.5, "y":1},
|
||||||
|
{"label":"F4", "x":4.5, "y":1},
|
||||||
|
{"label":"F5", "x":5.75, "y":1},
|
||||||
|
{"label":"F6", "x":6.75, "y":1},
|
||||||
|
{"label":"F7", "x":7.75, "y":1},
|
||||||
|
{"label":"F8", "x":8.75, "y":1},
|
||||||
|
{"label":"F9", "x":10, "y":1},
|
||||||
|
{"label":"F10", "x":11, "y":1},
|
||||||
|
{"label":"F11", "x":12, "y":1},
|
||||||
|
{"label":"F12", "x":13, "y":1},
|
||||||
|
{"label":"Print Screen", "x":14.25, "y":1},
|
||||||
|
{"label":"Scroll Lock", "x":15.25, "y":1},
|
||||||
|
{"label":"Pause", "x":16.25, "y":1},
|
||||||
|
{"label":"Delete", "x":17.5, "y":1},
|
||||||
|
{"label":"End", "x":18.5, "y":1},
|
||||||
|
{"label":"PgDn", "x":19.5, "y":1},
|
||||||
|
|
||||||
|
{"label":"~", "x":0, "y":2.5},
|
||||||
|
{"label":"!", "x":1, "y":2.5},
|
||||||
|
{"label":"@", "x":2, "y":2.5},
|
||||||
|
{"label":"#", "x":3, "y":2.5},
|
||||||
|
{"label":"$", "x":4, "y":2.5},
|
||||||
|
{"label":"%", "x":5, "y":2.5},
|
||||||
|
{"label":"^", "x":6, "y":2.5},
|
||||||
|
{"label":"&", "x":7, "y":2.5},
|
||||||
|
{"label":"*", "x":8, "y":2.5},
|
||||||
|
{"label":"(", "x":9, "y":2.5},
|
||||||
|
{"label":")", "x":10, "y":2.5},
|
||||||
|
{"label":"_", "x":11, "y":2.5},
|
||||||
|
{"label":"+", "x":12, "y":2.5},
|
||||||
|
{"label":"Backspace", "x":13, "y":2.5},
|
||||||
|
{"label":"Backspace", "x":14, "y":2.5},
|
||||||
|
{"label":"P16", "x":15.25, "y":2.5},
|
||||||
|
{"label":"Num Lock", "x":16.5, "y":2.5},
|
||||||
|
{"label":"/", "x":17.5, "y":2.5},
|
||||||
|
{"label":"*", "x":18.5, "y":2.5},
|
||||||
|
{"label":"-", "x":19.5, "y":2.5},
|
||||||
|
|
||||||
|
{"label":"Tab", "x":0, "y":3.5, "w":1.5},
|
||||||
|
{"label":"Q", "x":1.5, "y":3.5},
|
||||||
|
{"label":"W", "x":2.5, "y":3.5},
|
||||||
|
{"label":"E", "x":3.5, "y":3.5},
|
||||||
|
{"label":"R", "x":4.5, "y":3.5},
|
||||||
|
{"label":"T", "x":5.5, "y":3.5},
|
||||||
|
{"label":"Y", "x":6.5, "y":3.5},
|
||||||
|
{"label":"U", "x":7.5, "y":3.5},
|
||||||
|
{"label":"I", "x":8.5, "y":3.5},
|
||||||
|
{"label":"O", "x":9.5, "y":3.5},
|
||||||
|
{"label":"P", "x":10.5, "y":3.5},
|
||||||
|
{"label":"{", "x":11.5, "y":3.5},
|
||||||
|
{"label":"}", "x":12.5, "y":3.5},
|
||||||
|
{"label":"|", "x":13.5, "y":3.5, "w":1.5},
|
||||||
|
{"label":"P17", "x":15.25, "y":3.5},
|
||||||
|
{"label":"7", "x":16.5, "y":3.5},
|
||||||
|
{"label":"8", "x":17.5, "y":3.5},
|
||||||
|
{"label":"9", "x":18.5, "y":3.5},
|
||||||
|
{"label":"-", "x":19.5, "y":3.5},
|
||||||
|
|
||||||
|
{"label":"Caps Lock", "x":0, "y":4.5, "w":1.75},
|
||||||
|
{"label":"A", "x":1.75, "y":4.5},
|
||||||
|
{"label":"S", "x":2.75, "y":4.5},
|
||||||
|
{"label":"D", "x":3.75, "y":4.5},
|
||||||
|
{"label":"F", "x":4.75, "y":4.5},
|
||||||
|
{"label":"G", "x":5.75, "y":4.5},
|
||||||
|
{"label":"H", "x":6.75, "y":4.5},
|
||||||
|
{"label":"J", "x":7.75, "y":4.5},
|
||||||
|
{"label":"K", "x":8.75, "y":4.5},
|
||||||
|
{"label":"L", "x":9.75, "y":4.5},
|
||||||
|
{"label":"'", "x":10.75, "y":4.5},
|
||||||
|
{"label":"'", "x":11.75, "y":4.5},
|
||||||
|
{"label":"~", "x":12.75, "y":4.5},
|
||||||
|
{"label":"Enter", "x":13.75, "y":4.5, "w":1.25},
|
||||||
|
{"label":"P18", "x":15.25, "y":4.5},
|
||||||
|
{"label":"4", "x":16.5, "y":4.5},
|
||||||
|
{"label":"5", "x":17.5, "y":4.5},
|
||||||
|
{"label":"6", "x":18.5, "y":4.5},
|
||||||
|
{"label":"+", "x":19.5, "y":4.5},
|
||||||
|
|
||||||
|
{"label":"Left Shift", "x":0, "y":5.5, "w":1.25},
|
||||||
|
{"label":"Left Shift", "x":1.25, "y":5.5},
|
||||||
|
{"label":"Z", "x":2.25, "y":5.5},
|
||||||
|
{"label":"X", "x":3.25, "y":5.5},
|
||||||
|
{"label":"C", "x":4.25, "y":5.5},
|
||||||
|
{"label":"V", "x":5.25, "y":5.5},
|
||||||
|
{"label":"B", "x":6.25, "y":5.5},
|
||||||
|
{"label":"N", "x":7.25, "y":5.5},
|
||||||
|
{"label":"M", "x":8.25, "y":5.5},
|
||||||
|
{"label":"<", "x":9.25, "y":5.5},
|
||||||
|
{"label":">", "x":10.25, "y":5.5},
|
||||||
|
{"label":"?", "x":11.25, "y":5.5},
|
||||||
|
{"label":"Right Shift", "x":12.25, "y":5.5, "w":1.75},
|
||||||
|
{"label":"Up", "x":14.25, "y":5.75},
|
||||||
|
{"label":"1", "x":16.5, "y":5.5},
|
||||||
|
{"label":"2", "x":17.5, "y":5.5},
|
||||||
|
{"label":"3", "x":18.5, "y":5.5},
|
||||||
|
{"label":"Enter", "x":19.5, "y":5.5, "h":2},
|
||||||
|
|
||||||
|
|
||||||
|
{"label":"Ctrl", "x":0, "y":6.5, "w":1.25},
|
||||||
|
{"label":"OS", "x":1.25, "y":6.5, "w":1.25},
|
||||||
|
{"label":"Alt", "x":2.5, "y":6.5, "w":1.25},
|
||||||
|
{"label":"Space", "x":3.75, "y":6.5, "w":2.25},
|
||||||
|
{"label":"Space", "x":6, "y":6.5, "w":1.25},
|
||||||
|
{"label":"Space", "x":7.25, "y":6.5, "w":2.75},
|
||||||
|
{"label":"Alt", "x":10, "y":6.5},
|
||||||
|
{"label":"Menu", "x":11, "y":6.5},
|
||||||
|
{"label":"Ctrl", "x":12, "y":6.5},
|
||||||
|
{"label":"Left", "x":13.25, "y":6.75},
|
||||||
|
{"label":"Down", "x":14.25, "y":6.75},
|
||||||
|
{"label":"Right", "x":15.25, "y":6.75},
|
||||||
|
{"label":"0", "x":16.5, "y":6.5},
|
||||||
|
{"label":"0", "x":17.5, "y":6.5},
|
||||||
|
{"label":".", "x":18.5, "y":6.5}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/* Copyright 2020 Pylon
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
/* Due to how the matrix is setup - the right split backspace key is, for firmware purposes the key to the right of up arrow, which on the actual keyboard is a blocker*/
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_MUTE, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_MPRV, KC_MPLY, KC_MNXT , KC_INS , KC_HOME, KC_PGUP,
|
||||||
|
KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUSE, KC_DEL , KC_END , KC_PGDN,
|
||||||
|
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_CALC, KC_NLCK , KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, RGB_TOG, KC_P7 , KC_P8 , KC_P9 , KC_PEQL,
|
||||||
|
KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_ENT , KC_MSEL, KC_P4 , KC_P5 , KC_P6 , KC_PPLS,
|
||||||
|
KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
/* Copyright 2020 Pylon
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
/* Due to how the matrix is setup - the right split backspace key is, for firmware purposes the key to the right of up arrow, which on the actual keyboard is a blocker*/
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_MUTE, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_MPRV, KC_MPLY, KC_MNXT , KC_INS , KC_HOME, KC_PGUP,
|
||||||
|
KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUSE, KC_DEL , KC_END , KC_PGDN,
|
||||||
|
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_CALC, KC_NLCK , KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, RGB_TOG, KC_P7 , KC_P8 , KC_P9 , KC_PEQL,
|
||||||
|
KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_ENT , KC_MSEL, KC_P4 , KC_P5 , KC_P6 , KC_PPLS,
|
||||||
|
KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[4] = LAYOUT_all(
|
||||||
|
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[5] = LAYOUT_all(
|
||||||
|
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[6] = LAYOUT_all(
|
||||||
|
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[7] = LAYOUT_all(
|
||||||
|
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
|
||||||
|
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
uint8_t go_to_layer = 0; /* Used for the layer changing code for the encoder below */
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (matrix_is_on(6, 10)) { /* Use the knob to change layers when holding down Menu key. Unfortunately using layers to initiate this behavior is not possible. */
|
||||||
|
if (clockwise) {
|
||||||
|
|
||||||
|
layer_off(go_to_layer);
|
||||||
|
|
||||||
|
if(go_to_layer<7) {
|
||||||
|
go_to_layer++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
go_to_layer=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_on(go_to_layer);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
|
layer_off(go_to_layer);
|
||||||
|
|
||||||
|
/* update go_to_layer*/
|
||||||
|
if(go_to_layer>0) {
|
||||||
|
go_to_layer--;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
go_to_layer=7;
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_on(go_to_layer);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else { /* normal operation as volume knob */
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Default layer is white.*/
|
||||||
|
/*Remember to also change the color in keyboard_post_init_kb in boston.c to make the startup color match the layer 0 color */
|
||||||
|
const rgblight_segment_t PROGMEM layer_0[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{0, 4, 0, 0, 128} /*White*/
|
||||||
|
);
|
||||||
|
|
||||||
|
const rgblight_segment_t PROGMEM layer_1[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{0, 4, 0, 255, 128} /*Red*/
|
||||||
|
);
|
||||||
|
|
||||||
|
const rgblight_segment_t PROGMEM layer_2[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{0, 4, 21, 255, 128} /*Orange*/
|
||||||
|
);
|
||||||
|
|
||||||
|
const rgblight_segment_t PROGMEM layer_3[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{0, 4, 43, 255, 128} /*Yellow*/
|
||||||
|
);
|
||||||
|
|
||||||
|
const rgblight_segment_t PROGMEM layer_4[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{0, 4, 75, 255, 128} /*Green*/
|
||||||
|
);
|
||||||
|
|
||||||
|
const rgblight_segment_t PROGMEM layer_5[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{0, 4, 135, 255, 128} /*Teal*/
|
||||||
|
);
|
||||||
|
|
||||||
|
const rgblight_segment_t PROGMEM layer_6[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{0, 4, 160, 255, 128} /*Blue*/
|
||||||
|
);
|
||||||
|
|
||||||
|
const rgblight_segment_t PROGMEM layer_7[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
|
{0, 4, 190, 255, 128} /*Magenta*/
|
||||||
|
);
|
||||||
|
|
||||||
|
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||||
|
layer_0,
|
||||||
|
layer_1,
|
||||||
|
layer_2,
|
||||||
|
layer_3,
|
||||||
|
layer_4,
|
||||||
|
layer_5,
|
||||||
|
layer_6,
|
||||||
|
layer_7
|
||||||
|
);
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Enable the LED layers
|
||||||
|
rgblight_layers = my_rgb_layers;
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
// Both layers will light up if both kb layers are active
|
||||||
|
rgblight_set_layer_state(0, layer_state_cmp(state, 0));
|
||||||
|
rgblight_set_layer_state(1, layer_state_cmp(state, 1));
|
||||||
|
rgblight_set_layer_state(2, layer_state_cmp(state, 2));
|
||||||
|
rgblight_set_layer_state(3, layer_state_cmp(state, 3));
|
||||||
|
rgblight_set_layer_state(4, layer_state_cmp(state, 4));
|
||||||
|
rgblight_set_layer_state(5, layer_state_cmp(state, 5));
|
||||||
|
rgblight_set_layer_state(6, layer_state_cmp(state, 6));
|
||||||
|
rgblight_set_layer_state(7, layer_state_cmp(state, 7));
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool led_update_user(led_t led_state) {
|
||||||
|
rgblight_set_layer_state(0, true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _MCUCONF_H_
|
||||||
|
#define _MCUCONF_H_
|
||||||
|
|
||||||
|
/*
|
||||||
|
* STM32F0xx drivers configuration.
|
||||||
|
* The following settings override the default settings present in
|
||||||
|
* the various device driver implementation headers.
|
||||||
|
* Note that the settings for each driver only have effect if the whole
|
||||||
|
* driver is enabled in halconf.h.
|
||||||
|
*
|
||||||
|
* IRQ priorities:
|
||||||
|
* 3...0 Lowest...Highest.
|
||||||
|
*
|
||||||
|
* DMA priorities:
|
||||||
|
* 0...3 Lowest...Highest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define STM32F0xx_MCUCONF
|
||||||
|
// #define STM32F070xB
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_NO_INIT FALSE
|
||||||
|
#define STM32_PVD_ENABLE FALSE
|
||||||
|
#define STM32_PLS STM32_PLS_LEV0
|
||||||
|
#define STM32_HSI_ENABLED TRUE
|
||||||
|
#define STM32_HSI14_ENABLED TRUE
|
||||||
|
#define STM32_HSI48_ENABLED FALSE
|
||||||
|
#define STM32_LSI_ENABLED TRUE
|
||||||
|
#define STM32_HSE_ENABLED FALSE
|
||||||
|
#define STM32_LSE_ENABLED FALSE
|
||||||
|
#define STM32_SW STM32_SW_PLL
|
||||||
|
#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2
|
||||||
|
#define STM32_PREDIV_VALUE 1
|
||||||
|
#define STM32_PLLMUL_VALUE 12
|
||||||
|
#define STM32_HPRE STM32_HPRE_DIV1
|
||||||
|
#define STM32_PPRE STM32_PPRE_DIV1
|
||||||
|
#define STM32_ADCSW STM32_ADCSW_HSI14
|
||||||
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
|
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||||
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
|
#define STM32_ADCSW STM32_ADCSW_HSI14
|
||||||
|
#define STM32_USBSW STM32_USBSW_HSI48
|
||||||
|
#define STM32_CECSW STM32_CECSW_HSI
|
||||||
|
#define STM32_I2C1SW STM32_I2C1SW_HSI
|
||||||
|
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||||
|
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ADC driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ADC_USE_ADC1 FALSE
|
||||||
|
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_IRQ_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EXT driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI16_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI17_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPT driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_GPT_USE_TIM1 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM2 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM3 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM14 FALSE
|
||||||
|
#define STM32_GPT_TIM1_IRQ_PRIORITY 2
|
||||||
|
#define STM32_GPT_TIM2_IRQ_PRIORITY 2
|
||||||
|
#define STM32_GPT_TIM3_IRQ_PRIORITY 2
|
||||||
|
#define STM32_GPT_TIM14_IRQ_PRIORITY 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I2C driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_I2C_USE_I2C1 TRUE
|
||||||
|
#define STM32_I2C_USE_I2C2 FALSE
|
||||||
|
#define STM32_I2C_BUSY_TIMEOUT 50
|
||||||
|
#define STM32_I2C_I2C1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_I2C_I2C2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_I2C_USE_DMA TRUE
|
||||||
|
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||||
|
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||||
|
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||||
|
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||||
|
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ICU driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ICU_USE_TIM1 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM2 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM3 FALSE
|
||||||
|
#define STM32_ICU_TIM1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_ICU_TIM2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_ICU_TIM3_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PWM driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_PWM_USE_ADVANCED FALSE
|
||||||
|
#define STM32_PWM_USE_TIM1 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM2 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM3 TRUE
|
||||||
|
#define STM32_PWM_TIM1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_PWM_TIM2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_PWM_TIM3_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SERIAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_SERIAL_USE_USART1 FALSE
|
||||||
|
#define STM32_SERIAL_USE_USART2 FALSE
|
||||||
|
#define STM32_SERIAL_USART1_PRIORITY 3
|
||||||
|
#define STM32_SERIAL_USART2_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPI driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_SPI_USE_SPI1 FALSE
|
||||||
|
#define STM32_SPI_USE_SPI2 TRUE
|
||||||
|
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI1_IRQ_PRIORITY 2
|
||||||
|
#define STM32_SPI_SPI2_IRQ_PRIORITY 2
|
||||||
|
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||||
|
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||||
|
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ST driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ST_IRQ_PRIORITY 2
|
||||||
|
#define STM32_ST_USE_TIMER 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* UART driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_UART_USE_USART1 FALSE
|
||||||
|
#define STM32_UART_USE_USART2 FALSE
|
||||||
|
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* USB driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_USB_USE_USB1 TRUE
|
||||||
|
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||||
|
#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
#endif /* _MCUCONF_H_ */
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Boston
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A compact 120% keyboard.
|
||||||
|
|
||||||
|
This keyboard is currently in IC - [Geekhack IC thread is here](https://geekhack.org/index.php?topic=106501.0). Group buy details will be posted once it is ready.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Bluepylons](https://github.com/bluepylons)
|
||||||
|
* Hardware Supported: Boston PCB (STM32F072)
|
||||||
|
* Hardware Availability: PCB and 3D-printing files are available on [Github](https://github.com/bluepylons/Boston).
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make boston:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make boston:default:flash
|
||||||
|
|
||||||
|
To reset the board, use a pin to press the reset button on the underside of the keyboard, above the numlock key.
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = STM32F072
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
|
||||||
|
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||||
|
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
||||||
|
|
||||||
|
# RGB setting
|
||||||
|
WS2812_DRIVER = bitbang
|
||||||
@@ -6,13 +6,13 @@
|
|||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
k30, k31, k32, k33, k34, k35 , k37, k38, k39, k3a, k3b \
|
k30, k31, k32, k33, k34, k36 , k37, k38, k39, k3a, k3b \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
||||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
{ k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \
|
{ k30, k31, k32, k33, k34, KC_NO, k36, k37, k38, k39, k3a, k3b } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_ortho_4x12( \
|
#define LAYOUT_ortho_4x12( \
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
k40, k41, k42, k43, k44, k45 , k47, k48, k49, k4a, k4b \
|
k40, k41, k42, k43, k44, k46 , k47, k48, k49, k4a, k4b \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
||||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
|
||||||
{ k40, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4a, k4b }, \
|
{ k40, k41, k42, k43, k44, KC_NO, k46, k47, k48, k49, k4a, k4b }, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_ortho_5x12( \
|
#define LAYOUT_ortho_5x12( \
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/* Copyright 2020 drhigsby
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define MANUFACTURER DrHigsby
|
||||||
|
#define PRODUCT Dubba175
|
||||||
|
#define VENDOR_ID 0x0420
|
||||||
|
#define PRODUCT_ID 0x0420
|
||||||
|
#define DEVICE_VER 0x0420
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 10
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { B1, B3, B2, B5 }
|
||||||
|
#define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B6 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/* Copyright 2020 drhigsby
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "dubba175.h"
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2020 drhigsby
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, \
|
||||||
|
k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, \
|
||||||
|
k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, \
|
||||||
|
k302, k303, k304, k305, k306, k307 \
|
||||||
|
) { \
|
||||||
|
{ k000, k001, k002, k003, k004, k005, k006, k007, k008, k009 }, \
|
||||||
|
{ k100, k101, k102, k103, k104, k105, k106, k107, k108, k109 }, \
|
||||||
|
{ k200, k201, k202, k203, k204, k205, k206, k207, k208, k209 }, \
|
||||||
|
{ KC_NO, KC_NO, k302, k303, k304, k305, k306, k307, KC_NO, KC_NO } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "dubba175",
|
||||||
|
"url": "http://www.keyboard-layout-editor.com/#/gists/3185de74dfb973bf6d42e785994cfd4e",
|
||||||
|
"maintainer": "drhigsby",
|
||||||
|
"width": 10,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"", "x":0, "y":0}, {"label":"", "x":1, "y":0}, {"label":"", "x":2, "y":0}, {"label":"", "x":3, "y":0}, {"label":"", "x":4, "y":0}, {"label":"", "x":5, "y":0}, {"label":"", "x":6, "y":0}, {"label":"", "x":7, "y":0}, {"label":"", "x":8, "y":0}, {"label":"", "x":9, "y":0}, {"label":"", "x":0, "y":1}, {"label":"", "x":1, "y":1}, {"label":"", "x":2, "y":1}, {"label":"", "x":3, "y":1}, {"label":"", "x":4, "y":1}, {"label":"", "x":5, "y":1}, {"label":"", "x":6, "y":1}, {"label":"", "x":7, "y":1}, {"label":"", "x":8, "y":1}, {"label":"", "x":9, "y":1}, {"label":"", "x":0, "y":2}, {"label":"", "x":1, "y":2}, {"label":"", "x":2, "y":2}, {"label":"", "x":3, "y":2}, {"label":"", "x":4, "y":2}, {"label":"", "x":5, "y":2}, {"label":"", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"", "x":9, "y":2}, {"label":"", "x":1.25, "y":3}, {"label":"", "x":2.25, "y":3}, {"label":"", "x":3.25, "y":3, "w":1.75}, {"x":5, "y":3, "w":1.75}, {"label":"", "x":6.75, "y":3}, {"label":"", "x":7.75, "y":3}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2020 drhigsby
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define COMBO_COUNT 8
|
||||||
|
#define COMBO_TERM 40
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
/* Copyright 2020 drhigsby
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layers{
|
||||||
|
_BASE,
|
||||||
|
_NUM,
|
||||||
|
_NAV,
|
||||||
|
_FN
|
||||||
|
};
|
||||||
|
|
||||||
|
enum combo_events {
|
||||||
|
combo_ESC,
|
||||||
|
combo_BACK,
|
||||||
|
combo_TAB,
|
||||||
|
combo_DELETE,
|
||||||
|
combo_ENTER,
|
||||||
|
combo_QUOT,
|
||||||
|
combo_LPRN,
|
||||||
|
combo_RPRN,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM esc_combo[] = {KC_Q, KC_W, COMBO_END};
|
||||||
|
const uint16_t PROGMEM bspc_combo[] = {KC_O, KC_P, COMBO_END};
|
||||||
|
const uint16_t PROGMEM tab_combo[] = {KC_A, KC_S, COMBO_END};
|
||||||
|
const uint16_t PROGMEM del_combo[] = {KC_Q, KC_P, COMBO_END};
|
||||||
|
const uint16_t PROGMEM enter_combo[] = {KC_L, KC_SCLN, COMBO_END};
|
||||||
|
const uint16_t PROGMEM quot_combo[] = {KC_P, KC_SCLN, COMBO_END};
|
||||||
|
const uint16_t PROGMEM lprn_combo[] = {KC_X, KC_C, COMBO_END};
|
||||||
|
const uint16_t PROGMEM rprn_combo[] = {KC_COMM, KC_DOT, COMBO_END};
|
||||||
|
|
||||||
|
|
||||||
|
combo_t key_combos[COMBO_COUNT] = {
|
||||||
|
[combo_ESC] = COMBO(esc_combo, KC_ESC),
|
||||||
|
[combo_BACK] = COMBO(bspc_combo, KC_BSPC),
|
||||||
|
[combo_TAB] = COMBO(tab_combo, KC_TAB),
|
||||||
|
[combo_DELETE] = COMBO(del_combo, KC_DEL),
|
||||||
|
[combo_ENTER] = COMBO(enter_combo, KC_ENT),
|
||||||
|
[combo_QUOT] = COMBO(quot_combo, KC_QUOT),
|
||||||
|
[combo_LPRN] = COMBO(lprn_combo, KC_LPRN),
|
||||||
|
[combo_RPRN] = COMBO(rprn_combo, KC_RPRN),
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NUM MO(_NUM)
|
||||||
|
#define NAV MO(_NAV)
|
||||||
|
#define FN MO(_FN)
|
||||||
|
#define xxx KC_TRNS
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||||
|
LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH),
|
||||||
|
KC_LCTL, KC_LALT, NUM, KC_SPC, NAV, FN
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
[_NUM] = LAYOUT(
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||||
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL,
|
||||||
|
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
|
||||||
|
KC_PGUP, KC_PGDN, xxx, xxx, KC_PGUP, KC_PGDN
|
||||||
|
),
|
||||||
|
|
||||||
|
[_NAV] = LAYOUT(
|
||||||
|
xxx, KC_UP, xxx, xxx, xxx, xxx, xxx, xxx, KC_UP, xxx,
|
||||||
|
KC_LEFT, KC_DOWN, KC_RGHT, xxx, xxx, xxx, xxx, KC_LEFT, KC_DOWN, KC_RGHT,
|
||||||
|
xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx,
|
||||||
|
xxx, xxx, xxx, xxx, xxx, xxx
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN] = LAYOUT(
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||||
|
xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, KC_F11, KC_F12,
|
||||||
|
xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx,
|
||||||
|
xxx, xxx, xxx, xxx, xxx, xxx
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Default Dubba175 Keymap
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
COMBO_ENABLE = yes
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Dubba175
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Dubba175 is a 10u wide ortholinear keyboard featuring 2x 1.75u spacebars as the bottom row layout option.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [H. Bond](https://github.com/drhigsby)
|
||||||
|
* Hardware Supported: Dubba175 (https://github.com/drhigsby/dubba175)
|
||||||
|
* Hardware Availability: P3DStore.com offers a stacked acrlyic case / make your own
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make dubba175:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
LTO_ENABLE = no # Use link time optimization
|
||||||
+5
-202
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2019 imchipwood
|
Copyright 2020 imchipwood
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,218 +14,21 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xDEAF
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x0913
|
#define PRODUCT_ID 0x0913
|
||||||
#define DEVICE_VER 0x0001
|
|
||||||
#define MANUFACTURER imchipwood
|
#define MANUFACTURER imchipwood
|
||||||
#define PRODUCT dumbpad
|
#define PRODUCT dumbpad
|
||||||
|
|
||||||
|
/* Column/Row IO definitions */
|
||||||
/*
|
|
||||||
* Keyboard Matrix Assignments
|
|
||||||
*
|
|
||||||
* Change this to how you wired your keyboard
|
|
||||||
* COLS: AVR pins used for columns, left to right
|
|
||||||
* ROWS: AVR pins used for rows, top to bottom
|
|
||||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
|
||||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#define MATRIX_ROWS 4
|
|
||||||
#define MATRIX_COLS 5
|
|
||||||
#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
|
|
||||||
#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 }
|
|
||||||
#define UNUSED_PINS
|
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL*/
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* Rotary encoder */
|
|
||||||
#define ENCODERS_PAD_A { D0 }
|
|
||||||
#define ENCODERS_PAD_B { D4 }
|
|
||||||
|
|
||||||
/* LED layer indicators */
|
|
||||||
#define LAYER_INDICATOR_LED_0 B3
|
|
||||||
#define LAYER_INDICATOR_LED_1 B1
|
|
||||||
|
|
||||||
/* Bootmagic - hold down rotary encoder pushbutton while plugging in to enter bootloader */
|
|
||||||
#define BOOTMAGIC_LITE_ROW 3
|
|
||||||
#define BOOTMAGIC_LITE_COLUMN 0
|
|
||||||
|
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
/* Reduce tapdance required taps from 5 to 2 */
|
||||||
//#define MATRIX_HAS_GHOST
|
#define TAPPING_TOGGLE 2
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
|
||||||
//#define LOCKING_SUPPORT_ENABLE
|
|
||||||
/* Locking resynchronize hack */
|
|
||||||
//#define LOCKING_RESYNC_ENABLE
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
|
||||||
*/
|
|
||||||
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
|
||||||
|
|
||||||
// #define BACKLIGHT_PIN B7
|
|
||||||
// #define BACKLIGHT_BREATHING
|
|
||||||
// #define BACKLIGHT_LEVELS 3
|
|
||||||
|
|
||||||
// #define RGB_DI_PIN E2
|
|
||||||
// #ifdef RGB_DI_PIN
|
|
||||||
// #define RGBLED_NUM 16
|
|
||||||
// #define RGBLIGHT_HUE_STEP 8
|
|
||||||
// #define RGBLIGHT_SAT_STEP 8
|
|
||||||
// #define RGBLIGHT_VAL_STEP 8
|
|
||||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
|
||||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
|
||||||
// /*== all animations enable ==*/
|
|
||||||
// #define RGBLIGHT_ANIMATIONS
|
|
||||||
// /*== or choose animations ==*/
|
|
||||||
// #define RGBLIGHT_EFFECT_BREATHING
|
|
||||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
|
||||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
|
||||||
// #define RGBLIGHT_EFFECT_SNAKE
|
|
||||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
|
||||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
|
||||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
|
||||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
|
||||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
|
||||||
// /*== customize breathing effect ==*/
|
|
||||||
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
|
||||||
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
|
||||||
// /*==== use exp() and sin() ====*/
|
|
||||||
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
|
||||||
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
|
||||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
|
||||||
*/
|
|
||||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Force NKRO
|
|
||||||
*
|
|
||||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
|
||||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
|
||||||
* makefile for this to work.)
|
|
||||||
*
|
|
||||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
|
||||||
* until the next keyboard reset.
|
|
||||||
*
|
|
||||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
|
||||||
* fully operational during normal computer usage.
|
|
||||||
*
|
|
||||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
|
||||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
|
||||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
|
||||||
* power-up.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
//#define FORCE_NKRO
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Magic Key Options
|
|
||||||
*
|
|
||||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
|
||||||
* the keyboard. They are best used in combination with the HID Listen program,
|
|
||||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
|
||||||
*
|
|
||||||
* The options below allow the magic key functionality to be changed. This is
|
|
||||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* key combination for magic key command */
|
|
||||||
/* defined by default; to change, uncomment and set to the combination you want */
|
|
||||||
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
|
||||||
|
|
||||||
/* control how magic key switches layers */
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
|
||||||
|
|
||||||
/* override magic key keymap */
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
|
||||||
//#define MAGIC_KEY_HELP H
|
|
||||||
//#define MAGIC_KEY_HELP_ALT SLASH
|
|
||||||
//#define MAGIC_KEY_DEBUG D
|
|
||||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
|
||||||
//#define MAGIC_KEY_DEBUG_KBD K
|
|
||||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
|
||||||
//#define MAGIC_KEY_VERSION V
|
|
||||||
//#define MAGIC_KEY_STATUS S
|
|
||||||
//#define MAGIC_KEY_CONSOLE C
|
|
||||||
//#define MAGIC_KEY_LAYER0 0
|
|
||||||
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
|
||||||
//#define MAGIC_KEY_LAYER1 1
|
|
||||||
//#define MAGIC_KEY_LAYER2 2
|
|
||||||
//#define MAGIC_KEY_LAYER3 3
|
|
||||||
//#define MAGIC_KEY_LAYER4 4
|
|
||||||
//#define MAGIC_KEY_LAYER5 5
|
|
||||||
//#define MAGIC_KEY_LAYER6 6
|
|
||||||
//#define MAGIC_KEY_LAYER7 7
|
|
||||||
//#define MAGIC_KEY_LAYER8 8
|
|
||||||
//#define MAGIC_KEY_LAYER9 9
|
|
||||||
//#define MAGIC_KEY_BOOTLOADER B
|
|
||||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
|
||||||
//#define MAGIC_KEY_LOCK CAPS
|
|
||||||
//#define MAGIC_KEY_EEPROM E
|
|
||||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
|
||||||
//#define MAGIC_KEY_NKRO N
|
|
||||||
//#define MAGIC_KEY_SLEEP_LED Z
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Feature disable options
|
|
||||||
* These options are also useful to firmware size reduction.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* disable debug print */
|
|
||||||
//#define NO_DEBUG
|
|
||||||
|
|
||||||
/* disable print */
|
|
||||||
//#define NO_PRINT
|
|
||||||
|
|
||||||
/* disable action features */
|
|
||||||
//#define NO_ACTION_LAYER
|
|
||||||
//#define NO_ACTION_TAPPING
|
|
||||||
//#define NO_ACTION_ONESHOT
|
|
||||||
//#define NO_ACTION_MACRO
|
|
||||||
//#define NO_ACTION_FUNCTION
|
|
||||||
|
|
||||||
/*
|
|
||||||
* MIDI options
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* enable basic MIDI features:
|
|
||||||
- MIDI notes can be sent when in Music mode is on
|
|
||||||
*/
|
|
||||||
//#define MIDI_BASIC
|
|
||||||
|
|
||||||
/* enable advanced MIDI features:
|
|
||||||
- MIDI notes can be added to the keymap
|
|
||||||
- Octave shift and transpose
|
|
||||||
- Virtual sustain, portamento, and modulation wheel
|
|
||||||
- etc.
|
|
||||||
*/
|
|
||||||
//#define MIDI_ADVANCED
|
|
||||||
|
|
||||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
|
||||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
|
||||||
|
|
||||||
/* Bootmagic Lite key configuration */
|
|
||||||
// #define BOOTMAGIC_LITE_ROW 0
|
|
||||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
/* Copyright 2019 Chip
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
#include "dumbpad.h"
|
|
||||||
|
|
||||||
void keyboard_pre_init_kb(void) {
|
|
||||||
// Set the layer LED IO as outputs
|
|
||||||
setPinOutput(LAYER_INDICATOR_LED_0);
|
|
||||||
setPinOutput(LAYER_INDICATOR_LED_1);
|
|
||||||
|
|
||||||
keyboard_pre_init_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
void shutdown_user() {
|
|
||||||
// Shutdown the layer LEDs
|
|
||||||
writePinLow(LAYER_INDICATOR_LED_0);
|
|
||||||
writePinLow(LAYER_INDICATOR_LED_1);
|
|
||||||
}
|
|
||||||
|
|
||||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
|
||||||
// Layer LEDs act as binary indication of current layer
|
|
||||||
uint8_t layer = biton32(state);
|
|
||||||
writePin(LAYER_INDICATOR_LED_0, layer & 0b1);
|
|
||||||
writePin(LAYER_INDICATOR_LED_1, (layer >> 1) & 0b1);
|
|
||||||
return layer_state_set_user(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Optional override functions below.
|
|
||||||
// You can leave any or all of these undefined.
|
|
||||||
// These are only required if you want to perform custom actions.
|
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
|
||||||
// put your keyboard start-up code here
|
|
||||||
// runs once when the firmware starts up
|
|
||||||
for (int i = 0; i < 2; i++) {
|
|
||||||
writePin(LAYER_INDICATOR_LED_0, true);
|
|
||||||
writePin(LAYER_INDICATOR_LED_1, false);
|
|
||||||
wait_ms(100);
|
|
||||||
writePin(LAYER_INDICATOR_LED_0, true);
|
|
||||||
writePin(LAYER_INDICATOR_LED_1, true);
|
|
||||||
wait_ms(100);
|
|
||||||
writePin(LAYER_INDICATOR_LED_0, false);
|
|
||||||
writePin(LAYER_INDICATOR_LED_1, true);
|
|
||||||
wait_ms(100);
|
|
||||||
writePin(LAYER_INDICATOR_LED_0, false);
|
|
||||||
writePin(LAYER_INDICATOR_LED_1, false);
|
|
||||||
wait_ms(100);
|
|
||||||
}
|
|
||||||
|
|
||||||
matrix_init_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_kb(void) {
|
|
||||||
// put your looping keyboard code here
|
|
||||||
// runs every cycle (a lot)
|
|
||||||
|
|
||||||
matrix_scan_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
// put your per-action keyboard code here
|
|
||||||
// runs for every action, just before processing by the firmware
|
|
||||||
|
|
||||||
return process_record_user(keycode, record);
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
|
||||||
|
|
||||||
led_set_user(usb_led);
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
{
|
|
||||||
"keyboard_name": "dumbpad",
|
|
||||||
"url": "",
|
|
||||||
"maintainer": "qmk",
|
|
||||||
"width": 5,
|
|
||||||
"height": 4,
|
|
||||||
"layouts": {
|
|
||||||
"LAYOUT": {
|
|
||||||
"layout": [
|
|
||||||
{"label":"7", "x":1, "y":0},
|
|
||||||
{"label":"8", "x":2, "y":0},
|
|
||||||
{"label":"9", "x":3, "y":0},
|
|
||||||
{"label":"BSPC", "x":4, "y":0},
|
|
||||||
{"label":"4", "x":1, "y":1},
|
|
||||||
{"label":"5", "x":2, "y":1},
|
|
||||||
{"label":"6", "x":3, "y":1},
|
|
||||||
{"label":"ESC", "x":4, "y":1},
|
|
||||||
{"label":"1", "x":1, "y":2},
|
|
||||||
{"label":"2", "x":2, "y":2},
|
|
||||||
{"label":"3", "x":3, "y":2},
|
|
||||||
{"label":"TAB", "x":4, "y":2},
|
|
||||||
{"label":"LMOUSE", "x":0, "y":3},
|
|
||||||
{"label":"TT(2)", "x":1, "y":3},
|
|
||||||
{"label":"0", "x":2, "y":3},
|
|
||||||
{"label":".", "x":3, "y":3},
|
|
||||||
{"label":"ENT", "x":4, "y":3}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#define TAPPING_TOGGLE 2
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
/* Copyright 2019 imchipwood
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
#include QMK_KEYBOARD_H
|
|
||||||
|
|
||||||
#define _BASE 0
|
|
||||||
#define _SUB 1
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
/*
|
|
||||||
BASE LAYER
|
|
||||||
/-----------------------------------------------------`
|
|
||||||
| | 7 | 8 | 9 | Bkspc |
|
|
||||||
| |---------|---------|---------|---------|
|
|
||||||
| | 4 | 5 | 6 | Esc |
|
|
||||||
| |---------|---------|---------|---------|
|
|
||||||
| | 1 | 2 | 3 | Tab |
|
|
||||||
|-------------|---------|---------|---------|---------|
|
|
||||||
| Left mouse | TT(SUB) | 0 | . | Enter |
|
|
||||||
\-----------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_BASE] = LAYOUT(
|
|
||||||
KC_7, KC_8, KC_9, KC_BSPC,
|
|
||||||
KC_4, KC_5, KC_6, KC_ESC,
|
|
||||||
KC_1, KC_2, KC_3, KC_TAB,
|
|
||||||
KC_BTN1, TT(_SUB), KC_0, KC_DOT, KC_ENTER
|
|
||||||
),
|
|
||||||
/*
|
|
||||||
SUB LAYER
|
|
||||||
/-----------------------------------------------------`
|
|
||||||
| | | | | Reset |
|
|
||||||
| |---------|---------|---------|---------|
|
|
||||||
| | | | | + |
|
|
||||||
| |---------|---------|---------|---------|
|
|
||||||
| | | | | - |
|
|
||||||
|-------------|---------|---------|---------|---------|
|
|
||||||
| LOCK | | | | = |
|
|
||||||
\-----------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_SUB] = LAYOUT(
|
|
||||||
_______, _______, _______, RESET,
|
|
||||||
_______, _______, _______, KC_KP_PLUS,
|
|
||||||
_______, _______, _______, KC_KP_MINUS,
|
|
||||||
KC_LOCK, _______, _______, _______, KC_EQL
|
|
||||||
),
|
|
||||||
};
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
// If console is enabled, it will print the matrix position and status of each key pressed
|
|
||||||
/*
|
|
||||||
#ifdef CONSOLE_ENABLE
|
|
||||||
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
|
||||||
// Customise these values to desired behaviour
|
|
||||||
//debug_enable = true;
|
|
||||||
//debug_matrix = true;
|
|
||||||
//debug_keyboard = true;
|
|
||||||
//debug_mouse = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
|
||||||
/* Custom encoder control - handles CW/CCW turning of encoder
|
|
||||||
* Default behavior:
|
|
||||||
* main layer:
|
|
||||||
* CW: move mouse right
|
|
||||||
* CCW: move mouse left
|
|
||||||
* other layers:
|
|
||||||
* CW: = (equals/plus - increase slider in Adobe products)
|
|
||||||
* CCW: - (minus/underscore - decrease slider in adobe products)
|
|
||||||
*/
|
|
||||||
if (index == 0) {
|
|
||||||
switch (biton32(layer_state)) {
|
|
||||||
case _BASE:
|
|
||||||
// main layer - move mouse right (CW) and left (CCW)
|
|
||||||
if (clockwise) {
|
|
||||||
tap_code(KC_MS_R);
|
|
||||||
} else {
|
|
||||||
tap_code(KC_MS_L);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW)
|
|
||||||
if (clockwise) {
|
|
||||||
tap_code(KC_EQL);
|
|
||||||
} else {
|
|
||||||
tap_code(KC_MINS);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#define TAPPING_TOGGLE 2
|
|
||||||
@@ -1,163 +0,0 @@
|
|||||||
/* Copyright 2019 imchipwood
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
#include QMK_KEYBOARD_H
|
|
||||||
|
|
||||||
#define _BASE 0
|
|
||||||
#define _SUB 1
|
|
||||||
#define _DBG 2
|
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
/*
|
|
||||||
BASE LAYER
|
|
||||||
/-----------------------------------------------------`
|
|
||||||
| | 7 | 8 | 9 | Bkspc |
|
|
||||||
| |---------|---------|---------|---------|
|
|
||||||
| | 4 | 5 | 6 | + |
|
|
||||||
| |---------|---------|---------|---------|
|
|
||||||
| | 1 | 2 | 3 | * |
|
|
||||||
|-------------|---------|---------|---------|---------|
|
|
||||||
| Play/Pause | TT(SUB) | 0 | . | Enter |
|
|
||||||
\-----------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_BASE] = LAYOUT(
|
|
||||||
KC_P7, KC_P8, KC_P9, KC_BSPC,
|
|
||||||
KC_P4, KC_P5, KC_P6, KC_KP_PLUS,
|
|
||||||
KC_P1, KC_P2, KC_P3, KC_KP_ASTERISK,
|
|
||||||
KC_MPLY, TT(_SUB), KC_P0, KC_PDOT, KC_KP_ENTER
|
|
||||||
),
|
|
||||||
/*
|
|
||||||
SUB LAYER
|
|
||||||
/-----------------------------------------------------`
|
|
||||||
| | | | | Numlock |
|
|
||||||
| |---------|---------|---------|---------|
|
|
||||||
| | | | | - |
|
|
||||||
| |---------|---------|---------|---------|
|
|
||||||
| | | | | / |
|
|
||||||
|-------------|---------|---------|---------|---------|
|
|
||||||
| MO(_DBG) | | | | = |
|
|
||||||
\-----------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_SUB] = LAYOUT(
|
|
||||||
_______, _______, _______, KC_NLCK,
|
|
||||||
_______, _______, _______, KC_KP_MINUS,
|
|
||||||
_______, _______, _______, KC_KP_SLASH,
|
|
||||||
MO(_DBG), _______, _______, _______, KC_KP_EQUAL
|
|
||||||
),
|
|
||||||
/*
|
|
||||||
DEBUG LAYER
|
|
||||||
/-----------------------------------------------------`
|
|
||||||
| | | | | Reset |
|
|
||||||
| |---------|---------|---------|---------|
|
|
||||||
| | | | | |
|
|
||||||
| |---------|---------|---------|---------|
|
|
||||||
| | | | | |
|
|
||||||
|-------------|---------|---------|---------|---------|
|
|
||||||
| | | | | |
|
|
||||||
\-----------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_DBG] = LAYOUT(
|
|
||||||
_______, _______, _______, RESET,
|
|
||||||
_______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______
|
|
||||||
),
|
|
||||||
};
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
// If console is enabled, it will print the matrix position and status of each key pressed
|
|
||||||
/*
|
|
||||||
#ifdef CONSOLE_ENABLE
|
|
||||||
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
|
||||||
// Customise these values to desired behaviour
|
|
||||||
//debug_enable = true;
|
|
||||||
//debug_matrix = true;
|
|
||||||
//debug_keyboard = true;
|
|
||||||
//debug_mouse = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
|
||||||
/* Custom encoder control - handles CW/CCW turning of encoder
|
|
||||||
* Cusotom behavior:
|
|
||||||
* main layer:
|
|
||||||
* CW: volume up
|
|
||||||
* CCW: volume down
|
|
||||||
* sub layer:
|
|
||||||
* CW: next media track
|
|
||||||
* CCW: prev media track
|
|
||||||
* debug layer:
|
|
||||||
* CW: brightness up
|
|
||||||
* CCW: brightness down
|
|
||||||
*/
|
|
||||||
if (index == 0) {
|
|
||||||
switch (biton32(layer_state)) {
|
|
||||||
case _BASE:
|
|
||||||
// main layer - volume up (CW) and down (CCW)
|
|
||||||
if (clockwise) {
|
|
||||||
tap_code(KC_VOLU);
|
|
||||||
} else {
|
|
||||||
tap_code(KC_VOLD);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case _SUB:
|
|
||||||
// sub layer - next track (CW) and previous track (CCW)
|
|
||||||
if (clockwise) {
|
|
||||||
tap_code(KC_MNXT);
|
|
||||||
} else {
|
|
||||||
tap_code(KC_MPRV);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case _DBG:
|
|
||||||
// debug layer - brightness up (CW) and brightness down (CCW)
|
|
||||||
if (clockwise) {
|
|
||||||
tap_code(KC_BRIU);
|
|
||||||
} else {
|
|
||||||
tap_code(KC_BRID);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// any other layer (shouldn't exist..) - volume up (CW) and down (CCW)
|
|
||||||
if (clockwise) {
|
|
||||||
tap_code(KC_VOLU);
|
|
||||||
} else {
|
|
||||||
tap_code(KC_VOLD);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+17
-13
@@ -1,19 +1,23 @@
|
|||||||
# dumbpad
|
# dumbpad
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
A 4x4 macro/numpad with rotary encoder.
|
dumbpad is a num/macro pad available in two major form factors - single- and dual-rotary encoder.
|
||||||
|
|
||||||
Keyboard Maintainer: [imchipwood](https://github.com/imchipwood)
|
* Single-encoder PCBs are reversible - components can be soldered to either side to allow
|
||||||
|
the encoder to be on either the left or right side.
|
||||||
|
* Dual-encoder PCBs come in two versions - one with the encoders in the bottom corners, the otherin the top corners
|
||||||
|
|
||||||
PCB repository: https://github.com/imchipwood/dumbpad
|
Support for dumbpad all PCB revisions can be found in this directory.
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
* Maintainer: [imchipwood](https://github.com/imchipwood)
|
||||||
|
* PCB repository: [dumbpad on github](https://github.com/imchipwood/dumbpad)
|
||||||
make dumbpad:default
|
* PCB revisions:
|
||||||
|
* v0.x - these revisions have two LEDs for layer indication
|
||||||
Program with:
|
* ['v0x'](v0x/): Default setup for single rotary encoder v0.x PCBs
|
||||||
|
* ['v0x_right'](v0x_right/): Same as v0x but with rotary encoder on right side (components on bottom of PCB)
|
||||||
make dumbpad:default:avrdude
|
* ['v0x_dualencoder'](v0x_dualencoder/): Dual-encoder PCBs
|
||||||
|
* v1.x - these revisions have three LEDs - two for layer indication, one for numlock indication
|
||||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
* ['v1x'](v1x/): Default setup for v1.x PCBs with a single rotary encoder on the left side
|
||||||
|
* ['v1x_right'](v1x_right/): Same as v1x but with rotary encoder on right side (components on bottom of PCB)
|
||||||
|
* ['v1x_dualencoder'](v1x_dualencoder/): v1x PCB with two rotary encoders
|
||||||
@@ -1,35 +1 @@
|
|||||||
# MCU name
|
DEFAULT_FOLDER = dumbpad/v0x
|
||||||
MCU = atmega32u4
|
|
||||||
|
|
||||||
# Bootloader selection
|
|
||||||
# Teensy halfkay
|
|
||||||
# Pro Micro caterina
|
|
||||||
# Atmel DFU atmel-dfu
|
|
||||||
# LUFA DFU lufa-dfu
|
|
||||||
# QMK DFU qmk-dfu
|
|
||||||
# ATmega32A bootloadHID
|
|
||||||
# ATmega328P USBasp
|
|
||||||
BOOTLOADER = caterina
|
|
||||||
|
|
||||||
# Build Options
|
|
||||||
# change yes to no to disable
|
|
||||||
#
|
|
||||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
|
||||||
CONSOLE_ENABLE = yes # Console for debug
|
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|
||||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
|
||||||
NKRO_ENABLE = no # USB Nkey Rollover
|
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
|
||||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
|
||||||
MIDI_ENABLE = no # MIDI support
|
|
||||||
UNICODE_ENABLE = no # Unicode
|
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
|
||||||
|
|
||||||
ENCODER_ENABLE = yes
|
|
||||||
MOUSEKEY_ENABLE = yes
|
|
||||||
KEY_LOCK_ENABLE = yes
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 imchipwood
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define DEVICE_VER 0x0007
|
||||||
|
|
||||||
|
/* Column/Row IO definitions */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 5
|
||||||
|
#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
|
||||||
|
#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* Single rotary encoder */
|
||||||
|
#define ENCODERS_PAD_A { D0 }
|
||||||
|
#define ENCODERS_PAD_B { D4 }
|
||||||
|
|
||||||
|
/* Onboard LEDs */
|
||||||
|
#define LED_00 B3
|
||||||
|
#define LED_01 B1
|
||||||
|
|
||||||
|
/* Bootmagic - hold down rotary encoder pushbutton while plugging in to enter bootloader */
|
||||||
|
#define BOOTMAGIC_LITE_ROW 3
|
||||||
|
#define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "dumbpad/v0x",
|
||||||
|
"keyboard_folder": "dumbpad/v0x",
|
||||||
|
"url": "https://www.github.com/imchipwood/dumbpad",
|
||||||
|
"maintainer": "imchipwood",
|
||||||
|
"width": 5,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0},
|
||||||
|
{"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1},
|
||||||
|
{"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2},
|
||||||
|
{"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
BASE LAYER
|
||||||
|
/-----------------------------------------------------`
|
||||||
|
| | 7 | 8 | 9 | Bkspc |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | 4 | 5 | 6 | Esc |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | 1 | 2 | 3 | Tab |
|
||||||
|
|-------------|---------|---------|---------|---------|
|
||||||
|
| Left mouse | TT(1) | 0 | . | Enter |
|
||||||
|
\-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_7, KC_8, KC_9, KC_BSPC,
|
||||||
|
KC_4, KC_5, KC_6, KC_ESC,
|
||||||
|
KC_1, KC_2, KC_3, KC_TAB,
|
||||||
|
KC_BTN1, TT(1), KC_0, LSFT_T(KC_DOT), KC_ENTER
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
SUB LAYER
|
||||||
|
/-----------------------------------------------------`
|
||||||
|
| | | | | Reset |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | | | | + |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | | | | - |
|
||||||
|
|-------------|---------|---------|---------|---------|
|
||||||
|
| LOCK | | | | = |
|
||||||
|
\-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT(
|
||||||
|
_______, _______, _______, RESET,
|
||||||
|
_______, _______, _______, KC_KP_PLUS,
|
||||||
|
_______, _______, _______, KC_KP_MINUS,
|
||||||
|
KC_LOCK, _______, _______, _______, KC_EQL
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||||
|
/*
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Customise these values to desired behaviour
|
||||||
|
//debug_enable = true;
|
||||||
|
//debug_matrix = true;
|
||||||
|
//debug_keyboard = true;
|
||||||
|
//debug_mouse = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
/* Custom encoder control - handles CW/CCW turning of encoder
|
||||||
|
* Default behavior:
|
||||||
|
* main layer:
|
||||||
|
* CW: move mouse right
|
||||||
|
* CCW: move mouse left
|
||||||
|
* other layers:
|
||||||
|
* CW: = (equals/plus - increase slider in Adobe products)
|
||||||
|
* CCW: - (minus/underscore - decrease slider in adobe products)
|
||||||
|
*/
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
// main layer - move mouse right (CW) and left (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# dumbpad v0.x
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 4x4 numpad/macropad with a rotary encoder to the left of the bottom row of keys.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [imchipwood](https://github.com/imchipwood)
|
||||||
|
* Hardware repository: [dumbpad on github](https://github.com/imchipwood/dumbpad)
|
||||||
|
* PCB Revisions Supported: v0.2, v0.6, v0.7
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make dumbpad/v0x:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
KEY_LOCK_ENABLE = yes
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
|
||||||
|
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "v0x.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
// Set LED IO as outputs
|
||||||
|
setPinOutput(LED_00);
|
||||||
|
setPinOutput(LED_01);
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user() {
|
||||||
|
// Shutdown LEDs
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||||
|
// Layer LEDs act as binary indication of current layer
|
||||||
|
uint8_t layer = get_highest_layer(state);
|
||||||
|
writePin(LED_00, layer & 0b1);
|
||||||
|
writePin(LED_01, (layer >> 1) & 0b1);
|
||||||
|
return layer_state_set_user(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Optional override functions below.
|
||||||
|
// You can leave any or all of these undefined.
|
||||||
|
// These are only required if you want to perform custom actions.
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
uint8_t led_delay_ms = 80;
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
writePinHigh(LED_00);
|
||||||
|
writePinHigh(LED_01);
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
if (i < 1) {
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2019 Chip
|
/* Copyright 2020 imchipwood
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,22 +14,13 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
/* This a shortcut to help you visually see your layout.
|
|
||||||
*
|
|
||||||
* The first section contains all of the arguments representing the physical
|
|
||||||
* layout of the board and position of the keys.
|
|
||||||
*
|
|
||||||
* The second converts the arguments into a two-dimensional array which
|
|
||||||
* represents the switch matrix.
|
|
||||||
*/
|
|
||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
k01, k02, k03, k04, \
|
k01, k02, k03, k04, \
|
||||||
k11, k12, k13, k14, \
|
k11, k12, k13, k14, \
|
||||||
k21, k22, k23, k24, \
|
k21, k22, k23, k24, \
|
||||||
k30, k31, k32, k33, k34 \
|
k30, k31, k32, k33, k34 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ KC_NO, k01, k02, k03, k04 }, \
|
{ KC_NO, k01, k02, k03, k04 }, \
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 imchipwood
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define DEVICE_VER 0x0006
|
||||||
|
|
||||||
|
/* Column/Row IO definitions - dualencoder version is true 4x4 */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 4
|
||||||
|
#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
|
||||||
|
#define MATRIX_COL_PINS { D7, E6, B4, B5 }
|
||||||
|
|
||||||
|
/* Dual rotary encoders */
|
||||||
|
#define ENCODERS_PAD_A { C6, D0 }
|
||||||
|
#define ENCODERS_PAD_B { D4, D1 }
|
||||||
|
|
||||||
|
/* Onboard LEDs */
|
||||||
|
#define LED_00 B3
|
||||||
|
#define LED_01 B1
|
||||||
|
|
||||||
|
/* Bootmagic - hold down rotary encoder pushbutton while plugging in to enter bootloader */
|
||||||
|
#define BOOTMAGIC_LITE_ROW 3
|
||||||
|
#define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "dumbpad/v0x_dualencoder",
|
||||||
|
"keyboard_folder": "dumbpad/v0x_dualencoder",
|
||||||
|
"url": "https://www.github.com/imchipwood/dumbpad",
|
||||||
|
"maintainer": "imchipwood",
|
||||||
|
"width": 4,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"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}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
BASE LAYER
|
||||||
|
/---------------------------------------`
|
||||||
|
| 7 | 8 | 9 | Bkspc |
|
||||||
|
|---------|---------|---------|---------|
|
||||||
|
| 4 | 5 | 6 | Esc |
|
||||||
|
|---------|---------|---------|---------|
|
||||||
|
| 1 | 2 | 3 | Tab |
|
||||||
|
|---------|---------|---------|---------|
|
||||||
|
| TT(1) | 0 | . | Enter |
|
||||||
|
\---------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_7, KC_8, KC_9, KC_BSPC,
|
||||||
|
KC_4, KC_5, KC_6, KC_ESC,
|
||||||
|
KC_1, KC_2, KC_3, KC_TAB,
|
||||||
|
TT(1), KC_0, KC_DOT, KC_ENTER
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
SUB LAYER
|
||||||
|
/---------------------------------------`
|
||||||
|
| | | | Reset |
|
||||||
|
|---------|---------|---------|---------|
|
||||||
|
| | | | + |
|
||||||
|
|---------|---------|---------|---------|
|
||||||
|
| | | | - |
|
||||||
|
|---------|---------|---------|---------|
|
||||||
|
| | | | = |
|
||||||
|
\---------------------------------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT(
|
||||||
|
_______, _______, _______, RESET,
|
||||||
|
_______, _______, _______, KC_KP_PLUS,
|
||||||
|
_______, _______, _______, KC_KP_MINUS,
|
||||||
|
_______, _______, _______, KC_EQL
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||||
|
/*
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Customise these values to desired behaviour
|
||||||
|
// debug_enable = true;
|
||||||
|
// debug_matrix = true;
|
||||||
|
// debug_keyboard = true;
|
||||||
|
// debug_mouse = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
/* Custom encoder control - handles CW/CCW turning of encoder
|
||||||
|
* Default behavior:
|
||||||
|
* left encoder:
|
||||||
|
* main layer:
|
||||||
|
* CW: move mouse right
|
||||||
|
* CCW: move mouse left
|
||||||
|
* other layers:
|
||||||
|
* CW: = (equals/plus - increase slider in Adobe products)
|
||||||
|
* CCW: - (minus/underscore - decrease slider in adobe products)
|
||||||
|
* right encoder:
|
||||||
|
* main layer:
|
||||||
|
* CW: colume up
|
||||||
|
* CCW: volume down
|
||||||
|
* other layers:
|
||||||
|
* CW: right arrow
|
||||||
|
* CCW: left arrow
|
||||||
|
*/
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
// main layer - move mouse right (CW) and left (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (index == 1) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
// main layer - volume up (CW) and down (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// other layers - right (CW) and left (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_RIGHT);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_LEFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# dumbpad v0.x dual-encoder
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 4x4 numpad/macropad with two rotary encoders
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [imchipwood](https://github.com/imchipwood)
|
||||||
|
* Hardware repository: [dumbpad on github](https://github.com/imchipwood/dumbpad)
|
||||||
|
* PCB Revisions Supported: v0.6_dualencoder, v0.6_dualencoder_top
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make dumbpad/v0x_dualencoder:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
KEY_LOCK_ENABLE = yes
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
|
||||||
|
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (index == 1) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_RIGHT);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_LEFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "v0x_dualencoder.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
// Set LED IO as outputs
|
||||||
|
setPinOutput(LED_00);
|
||||||
|
setPinOutput(LED_01);
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user() {
|
||||||
|
// Shutdown LEDs
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||||
|
// Layer LEDs act as binary indication of current layer
|
||||||
|
uint8_t layer = get_highest_layer(state);
|
||||||
|
writePin(LED_00, layer & 0b1);
|
||||||
|
writePin(LED_01, (layer >> 1) & 0b1);
|
||||||
|
return layer_state_set_user(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Optional override functions below.
|
||||||
|
// You can leave any or all of these undefined.
|
||||||
|
// These are only required if you want to perform custom actions.
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
uint8_t led_delay_ms = 80;
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
writePinHigh(LED_00);
|
||||||
|
writePinHigh(LED_01);
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
if (i < 1) {
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, \
|
||||||
|
k10, k11, k12, k13, \
|
||||||
|
k20, k21, k22, k23, \
|
||||||
|
k30, k31, k32, k33 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03 }, \
|
||||||
|
{ k10, k11, k12, k13 }, \
|
||||||
|
{ k20, k21, k22, k23 }, \
|
||||||
|
{ k30, k31, k32, k33 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 imchipwood
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define DEVICE_VER 0x0007
|
||||||
|
|
||||||
|
/* Column/Row IO definitions */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 5
|
||||||
|
#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
|
||||||
|
#define MATRIX_COL_PINS { B5, B4, E6, D7, C6 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* Single rotary encoder */
|
||||||
|
#define ENCODERS_PAD_A { D4 }
|
||||||
|
#define ENCODERS_PAD_B { D0 }
|
||||||
|
|
||||||
|
/* Onboard LEDs */
|
||||||
|
#define LED_00 B1
|
||||||
|
#define LED_01 B3
|
||||||
|
|
||||||
|
/* Bootmagic - hold down rotary encoder pushbutton while plugging in to enter bootloader */
|
||||||
|
#define BOOTMAGIC_LITE_ROW 3
|
||||||
|
#define BOOTMAGIC_LITE_COLUMN 4
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "dumbpad/v0x_right",
|
||||||
|
"keyboard_folder": "dumbpad/v0x_right",
|
||||||
|
"url": "https://www.github.com/imchipwood/dumbpad",
|
||||||
|
"maintainer": "imchipwood",
|
||||||
|
"width": 5,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"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":4, "y":3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
BASE LAYER
|
||||||
|
/-----------------------------------------------------`
|
||||||
|
| 7 | 8 | 9 | Bkspc | |
|
||||||
|
|---------|---------|---------|---------| |
|
||||||
|
| 4 | 5 | 6 | Esc | |
|
||||||
|
|---------|---------|---------|---------| |
|
||||||
|
| 1 | 2 | 3 | Tab | |
|
||||||
|
|---------|---------|---------|---------|-------------|
|
||||||
|
| TT(1) | 0 | . | Enter | Left mouse |
|
||||||
|
\-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_7, KC_8, KC_9, KC_BSPC,
|
||||||
|
KC_4, KC_5, KC_6, KC_ESC,
|
||||||
|
KC_1, KC_2, KC_3, KC_TAB,
|
||||||
|
TT(1), KC_0, LSFT_T(KC_DOT), KC_ENTER, KC_BTN1
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
SUB LAYER
|
||||||
|
/-----------------------------------------------------`
|
||||||
|
| | | | Reset | |
|
||||||
|
|---------|---------|---------|---------| |
|
||||||
|
| | | | + | |
|
||||||
|
|---------|---------|---------|---------| |
|
||||||
|
| | | | - | |
|
||||||
|
|---------|---------|---------|---------|-------------|
|
||||||
|
| | | | = | LOCK |
|
||||||
|
\-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT(
|
||||||
|
_______, _______, _______, RESET,
|
||||||
|
_______, _______, _______, KC_KP_PLUS,
|
||||||
|
_______, _______, _______, KC_KP_MINUS,
|
||||||
|
_______, _______, _______, KC_EQL, KC_LOCK
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||||
|
/*
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Customise these values to desired behaviour
|
||||||
|
// debug_enable = true;
|
||||||
|
// debug_matrix = true;
|
||||||
|
// debug_keyboard = true;
|
||||||
|
// debug_mouse = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
/* Custom encoder control - handles CW/CCW turning of encoder
|
||||||
|
* Default behavior:
|
||||||
|
* main layer:
|
||||||
|
* CW: move mouse right
|
||||||
|
* CCW: move mouse left
|
||||||
|
* other layers:
|
||||||
|
* CW: = (equals/plus - increase slider in Adobe products)
|
||||||
|
* CCW: - (minus/underscore - decrease slider in adobe products)
|
||||||
|
*/
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
// main layer - move mouse right (CW) and left (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# dumbpad v0.x with encoder on right side
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 4x4 numpad/macropad with a rotary encoder to the right of the bottom row of keys.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [imchipwood](https://github.com/imchipwood)
|
||||||
|
* Hardware repository: [dumbpad on github](https://github.com/imchipwood/dumbpad)
|
||||||
|
* PCB Revisions Supported: v0.6, v0.7
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make dumbpad/v0x_right:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
KEY_LOCK_ENABLE = yes
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
|
||||||
|
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "v0x_right.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
// Set LED IO as outputs
|
||||||
|
setPinOutput(LED_00);
|
||||||
|
setPinOutput(LED_01);
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user() {
|
||||||
|
// Shutdown LEDs
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||||
|
// Layer LEDs act as binary indication of current layer
|
||||||
|
uint8_t layer = get_highest_layer(state);
|
||||||
|
writePin(LED_00, layer & 0b1);
|
||||||
|
writePin(LED_01, (layer >> 1) & 0b1);
|
||||||
|
return layer_state_set_user(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Optional override functions below.
|
||||||
|
// You can leave any or all of these undefined.
|
||||||
|
// These are only required if you want to perform custom actions.
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
uint8_t led_delay_ms = 80;
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
writePinHigh(LED_00);
|
||||||
|
writePinHigh(LED_01);
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
if (i < 1) {
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, \
|
||||||
|
k10, k11, k12, k13, \
|
||||||
|
k20, k21, k22, k23, \
|
||||||
|
k30, k31, k32, k33, k34 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, KC_NO }, \
|
||||||
|
{ k10, k11, k12, k13, KC_NO }, \
|
||||||
|
{ k20, k21, k22, k23, KC_NO }, \
|
||||||
|
{ k30, k31, k32, k33, k34 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 imchipwood
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define DEVICE_VER 0x0010
|
||||||
|
|
||||||
|
/* Column/Row IO definitions */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 5
|
||||||
|
#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
|
||||||
|
#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* Single rotary encoder */
|
||||||
|
#define ENCODERS_PAD_A { B2 }
|
||||||
|
#define ENCODERS_PAD_B { D4 }
|
||||||
|
|
||||||
|
/* Onboard LEDs */
|
||||||
|
#define LED_00 B6
|
||||||
|
#define LED_01 B1
|
||||||
|
#define LED_02 B3
|
||||||
|
|
||||||
|
/* Bootmagic - hold down rotary encoder pushbutton while plugging in to enter bootloader */
|
||||||
|
#define BOOTMAGIC_LITE_ROW 3
|
||||||
|
#define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "dumbpad/v1x",
|
||||||
|
"keyboard_folder": "dumbpad/v1x",
|
||||||
|
"url": "https://www.github.com/imchipwood/dumbpad",
|
||||||
|
"maintainer": "imchipwood",
|
||||||
|
"width": 5,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0},
|
||||||
|
{"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1},
|
||||||
|
{"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2},
|
||||||
|
{"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
BASE LAYER
|
||||||
|
/-----------------------------------------------------`
|
||||||
|
| | 7 | 8 | 9 | Bkspc |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | 4 | 5 | 6 | Esc |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | 1 | 2 | 3 | Tab |
|
||||||
|
|-------------|---------|---------|---------|---------|
|
||||||
|
| Left mouse | TT(1) | 0 | . | Enter |
|
||||||
|
\-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_7, KC_8, KC_9, KC_BSPC,
|
||||||
|
KC_4, KC_5, KC_6, KC_ESC,
|
||||||
|
KC_1, KC_2, KC_3, KC_TAB,
|
||||||
|
KC_BTN1, TT(1), KC_0, LSFT_T(KC_DOT), KC_ENTER
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
SUB LAYER
|
||||||
|
/-----------------------------------------------------`
|
||||||
|
| | | | | Reset |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | | | | + |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | | | | - |
|
||||||
|
|-------------|---------|---------|---------|---------|
|
||||||
|
| LOCK | | | | = |
|
||||||
|
\-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT(
|
||||||
|
_______, _______, _______, RESET,
|
||||||
|
_______, _______, _______, KC_KP_PLUS,
|
||||||
|
_______, _______, _______, KC_KP_MINUS,
|
||||||
|
KC_LOCK, _______, _______, _______, KC_EQL
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||||
|
/*
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Customise these values to desired behaviour
|
||||||
|
//debug_enable = true;
|
||||||
|
//debug_matrix = true;
|
||||||
|
//debug_keyboard = true;
|
||||||
|
//debug_mouse = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
/* Custom encoder control - handles CW/CCW turning of encoder
|
||||||
|
* Default behavior:
|
||||||
|
* main layer:
|
||||||
|
* CW: move mouse right
|
||||||
|
* CCW: move mouse left
|
||||||
|
* other layers:
|
||||||
|
* CW: = (equals/plus - increase slider in Adobe products)
|
||||||
|
* CCW: - (minus/underscore - decrease slider in adobe products)
|
||||||
|
*/
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
// main layer - move mouse right (CW) and left (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# dumbpad v1.x
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 4x4 numpad/macropad with a rotary encoder to the left of the bottom row of keys.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [imchipwood](https://github.com/imchipwood)
|
||||||
|
* Hardware repository: [dumbpad on github](https://github.com/imchipwood/dumbpad)
|
||||||
|
* PCB Revisions Supported: v1.0
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make dumbpad/v1x:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
KEY_LOCK_ENABLE = yes
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
|
||||||
|
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "v1x.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
// Set LED IO as outputs
|
||||||
|
setPinOutput(LED_00);
|
||||||
|
setPinOutput(LED_01);
|
||||||
|
setPinOutput(LED_02);
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user() {
|
||||||
|
// Shutdown LEDs
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
writePinLow(LED_02);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||||
|
// Layer LEDs act as binary indication of current layer
|
||||||
|
uint8_t layer = get_highest_layer(state);
|
||||||
|
writePin(LED_00, layer & 0b1);
|
||||||
|
writePin(LED_01, (layer >> 1) & 0b1);
|
||||||
|
return layer_state_set_user(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Optional override functions below.
|
||||||
|
// You can leave any or all of these undefined.
|
||||||
|
// These are only required if you want to perform custom actions.
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
uint8_t led_delay_ms = 80;
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
writePinHigh(LED_00);
|
||||||
|
writePinHigh(LED_01);
|
||||||
|
writePinHigh(LED_02);
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
writePinLow(LED_02);
|
||||||
|
if (i < 1) {
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
writePin(LED_02, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k01, k02, k03, k04, \
|
||||||
|
k11, k12, k13, k14, \
|
||||||
|
k21, k22, k23, k24, \
|
||||||
|
k30, k31, k32, k33, k34 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ KC_NO, k01, k02, k03, k04 }, \
|
||||||
|
{ KC_NO, k11, k12, k13, k14 }, \
|
||||||
|
{ KC_NO, k21, k22, k23, k24 }, \
|
||||||
|
{ k30, k31, k32, k33, k34 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 imchipwood
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define DEVICE_VER 0x0010
|
||||||
|
|
||||||
|
/* Column/Row IO definitions */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 5
|
||||||
|
#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
|
||||||
|
#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* Dual rotary encoders */
|
||||||
|
#define ENCODERS_PAD_A { B2, D0 }
|
||||||
|
#define ENCODERS_PAD_B { D4, D1 }
|
||||||
|
|
||||||
|
/* Onboard LEDs */
|
||||||
|
#define LED_00 B6
|
||||||
|
#define LED_01 B1
|
||||||
|
#define LED_02 B3
|
||||||
|
|
||||||
|
/* Bootmagic - hold down rotary encoder pushbutton while plugging in to enter bootloader */
|
||||||
|
#define BOOTMAGIC_LITE_ROW 3
|
||||||
|
#define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "dumbpad/v1x_dualencoder",
|
||||||
|
"keyboard_folder": "dumbpad/v1x_dualencoder",
|
||||||
|
"url": "https://www.github.com/imchipwood/dumbpad",
|
||||||
|
"maintainer": "imchipwood",
|
||||||
|
"width": 5,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0},
|
||||||
|
{"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1},
|
||||||
|
{"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2},
|
||||||
|
{"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
BASE LAYER
|
||||||
|
/-----------------------------------------------------`
|
||||||
|
| | 7 | 8 | 9 | Bkspc |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | 4 | 5 | 6 | Esc |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | 1 | 2 | 3 | Tab |
|
||||||
|
|-------------|---------|---------|---------|---------|
|
||||||
|
| Left mouse | TT(1) | 0 | . | Enter |
|
||||||
|
\-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_7, KC_8, KC_9, KC_BSPC,
|
||||||
|
KC_4, KC_5, KC_6, KC_ESC,
|
||||||
|
KC_1, KC_2, KC_3, KC_TAB,
|
||||||
|
KC_BTN1, TT(1), KC_0, LSFT_T(KC_DOT), KC_ENTER
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
SUB LAYER
|
||||||
|
/-----------------------------------------------------`
|
||||||
|
| | | | | Reset |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | | | | + |
|
||||||
|
| |---------|---------|---------|---------|
|
||||||
|
| | | | | - |
|
||||||
|
|-------------|---------|---------|---------|---------|
|
||||||
|
| LOCK | | | | = |
|
||||||
|
\-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT(
|
||||||
|
_______, _______, _______, RESET,
|
||||||
|
_______, _______, _______, KC_KP_PLUS,
|
||||||
|
_______, _______, _______, KC_KP_MINUS,
|
||||||
|
KC_LOCK, _______, _______, _______, KC_EQL
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||||
|
/*
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Customise these values to desired behaviour
|
||||||
|
// debug_enable = true;
|
||||||
|
// debug_matrix = true;
|
||||||
|
// debug_keyboard = true;
|
||||||
|
// debug_mouse = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
/* Custom encoder control - handles CW/CCW turning of encoder
|
||||||
|
* Default behavior:
|
||||||
|
* left encoder:
|
||||||
|
* main layer:
|
||||||
|
* CW: move mouse right
|
||||||
|
* CCW: move mouse left
|
||||||
|
* other layers:
|
||||||
|
* CW: = (equals/plus - increase slider in Adobe products)
|
||||||
|
* CCW: - (minus/underscore - decrease slider in adobe products)
|
||||||
|
* right encoder:
|
||||||
|
* main layer:
|
||||||
|
* CW: colume up
|
||||||
|
* CCW: volume down
|
||||||
|
* other layers:
|
||||||
|
* CW: right arrow
|
||||||
|
* CCW: left arrow
|
||||||
|
*/
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
// main layer - move mouse right (CW) and left (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (index == 1) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
// main layer - volume up (CW) and down (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// other layers - right (CW) and left (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_RIGHT);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_LEFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
# dumbpad v1.x dual-encoder
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Single- vs Dual-Encoder Support
|
||||||
|
|
||||||
|
The combined Cherry MX/encoder sockets allow single- and dual-encoder configurations.
|
||||||
|
|
||||||
|
The only rule when using two encoders is that there cannot be two encoders on the left side at once, or two on the right side.
|
||||||
|
This table shows where the encoders are in the switch grid ("X" for encoder, "s" for switch):
|
||||||
|
|
||||||
|
| C0 | C1 | C2 | C3 | C4 |
|
||||||
|
|:---:|:---:|:---:|:---:|:---:|
|
||||||
|
| |__X__| s | s |__X__|
|
||||||
|
| | s | s | s | s |
|
||||||
|
| | s | s | s | s |
|
||||||
|
|__X__|__X__| s | s |__X__|
|
||||||
|
|
||||||
|
- The three encoders in columns C0 and C1 are connected to each other
|
||||||
|
- The two encoders in column C4 are connected to each other
|
||||||
|
|
||||||
|
So, if doing dual encoders, one must be in column C4 and the other in either C0 or C1. Three or more encoders will not work.
|
||||||
|
|
||||||
|
The following sections describe the configurations that the default keymaps in QMK are designed for.
|
||||||
|
|
||||||
|
### Single-Encoder (Default Configuration)
|
||||||
|
|
||||||
|
In the default configuration, the encoder is in column 0, the bottom left corner below the Pro Micro. All other sockets are filled with switches.
|
||||||
|
|
||||||
|
| C0 | C1 | C2 | C3 | C4 |
|
||||||
|
|:---:|:---:|:---:|:---:|:---:|
|
||||||
|
| | s | s | s | s |
|
||||||
|
| | s | s | s | s |
|
||||||
|
| | s | s | s | s |
|
||||||
|
|__X__| s | s | s | s |
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Dual-Encoder Bottom
|
||||||
|
|
||||||
|
One dual-encoder configuration has encoders in the bottom two corners of the 4x4 grid, and switches in the rest of the grid. The socket in column 0 is left empty.
|
||||||
|
|
||||||
|
| C0 | C1 | C2 | C3 | C4 |
|
||||||
|
|:---:|:---:|:---:|:---:|:---:|
|
||||||
|
| | s | s | s | s |
|
||||||
|
| | s | s | s | s |
|
||||||
|
| | s | s | s | s |
|
||||||
|
| |__X__| s | s |__X__|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Dual-Encoder Top
|
||||||
|
|
||||||
|
Another dual-encoder configuration has encoders in the top two corners of the 4x4 grid, and switches in the rest of the grid. The socket in column 0 is left empty.
|
||||||
|
|
||||||
|
| C0 | C1 | C2 | C3 | C4 |
|
||||||
|
|:---:|:---:|:---:|:---:|:---:|
|
||||||
|
| |__X__| s | s |__X__|
|
||||||
|
| | s | s | s | s |
|
||||||
|
| | s | s | s | s |
|
||||||
|
| | s | s | s | s |
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### No-Encoder
|
||||||
|
|
||||||
|
You may also choose not to use any rotary encoders if you like!
|
||||||
|
|
||||||
|
### Bill Of Materials
|
||||||
|
|
||||||
|
- Cherry-style mechanical switches
|
||||||
|
- EC11 rotary encoder with pushbutton (7-pin) - one or two depending on your desired configuration
|
||||||
|
- 1n4148 diodes (thru hole) - one per switch and rotary encoder (if using clickable encoder(s))
|
||||||
|
- 1x Arduino Pro Micro or pin-compatible ATmega32u4-based MCU
|
||||||
|
- (optional) 3x 3mm LEDs
|
||||||
|
- (optional) 3x 330 ohm resistors (for limiting current in LEDs)
|
||||||
|
- (optional) 6mm SPST switch for resetting MCU
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [imchipwood](https://github.com/imchipwood)
|
||||||
|
* Hardware repository: [dumbpad on github](https://github.com/imchipwood/dumbpad)
|
||||||
|
* PCB Revisions Supported: v1.0_dual
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make dumbpad/v1x_dualencoder:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
KEY_LOCK_ENABLE = yes
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
|
||||||
|
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (index == 1) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_RIGHT);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_LEFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "v1x_dualencoder.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
// Set LED IO as outputs
|
||||||
|
setPinOutput(LED_00);
|
||||||
|
setPinOutput(LED_01);
|
||||||
|
setPinOutput(LED_02);
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user() {
|
||||||
|
// Shutdown LEDs
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
writePinLow(LED_02);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||||
|
// Layer LEDs act as binary indication of current layer
|
||||||
|
uint8_t layer = get_highest_layer(state);
|
||||||
|
writePin(LED_00, layer & 0b1);
|
||||||
|
writePin(LED_01, (layer >> 1) & 0b1);
|
||||||
|
return layer_state_set_user(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Optional override functions below.
|
||||||
|
// You can leave any or all of these undefined.
|
||||||
|
// These are only required if you want to perform custom actions.
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
uint8_t led_delay_ms = 80;
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
writePinHigh(LED_00);
|
||||||
|
writePinHigh(LED_01);
|
||||||
|
writePinHigh(LED_02);
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
writePinLow(LED_02);
|
||||||
|
if (i < 1) {
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
writePin(LED_02, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k01, k02, k03, k04, \
|
||||||
|
k11, k12, k13, k14, \
|
||||||
|
k21, k22, k23, k24, \
|
||||||
|
k30, k31, k32, k33, k34 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ KC_NO, k01, k02, k03, k04 }, \
|
||||||
|
{ KC_NO, k11, k12, k13, k14 }, \
|
||||||
|
{ KC_NO, k21, k22, k23, k24 }, \
|
||||||
|
{ k30, k31, k32, k33, k34 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 imchipwood
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define DEVICE_VER 0x0010
|
||||||
|
|
||||||
|
/* Column/Row IO definitions */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 5
|
||||||
|
#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
|
||||||
|
#define MATRIX_COL_PINS { B5, B4, E6, D7, C6 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* Single rotary encoder */
|
||||||
|
#define ENCODERS_PAD_A { D4 }
|
||||||
|
#define ENCODERS_PAD_B { B2 }
|
||||||
|
|
||||||
|
/* Onboard LEDs - reversed */
|
||||||
|
#define LED_00 B3
|
||||||
|
#define LED_01 B1
|
||||||
|
#define LED_02 B6
|
||||||
|
|
||||||
|
/* Bootmagic - hold down rotary encoder pushbutton while plugging in to enter bootloader */
|
||||||
|
#define BOOTMAGIC_LITE_ROW 3
|
||||||
|
#define BOOTMAGIC_LITE_COLUMN 4
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "dumbpad/v1x_right",
|
||||||
|
"keyboard_folder": "dumbpad/v1x_right",
|
||||||
|
"url": "https://www.github.com/imchipwood/dumbpad",
|
||||||
|
"maintainer": "imchipwood",
|
||||||
|
"width": 5,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"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":4, "y":3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
BASE LAYER
|
||||||
|
/-----------------------------------------------------`
|
||||||
|
| 7 | 8 | 9 | Bkspc | |
|
||||||
|
|---------|---------|---------|---------| |
|
||||||
|
| 4 | 5 | 6 | Esc | |
|
||||||
|
|---------|---------|---------|---------| |
|
||||||
|
| 1 | 2 | 3 | Tab | |
|
||||||
|
|---------|---------|---------|---------|-------------|
|
||||||
|
| TT(1) | 0 | . | Enter | Left mouse |
|
||||||
|
\-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_7, KC_8, KC_9, KC_BSPC,
|
||||||
|
KC_4, KC_5, KC_6, KC_ESC,
|
||||||
|
KC_1, KC_2, KC_3, KC_TAB,
|
||||||
|
TT(1), KC_0, LSFT_T(KC_DOT), KC_ENTER, KC_BTN1
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
SUB LAYER
|
||||||
|
/-----------------------------------------------------`
|
||||||
|
| | | | Reset | |
|
||||||
|
|---------|---------|---------|---------| |
|
||||||
|
| | | | + | |
|
||||||
|
|---------|---------|---------|---------| |
|
||||||
|
| | | | - | |
|
||||||
|
|---------|---------|---------|---------|-------------|
|
||||||
|
| | | | = | LOCK |
|
||||||
|
\-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT(
|
||||||
|
_______, _______, _______, RESET,
|
||||||
|
_______, _______, _______, KC_KP_PLUS,
|
||||||
|
_______, _______, _______, KC_KP_MINUS,
|
||||||
|
_______, _______, _______, KC_EQL, KC_LOCK
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||||
|
/*
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Customise these values to desired behaviour
|
||||||
|
// debug_enable = true;
|
||||||
|
// debug_matrix = true;
|
||||||
|
// debug_keyboard = true;
|
||||||
|
// debug_mouse = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
/* Custom encoder control - handles CW/CCW turning of encoder
|
||||||
|
* Default behavior:
|
||||||
|
* main layer:
|
||||||
|
* CW: move mouse right
|
||||||
|
* CCW: move mouse left
|
||||||
|
* other layers:
|
||||||
|
* CW: = (equals/plus - increase slider in Adobe products)
|
||||||
|
* CCW: - (minus/underscore - decrease slider in adobe products)
|
||||||
|
*/
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
// main layer - move mouse right (CW) and left (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW)
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# dumbpad v1.x with encoder on right side
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 4x4 numpad/macropad with a rotary encoder to the right of the bottom row of keys.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [imchipwood](https://github.com/imchipwood)
|
||||||
|
* Hardware repository: [dumbpad on github](https://github.com/imchipwood/dumbpad)
|
||||||
|
* PCB Revisions Supported: v1.0
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make dumbpad/v1x_right:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
KEY_LOCK_ENABLE = yes
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
|
||||||
|
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case 0:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_R);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_L);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_EQL);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MINS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "v1x_right.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
// Set LED IO as outputs
|
||||||
|
setPinOutput(LED_00);
|
||||||
|
setPinOutput(LED_01);
|
||||||
|
setPinOutput(LED_02);
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user() {
|
||||||
|
// Shutdown LEDs
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
writePinLow(LED_02);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||||
|
// Layer LEDs act as binary indication of current layer
|
||||||
|
uint8_t layer = get_highest_layer(state);
|
||||||
|
writePin(LED_00, layer & 0b1);
|
||||||
|
writePin(LED_01, (layer >> 1) & 0b1);
|
||||||
|
return layer_state_set_user(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Optional override functions below.
|
||||||
|
// You can leave any or all of these undefined.
|
||||||
|
// These are only required if you want to perform custom actions.
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
uint8_t led_delay_ms = 80;
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
writePinHigh(LED_00);
|
||||||
|
writePinHigh(LED_01);
|
||||||
|
writePinHigh(LED_02);
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
writePinLow(LED_00);
|
||||||
|
writePinLow(LED_01);
|
||||||
|
writePinLow(LED_02);
|
||||||
|
if (i < 1) {
|
||||||
|
wait_ms(led_delay_ms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
writePin(LED_02, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2020 imchipwood
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, \
|
||||||
|
k10, k11, k12, k13, \
|
||||||
|
k20, k21, k22, k23, \
|
||||||
|
k30, k31, k32, k33, k34 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, KC_NO }, \
|
||||||
|
{ k10, k11, k12, k13, KC_NO }, \
|
||||||
|
{ k20, k21, k22, k23, KC_NO }, \
|
||||||
|
{ k30, k31, k32, k33, k34 }, \
|
||||||
|
}
|
||||||
@@ -32,6 +32,33 @@
|
|||||||
{ k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \
|
{ k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* LAYOUT_60_ansi_arrow_split_bs_7u_spc
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
|
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
|
||||||
|
* │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||||
|
* │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤
|
||||||
|
* │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3c │3d │3e │
|
||||||
|
* ├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴──┬───┼───┼───┤
|
||||||
|
* │40 │41 │43 │46 │4b │4c │4d │4e │
|
||||||
|
* └─────┴───┴─────┴───────────────────────────┴───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
#define LAYOUT_60_ansi_arrow_split_bs_7u_spc( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
|
||||||
|
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
|
||||||
|
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3c, k3d, k3e, \
|
||||||
|
k40, k41, k43, k46, k4b, k4c, k4d, k4e \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \
|
||||||
|
{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \
|
||||||
|
{ k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
|
||||||
|
{ k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, KC_NO, k3c, k3d, k3e }, \
|
||||||
|
{ k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k4b, k4c, k4d, k4e } \
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LAYOUT_60_ansi_arrow
|
* LAYOUT_60_ansi_arrow
|
||||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
|||||||
+134
-63
@@ -80,75 +80,146 @@
|
|||||||
{"x": 14, "y": 4}
|
{"x": 14, "y": 4}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"LAYOUT_60_ansi_arrow_split_bs_7u_spc": {
|
||||||
|
"layout": [
|
||||||
|
{"x": 0, "y": 0},
|
||||||
|
{"x": 1, "y": 0},
|
||||||
|
{"x": 2, "y": 0},
|
||||||
|
{"x": 3, "y": 0},
|
||||||
|
{"x": 4, "y": 0},
|
||||||
|
{"x": 5, "y": 0},
|
||||||
|
{"x": 6, "y": 0},
|
||||||
|
{"x": 7, "y": 0},
|
||||||
|
{"x": 8, "y": 0},
|
||||||
|
{"x": 9, "y": 0},
|
||||||
|
{"x": 10, "y": 0},
|
||||||
|
{"x": 11, "y": 0},
|
||||||
|
{"x": 12, "y": 0},
|
||||||
|
{"x": 13, "y": 0},
|
||||||
|
{"x": 14, "y": 0},
|
||||||
|
|
||||||
|
{"x": 0, "y": 1, "w": 1.5},
|
||||||
|
{"x": 1.5, "y": 1},
|
||||||
|
{"x": 2.5, "y": 1},
|
||||||
|
{"x": 3.5, "y": 1},
|
||||||
|
{"x": 4.5, "y": 1},
|
||||||
|
{"x": 5.5, "y": 1},
|
||||||
|
{"x": 6.5, "y": 1},
|
||||||
|
{"x": 7.5, "y": 1},
|
||||||
|
{"x": 8.5, "y": 1},
|
||||||
|
{"x": 9.5, "y": 1},
|
||||||
|
{"x": 10.5, "y": 1},
|
||||||
|
{"x": 11.5, "y": 1},
|
||||||
|
{"x": 12.5, "y": 1},
|
||||||
|
{"x": 13.5, "y": 1, "w": 1.5},
|
||||||
|
|
||||||
|
{"x": 0, "y": 2, "w": 1.75},
|
||||||
|
{"x": 1.75, "y": 2},
|
||||||
|
{"x": 2.75, "y": 2},
|
||||||
|
{"x": 3.75, "y": 2},
|
||||||
|
{"x": 4.75, "y": 2},
|
||||||
|
{"x": 5.75, "y": 2},
|
||||||
|
{"x": 6.75, "y": 2},
|
||||||
|
{"x": 7.75, "y": 2},
|
||||||
|
{"x": 8.75, "y": 2},
|
||||||
|
{"x": 9.75, "y": 2},
|
||||||
|
{"x": 10.75, "y": 2},
|
||||||
|
{"x": 11.75, "y": 2},
|
||||||
|
{"x": 12.75, "y": 2, "w": 2.25},
|
||||||
|
|
||||||
|
{"x": 0, "y": 3, "w": 2.25},
|
||||||
|
{"x": 2.25, "y": 3},
|
||||||
|
{"x": 3.25, "y": 3},
|
||||||
|
{"x": 4.25, "y": 3},
|
||||||
|
{"x": 5.25, "y": 3},
|
||||||
|
{"x": 6.25, "y": 3},
|
||||||
|
{"x": 7.25, "y": 3},
|
||||||
|
{"x": 8.25, "y": 3},
|
||||||
|
{"x": 9.25, "y": 3},
|
||||||
|
{"x": 10.25, "y": 3},
|
||||||
|
{"x": 11.25, "y": 3, "w": 1.75},
|
||||||
|
{"x": 13, "y": 3},
|
||||||
|
{"x": 14, "y": 3},
|
||||||
|
|
||||||
|
{"x": 0, "y": 4, "w": 1.5},
|
||||||
|
{"x": 1.5, "y": 4},
|
||||||
|
{"x": 2.5, "y": 4, "w": 1.5},
|
||||||
|
{"x": 4, "y": 4, "w": 7},
|
||||||
|
{"x": 11, "y": 4},
|
||||||
|
{"x": 12, "y": 4},
|
||||||
|
{"x": 13, "y": 4},
|
||||||
|
{"x": 14, "y": 4}
|
||||||
|
]
|
||||||
|
},
|
||||||
"LAYOUT_60_ansi_arrow": {
|
"LAYOUT_60_ansi_arrow": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0},
|
{"x": 0, "y": 0},
|
||||||
{"x":1, "y":0},
|
{"x": 1, "y": 0},
|
||||||
{"x":2, "y":0},
|
{"x": 2, "y": 0},
|
||||||
{"x":3, "y":0},
|
{"x": 3, "y": 0},
|
||||||
{"x":4, "y":0},
|
{"x": 4, "y": 0},
|
||||||
{"x":5, "y":0},
|
{"x": 5, "y": 0},
|
||||||
{"x":6, "y":0},
|
{"x": 6, "y": 0},
|
||||||
{"x":7, "y":0},
|
{"x": 7, "y": 0},
|
||||||
{"x":8, "y":0},
|
{"x": 8, "y": 0},
|
||||||
{"x":9, "y":0},
|
{"x": 9, "y": 0},
|
||||||
{"x":10, "y":0},
|
{"x": 10, "y": 0},
|
||||||
{"x":11, "y":0},
|
{"x": 11, "y": 0},
|
||||||
{"x":12, "y":0},
|
{"x": 12, "y": 0},
|
||||||
{"x":13, "y":0, "w":2},
|
{"x": 13, "y": 0, "w": 2},
|
||||||
|
|
||||||
{"x":0, "y":1, "w":1.5},
|
{"x": 0, "y": 1, "w": 1.5},
|
||||||
{"x":1.5, "y":1},
|
{"x": 1.5, "y": 1},
|
||||||
{"x":2.5, "y":1},
|
{"x": 2.5, "y": 1},
|
||||||
{"x":3.5, "y":1},
|
{"x": 3.5, "y": 1},
|
||||||
{"x":4.5, "y":1},
|
{"x": 4.5, "y": 1},
|
||||||
{"x":5.5, "y":1},
|
{"x": 5.5, "y": 1},
|
||||||
{"x":6.5, "y":1},
|
{"x": 6.5, "y": 1},
|
||||||
{"x":7.5, "y":1},
|
{"x": 7.5, "y": 1},
|
||||||
{"x":8.5, "y":1},
|
{"x": 8.5, "y": 1},
|
||||||
{"x":9.5, "y":1},
|
{"x": 9.5, "y": 1},
|
||||||
{"x":10.5, "y":1},
|
{"x": 10.5, "y": 1},
|
||||||
{"x":11.5, "y":1},
|
{"x": 11.5, "y": 1},
|
||||||
{"x":12.5, "y":1},
|
{"x": 12.5, "y": 1},
|
||||||
{"x":13.5, "y":1, "w":1.5},
|
{"x": 13.5, "y": 1, "w": 1.5},
|
||||||
|
|
||||||
{"x":0, "y":2, "w":1.75},
|
{"x": 0, "y": 2, "w": 1.75},
|
||||||
{"x":1.75, "y":2},
|
{"x": 1.75, "y": 2},
|
||||||
{"x":2.75, "y":2},
|
{"x": 2.75, "y": 2},
|
||||||
{"x":3.75, "y":2},
|
{"x": 3.75, "y": 2},
|
||||||
{"x":4.75, "y":2},
|
{"x": 4.75, "y": 2},
|
||||||
{"x":5.75, "y":2},
|
{"x": 5.75, "y": 2},
|
||||||
{"x":6.75, "y":2},
|
{"x": 6.75, "y": 2},
|
||||||
{"x":7.75, "y":2},
|
{"x": 7.75, "y": 2},
|
||||||
{"x":8.75, "y":2},
|
{"x": 8.75, "y": 2},
|
||||||
{"x":9.75, "y":2},
|
{"x": 9.75, "y": 2},
|
||||||
{"x":10.75, "y":2},
|
{"x": 10.75, "y": 2},
|
||||||
{"x":11.75, "y":2},
|
{"x": 11.75, "y": 2},
|
||||||
{"x":12.75, "y":2, "w":2.25},
|
{"x": 12.75, "y": 2, "w": 2.25},
|
||||||
|
|
||||||
{"x":0, "y":3, "w":2.25},
|
{"x": 0, "y": 3, "w": 2.25},
|
||||||
{"x":2.25, "y":3},
|
{"x": 2.25, "y": 3},
|
||||||
{"x":3.25, "y":3},
|
{"x": 3.25, "y": 3},
|
||||||
{"x":4.25, "y":3},
|
{"x": 4.25, "y": 3},
|
||||||
{"x":5.25, "y":3},
|
{"x": 5.25, "y": 3},
|
||||||
{"x":6.25, "y":3},
|
{"x": 6.25, "y": 3},
|
||||||
{"x":7.25, "y":3},
|
{"x": 7.25, "y": 3},
|
||||||
{"x":8.25, "y":3},
|
{"x": 8.25, "y": 3},
|
||||||
{"x":9.25, "y":3},
|
{"x": 9.25, "y": 3},
|
||||||
{"x":10.25, "y":3},
|
{"x": 10.25, "y": 3},
|
||||||
{"x":11.25, "y":3, "w":1.75},
|
{"x": 11.25, "y": 3, "w": 1.75},
|
||||||
{"x":13, "y":3},
|
{"x": 13, "y": 3},
|
||||||
{"x":14, "y":3},
|
{"x": 14, "y": 3},
|
||||||
|
|
||||||
{"x":0, "y":4, "w":1.25},
|
{"x": 0, "y": 4, "w": 1.25},
|
||||||
{"x":1.25, "y":4, "w":1.25},
|
{"x": 1.25, "y": 4, "w": 1.25},
|
||||||
{"x":2.5, "y":4, "w":1.25},
|
{"x": 2.5, "y": 4, "w": 1.25},
|
||||||
{"x":3.75, "y":4, "w":6.25},
|
{"x": 3.75, "y": 4, "w": 6.25},
|
||||||
{"x":10, "y":4},
|
{"x": 10, "y": 4},
|
||||||
{"x":11, "y":4},
|
{"x": 11, "y": 4},
|
||||||
{"x":12, "y":4},
|
{"x": 12, "y": 4},
|
||||||
{"x":13, "y":4},
|
{"x": 13, "y": 4},
|
||||||
{"x":14, "y":4}
|
{"x": 14, "y": 4}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_true_hhkb": {
|
"LAYOUT_true_hhkb": {
|
||||||
|
|||||||
@@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
|||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
LAYOUTS = 60_ansi 60_ansi_arrow 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_abnt2 60_tsangan_hhkb
|
LAYOUTS = 60_ansi 60_ansi_arrow_split_bs_7u_spc 60_ansi_arrow 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_abnt2 60_tsangan_hhkb
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* Copyright 2020 Dimitris Papavasiliou <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x2718
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Dimitris Papavasiliou
|
||||||
|
#define PRODUCT Lagrange
|
||||||
|
|
||||||
|
#define EE_HANDS
|
||||||
|
#define SPLIT_USB_DETECT
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 14
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
/* pin-out */
|
||||||
|
#define MATRIX_ROW_PINS { E6, F1, F0, F4, F5, F6, F7 }
|
||||||
|
#define MATRIX_COL_PINS { B4, B5, D7, B6, C6, D6 }
|
||||||
|
#define MATRIX_ROW_PINS_RIGHT { B5, B4, D7, B6, C6, D6, D4 }
|
||||||
|
#define MATRIX_COL_PINS_RIGHT { C7, F7, F6, F5, F4, F1 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
#define LED_CAPS_LOCK_PIN D1
|
||||||
|
#define LED_SCROLL_LOCK_PIN D2
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Lagrange",
|
||||||
|
"url": "https://github.com/dpapavas/lagrange-keyboard",
|
||||||
|
"maintainer": "dpapavas",
|
||||||
|
"width": 19,
|
||||||
|
"height": 8.5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0.75, "w":1.5}, {"x":1.5, "y":0.75}, {"x":2.5, "y":0.375}, {"x":3.5, "y":0}, {"x":4.5, "y":0.5}, {"x":5.5, "y":0.5}, {"x":12.5, "y":0.5}, {"x":13.5, "y":0.5}, {"x":14.5, "y":0}, {"x":15.5, "y":0.375}, {"x":16.5, "y":0.75}, {"x":17.5, "y":0.75, "w":1.5},
|
||||||
|
{"x":0, "y":1.75, "w":1.5}, {"x":1.5, "y":1.75}, {"x":2.5, "y":1.375}, {"x":3.5, "y":1}, {"x":4.5, "y":1.5}, {"x":5.5, "y":1.5}, {"x":12.5, "y":1.5}, {"x":13.5, "y":1.5}, {"x":14.5, "y":1}, {"x":15.5, "y":1.375}, {"x":16.5, "y":1.75}, {"x":17.5, "y":1.75, "w":1.5},
|
||||||
|
{"x":0, "y":2.75, "w":1.5}, {"x":1.5, "y":2.75}, {"x":2.5, "y":2.375}, {"x":3.5, "y":2}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5}, {"x":14.5, "y":2}, {"x":15.5, "y":2.375}, {"x":16.5, "y":2.75}, {"x":17.5, "y":2.75, "w":1.5},
|
||||||
|
{"x":0, "y":3.75, "w":1.5}, {"x":1.5, "y":3.75}, {"x":2.5, "y":3.375}, {"x":3.5, "y":3}, {"x":4.5, "y":3.5}, {"x":5.5, "y":3.5}, {"x":12.5, "y":3.5}, {"x":13.5, "y":3.5}, {"x":14.5, "y":3}, {"x":15.5, "y":3.375}, {"x":16.5, "y":3.75}, {"x":17.5, "y":3.75, "w":1.5},
|
||||||
|
{"x":0, "y":4.75, "w":1.5}, {"x":2.5, "y":4.375}, {"x":3.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4.5}, {"x":17.5, "y":4.75, "w":1.5},
|
||||||
|
{"x":5, "y":5, "h":1.25}, {"x":6, "y":5, "h":1.5}, {"x":7, "y":5, "h":1.5}, {"x":8, "y":5.5}, {"x":10, "y":5.5}, {"x":11, "y":5, "h":1.5}, {"x":12, "y":5, "h":1.5}, {"x":13, "y":5, "h":1.25},
|
||||||
|
{"x":5, "y":7}, {"x":6, "y":6.5}, {"x":7, "y":7}, {"x":11, "y":7}, {"x":12, "y":6.5}, {"x":13, "y":7},
|
||||||
|
{"x":6, "y":7.5}, {"x":12, "y":7.5}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/* Copyright 2020 Dimitris Papavasiliou <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define EQL_ALT MT(MOD_RALT, KC_EQL)
|
||||||
|
#define MINS_ALT MT(MOD_LALT, KC_MINS)
|
||||||
|
#define HOME_GUI MT(MOD_LGUI, KC_HOME)
|
||||||
|
#define RGHT_GUI MT(MOD_RGUI, KC_RGHT)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
/* Left hand */ /* Right hand */
|
||||||
|
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, TT(1),
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
|
||||||
|
KC_LCPO, KC_INS, KC_LBRC, MINS_ALT, KC_BSPC, KC_DEL, KC_PSCR, KC_PAUSE, KC_ENT, KC_SPC, EQL_ALT, KC_RBRC, KC_DEL, KC_RCPC,
|
||||||
|
HOME_GUI, KC_PGUP, KC_END, KC_LEFT, KC_UP, RGHT_GUI,
|
||||||
|
KC_PGDN, KC_DOWN
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT(
|
||||||
|
/* Left hand */ /* Right hand */
|
||||||
|
|
||||||
|
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
/* Copyright 2020 Dimitris Papavasiliou <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 175
|
||||||
|
#define TAPPING_TERM_PER_KEY
|
||||||
|
#define PERMISSIVE_HOLD_PER_KEY
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
@@ -0,0 +1,202 @@
|
|||||||
|
/* Copyright 2020 Dimitris Papavasiliou <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define CAPS_SFT MT(MOD_LSFT, KC_CAPS)
|
||||||
|
#define QUOT_SFT MT(MOD_RSFT, KC_QUOT)
|
||||||
|
#define PSCR_SFT MT(MOD_LSFT, KC_PSCR)
|
||||||
|
#define PAUSE_SFT MT(MOD_RSFT, KC_PAUSE)
|
||||||
|
#define F_SFT MT(MOD_LSFT, KC_F)
|
||||||
|
#define J_SFT MT(MOD_RSFT, KC_J)
|
||||||
|
#define PGUP_GUI MT(MOD_LGUI, KC_PGUP)
|
||||||
|
#define END_GUI MT(MOD_LGUI, KC_END)
|
||||||
|
#define UP_GUI MT(MOD_RGUI, KC_UP)
|
||||||
|
#define LEFT_GUI MT(MOD_RGUI, KC_LEFT)
|
||||||
|
#define EQL_CTL MT(MOD_RCTL, KC_EQL)
|
||||||
|
#define MINS_CTL MT(MOD_LCTL, KC_MINS)
|
||||||
|
#define BSPC_ALT LALT_T(KC_BSPC)
|
||||||
|
#define ENT_ALT LALT_T(KC_ENT)
|
||||||
|
#define SPC_ALT RALT_T(KC_SPC)
|
||||||
|
#define DEL_ALT RALT_T(KC_DEL)
|
||||||
|
|
||||||
|
enum tapdance_keycodes {
|
||||||
|
TD_LEFT,
|
||||||
|
TD_RGHT,
|
||||||
|
TD_C_X
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
/* Left hand */ /* Right hand */
|
||||||
|
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
CAPS_SFT, KC_A, KC_S, KC_D, F_SFT, KC_G, KC_H, J_SFT, KC_K, KC_L, KC_SCLN, QUOT_SFT,
|
||||||
|
PSCR_SFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, PAUSE_SFT,
|
||||||
|
|
||||||
|
TD(TD_LEFT), KC_INS, KC_LBRC, MINS_CTL, BSPC_ALT, DEL_ALT, TD(TD_C_X), TD(TD_C_X), ENT_ALT, SPC_ALT, EQL_CTL, KC_RBRC, KC_DEL, TD(TD_RGHT),
|
||||||
|
KC_HOME, PGUP_GUI, END_GUI, LEFT_GUI, UP_GUI, KC_RGHT,
|
||||||
|
KC_PGDN, KC_DOWN
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT(
|
||||||
|
/* Left hand */ /* Right hand */
|
||||||
|
|
||||||
|
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
/* The following helper macros define tap dances that support
|
||||||
|
* separated press, release, tap and double-tap functions. */
|
||||||
|
|
||||||
|
#define STEPS(DANCE) [DANCE] = ACTION_TAP_DANCE_FN_ADVANCED( \
|
||||||
|
NULL, \
|
||||||
|
dance_ ## DANCE ## _finished, \
|
||||||
|
dance_ ## DANCE ## _reset)
|
||||||
|
|
||||||
|
#define CHOREOGRAPH(DANCE, PRESS, RELEASE, TAP, DOUBLETAP) \
|
||||||
|
static bool dance_ ## DANCE ## _pressed; \
|
||||||
|
\
|
||||||
|
void dance_ ## DANCE ## _finished(qk_tap_dance_state_t *state, void *user_data) { \
|
||||||
|
if (state->count == 1) { \
|
||||||
|
if (state->pressed) { \
|
||||||
|
dance_ ## DANCE ## _pressed = true; \
|
||||||
|
PRESS; \
|
||||||
|
} else { \
|
||||||
|
TAP; \
|
||||||
|
} \
|
||||||
|
} else if (state->count == 2) { \
|
||||||
|
if (!state->pressed) { \
|
||||||
|
DOUBLETAP; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
void dance_ ## DANCE ## _reset(qk_tap_dance_state_t *state, void *user_data) { \
|
||||||
|
if (state->count == 1) { \
|
||||||
|
if (dance_ ## DANCE ## _pressed) { \
|
||||||
|
RELEASE; \
|
||||||
|
dance_ ## DANCE ## _pressed = false; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Define dance for left palm key. */
|
||||||
|
|
||||||
|
CHOREOGRAPH(TD_LEFT,
|
||||||
|
layer_invert(1), /* Temporarily toggle layer when held. */
|
||||||
|
layer_invert(1),
|
||||||
|
|
||||||
|
/* Press and release both shifts on tap, to change
|
||||||
|
* keyboard layout (i.e. language). */
|
||||||
|
|
||||||
|
SEND_STRING(SS_DOWN(X_LSFT) SS_DOWN(X_RSFT)
|
||||||
|
SS_UP(X_LSFT) SS_UP(X_RSFT)),
|
||||||
|
|
||||||
|
layer_invert(1)); /* Toggle layer (permanently) on
|
||||||
|
* double-tap. */
|
||||||
|
|
||||||
|
/* Define dance for right palm key. */
|
||||||
|
|
||||||
|
CHOREOGRAPH(TD_RGHT,
|
||||||
|
layer_invert(1), /* Same as above */
|
||||||
|
layer_invert(1),
|
||||||
|
/* Send a complex macro: C-x C-s Mod-t up. (Save in
|
||||||
|
* Emacs, switch to terminal and recall previous command,
|
||||||
|
* hopefully a compile command.) */
|
||||||
|
SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_X) SS_TAP(X_S) SS_UP(X_LCTRL)
|
||||||
|
SS_DOWN(X_LGUI) SS_TAP(X_T) SS_UP(X_LGUI) SS_TAP(X_UP)),
|
||||||
|
layer_invert(1));
|
||||||
|
|
||||||
|
/* This facilitates C-x chords in Emacs. Used as a modifier along
|
||||||
|
* with, say, the s-key, it saves, by sending C-x C-s. When tapped it
|
||||||
|
* just sends C-x. */
|
||||||
|
|
||||||
|
CHOREOGRAPH(TD_C_X,
|
||||||
|
SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_X)),
|
||||||
|
SEND_STRING(SS_UP(X_LCTRL)),
|
||||||
|
SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_X) SS_UP(X_LCTRL)),);
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
STEPS(TD_LEFT), STEPS(TD_RGHT), STEPS(TD_C_X)
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Set a longer tapping term for palm keys to allow comfortable
|
||||||
|
* permanent layer toggle. Also set an essentially infinite tapping
|
||||||
|
* term for certain mod-tap keys one tends to keep pressed (such as
|
||||||
|
* space, backspace, etc.). This prevents sending the modifier
|
||||||
|
* keycode by accident (allowing re-tap to get repeated key-press)
|
||||||
|
* and, in combination with permissive hold, they can still be used
|
||||||
|
* fine as modifiers. */
|
||||||
|
|
||||||
|
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case TD(TD_LEFT):
|
||||||
|
case TD(TD_RGHT):
|
||||||
|
return 250;
|
||||||
|
case BSPC_ALT:
|
||||||
|
case UP_GUI:
|
||||||
|
case LEFT_GUI:
|
||||||
|
return 5000;
|
||||||
|
default:
|
||||||
|
return TAPPING_TERM;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case TD(TD_LEFT):
|
||||||
|
case TD(TD_RGHT):
|
||||||
|
case BSPC_ALT:
|
||||||
|
case UP_GUI:
|
||||||
|
case LEFT_GUI:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Use the first LED to indicate the active layer. */
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
writePin(D0, (get_highest_layer(state) > 0));
|
||||||
|
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Cycle through the LEDs after initialization. */
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
const pin_t pins[] = {D0, D1, D2};
|
||||||
|
uint8_t i, j;
|
||||||
|
|
||||||
|
for (i = 0 ; i < sizeof(pins) / sizeof(pins[0]) + 2 ; i += 1) {
|
||||||
|
for (j = 0 ; j < sizeof(pins) / sizeof(pins[0]) ; j += 1) {
|
||||||
|
setPinOutput(pins[j]);
|
||||||
|
writePin(pins[j], (j == i || j == i - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
wait_ms(100);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loaded 100 of 174 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user