Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa28335651 | ||
|
|
5319727b70 | ||
|
|
46fb874269 | ||
|
|
9a51076859 | ||
|
|
b1b6fe1c3d | ||
|
|
c1cad5b751 | ||
|
|
c71d67ba3f | ||
|
|
30bb807c13 | ||
|
|
c1add5d0e2 | ||
|
|
90ff4fe749 | ||
|
|
fd54992e1f | ||
|
|
37b5ead17d | ||
|
|
cc0ae9cc4c | ||
|
|
b724a0dfd5 | ||
|
|
a12f3a3fb8 | ||
|
|
f4f679779e | ||
|
|
c592128219 | ||
|
|
1bfbaae533 | ||
|
|
8200804e96 | ||
|
|
c039796d9d | ||
|
|
9aedf515c0 | ||
|
|
98af5bc64e | ||
|
|
425e1e665d | ||
|
|
3b4c35da6b | ||
|
|
c98e1694fb | ||
|
|
48a8682438 | ||
|
|
c148476188 | ||
|
|
a43952f35d | ||
|
|
4fc01ddefe | ||
|
|
072459871b |
No files matched your search
-38
@@ -1,38 +0,0 @@
|
|||||||
os: linux
|
|
||||||
dist: trusty
|
|
||||||
group: edge
|
|
||||||
language: c
|
|
||||||
branches:
|
|
||||||
except:
|
|
||||||
- /^.*-automated-build$/
|
|
||||||
- /^[0-9]+\.[0-9]+\.[0-9]+/
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
|
|
||||||
- MAKEFLAGS="-j3 --output-sync"
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- llvm-toolchain-trusty-7
|
|
||||||
packages:
|
|
||||||
- diffutils
|
|
||||||
- clang-format-7
|
|
||||||
- libstdc++-7-dev
|
|
||||||
script:
|
|
||||||
- git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH
|
|
||||||
- git rev-parse --short HEAD
|
|
||||||
- git diff --name-only HEAD $TRAVIS_BRANCH
|
|
||||||
- bash util/travis_test.sh
|
|
||||||
- bash util/travis_build.sh
|
|
||||||
after_script:
|
|
||||||
bash util/travis_compiled_push.sh
|
|
||||||
notifications:
|
|
||||||
webhooks:
|
|
||||||
urls:
|
|
||||||
- https://webhooks.gitter.im/e/afce403d65f143dfac09
|
|
||||||
on_success: always # options: [always|never|change] default: always
|
|
||||||
on_failure: always # options: [always|never|change] default: always
|
|
||||||
on_start: never # options: [always|never|change] default: always
|
|
||||||
@@ -93,7 +93,6 @@ This happens immediately after the previous `develop` branch is merged.
|
|||||||
* [ ] `git push upstream develop`
|
* [ ] `git push upstream develop`
|
||||||
* GitHub Actions
|
* GitHub Actions
|
||||||
* [ ] Create a PR for `develop`
|
* [ ] Create a PR for `develop`
|
||||||
* [ ] Make sure travis comes back clean
|
|
||||||
* [ ] **Turn off 'Automatically delete head branches' for the repository** -- confirm with @qmk/directors that it is done before continuing
|
* [ ] **Turn off 'Automatically delete head branches' for the repository** -- confirm with @qmk/directors that it is done before continuing
|
||||||
* `qmk_firmware` git commands
|
* `qmk_firmware` git commands
|
||||||
* [ ] `git checkout master`
|
* [ ] `git checkout master`
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ Feature and Bug Fix PR's affect all keyboards. We are also in the process of res
|
|||||||
Here are some things to keep in mind when working on your feature or bug fix.
|
Here are some things to keep in mind when working on your feature or bug fix.
|
||||||
|
|
||||||
* **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it.
|
* **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it.
|
||||||
* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back.
|
* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! You should always make sure your changes compile before opening a pull request.
|
||||||
* **Consider revisions and different chip-bases** - there are several keyboards that have revisions that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on.
|
* **Consider revisions and different chip-bases** - there are several keyboards that have revisions that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on.
|
||||||
* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work.
|
* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Quantum Mechanical Keyboard Firmware
|
# Quantum Mechanical Keyboard Firmware
|
||||||
|
|
||||||
[](https://github.com/qmk/qmk_firmware/tags)
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
|
||||||
[](https://discord.gg/Uq7gcHh)
|
[](https://discord.gg/Uq7gcHh)
|
||||||
[](https://docs.qmk.fm)
|
[](https://docs.qmk.fm)
|
||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Firmware Quantum Mechanical Keyboard
|
# Firmware Quantum Mechanical Keyboard
|
||||||
|
|
||||||
[](https://github.com/qmk/qmk_firmware/tags)
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
|
||||||
[](https://discord.gg/Uq7gcHh)
|
[](https://discord.gg/Uq7gcHh)
|
||||||
[](https://docs.qmk.fm)
|
[](https://docs.qmk.fm)
|
||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Quantum Mechanical Keyboard Firmware
|
# Quantum Mechanical Keyboard Firmware
|
||||||
|
|
||||||
[](https://github.com/qmk/qmk_firmware/tags)
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
|
||||||
[](https://discord.gg/Uq7gcHh)
|
[](https://discord.gg/Uq7gcHh)
|
||||||
[](https://docs.qmk.fm)
|
[](https://docs.qmk.fm)
|
||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
|
|||||||
@@ -103,5 +103,4 @@ Ceci est fait immédiatement après la fusion de la branche `future` précédent
|
|||||||
* [ ] `git push origin future`
|
* [ ] `git push origin future`
|
||||||
* Actions sur GitHub
|
* Actions sur GitHub
|
||||||
* [ ] Crée un PR pour `future`
|
* [ ] Crée un PR pour `future`
|
||||||
* [ ] S'assurer que Travis ne relève aucun problème
|
|
||||||
* [ ] Fusion le PR `future`
|
* [ ] Fusion le PR `future`
|
||||||
@@ -134,7 +134,7 @@ Les PR de nouvelles fonctionnalités de de correction de bug affectent tous les
|
|||||||
Voici quelques choses à garder en tête lorsque vous travaillez sur une fonctionnalité ou un bug fix.
|
Voici quelques choses à garder en tête lorsque vous travaillez sur une fonctionnalité ou un bug fix.
|
||||||
|
|
||||||
* **Désactivé par défaut** - la mémoire est plutôt limitée sur la plupart des puces que QMK supporte, et il est important que les keymaps courantes ne soient pas cassées. S'il vous plaît faites que vos features doivent être **activées** plutôt que désactivées. Si vous pensez qu'elle devrait être activée par défaut, ou que cela réduit la taille du code, parlez-nous-en.
|
* **Désactivé par défaut** - la mémoire est plutôt limitée sur la plupart des puces que QMK supporte, et il est important que les keymaps courantes ne soient pas cassées. S'il vous plaît faites que vos features doivent être **activées** plutôt que désactivées. Si vous pensez qu'elle devrait être activée par défaut, ou que cela réduit la taille du code, parlez-nous-en.
|
||||||
* **Compilez localement avant de soumettre** - Cela devrait aller sans dire, mais votre code doit compiler! Notre système Travis devrait relever les problèmes, mais il est généralement plus rapide de compiler quelques claviers en local plutôt que d'attendre le retour des résultats
|
* **Compilez localement avant de soumettre** - Cela devrait aller sans dire, mais votre code doit compiler! Vous devriez toujours faire gaffe à ce que vos changements compilent avant d'ouvrir une pull request.
|
||||||
* **Faites attention aux révisions et différentes bases de puces** - beaucoup de claviers ont des révisions qui permettent des changements de configuration mineurs, voir des bases de chip différentes. Essayez de faire que votre fonctionnalité soit supportée à la fois sur ARM et AVR, ou désactivez-là automatiquement sur les plateformes non supportées.
|
* **Faites attention aux révisions et différentes bases de puces** - beaucoup de claviers ont des révisions qui permettent des changements de configuration mineurs, voir des bases de chip différentes. Essayez de faire que votre fonctionnalité soit supportée à la fois sur ARM et AVR, ou désactivez-là automatiquement sur les plateformes non supportées.
|
||||||
* **Expliquez votre fonctionnalité** - Documentez-là dans `docs/`, soit dans un nouveau fichier, ou dans une partie d'un fichier existant. Si vous ne la documentez pas, personne ne pourra bénéficier de votre dur labeur.
|
* **Expliquez votre fonctionnalité** - Documentez-là dans `docs/`, soit dans un nouveau fichier, ou dans une partie d'un fichier existant. Si vous ne la documentez pas, personne ne pourra bénéficier de votre dur labeur.
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
# קושחה עבור Quantum Mechanical Keyboard
|
# קושחה עבור Quantum Mechanical Keyboard
|
||||||
|
|
||||||
[](https://github.com/qmk/qmk_firmware/tags)
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
|
||||||
[](https://discord.gg/Uq7gcHh)
|
[](https://discord.gg/Uq7gcHh)
|
||||||
[](https://docs.qmk.fm)
|
[](https://docs.qmk.fm)
|
||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
[](https://github.com/qmk/qmk_firmware/tags)
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
|
||||||
[](https://discord.gg/Uq7gcHh)
|
[](https://discord.gg/Uq7gcHh)
|
||||||
[](https://docs.qmk.fm)
|
[](https://docs.qmk.fm)
|
||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
|
|||||||
@@ -117,5 +117,4 @@ git push --force
|
|||||||
* [ ] `git push origin develop`
|
* [ ] `git push origin develop`
|
||||||
* GitHub Actions
|
* GitHub Actions
|
||||||
* [ ] `develop`の PR を作成します
|
* [ ] `develop`の PR を作成します
|
||||||
* [ ] travis がクリーンに戻ったことを確認します
|
|
||||||
* [ ] `develop` PR をマージします
|
* [ ] `develop` PR をマージします
|
||||||
@@ -153,7 +153,7 @@ enum my_keycodes {
|
|||||||
機能やバグの修正に取り組む時に留意すべき幾つかの事があります。
|
機能やバグの修正に取り組む時に留意すべき幾つかの事があります。
|
||||||
|
|
||||||
* **デフォルトで無効** - QMK がサポートするほとんどのチップでメモリがかなり制限されており、現在のキーマップが壊れていないことが重要です。ですので、あなたの機能をオフにするのではなく**オン**にするようにしてください。デフォルトでオンにすべき場合、あるいはコードのサイズを小さくする必要がある場合は、相談してください。
|
* **デフォルトで無効** - QMK がサポートするほとんどのチップでメモリがかなり制限されており、現在のキーマップが壊れていないことが重要です。ですので、あなたの機能をオフにするのではなく**オン**にするようにしてください。デフォルトでオンにすべき場合、あるいはコードのサイズを小さくする必要がある場合は、相談してください。
|
||||||
* **サブミットする前にローカルでコンパイル** - これが明白であることを願っていますが、コンパイルする必要があります。私たちの Travis システムは全ての問題をキャッチしますが、結果が返ってくるのを待つ代わりに幾つかのキーボードをローカルでコンパイルする方が一般的に速いです。
|
* **サブミットする前にローカルでコンパイル** - これが明白であることを願っていますが、コンパイルする必要があります。プルリクエストを作成する前に、変更した内容がコンパイルできるかどうかを常に確認する必要があります。
|
||||||
* **リビジョンと異なるチップベースを考慮** - 僅かに異なる設定、さらには異なるチップベースを可能にするリビジョンを持つキーボードが幾つかあります。ARM および AVR でサポートされる機能を作成する、あるいは動作しないプラットフォームでは自動的に無効化するようにしてください。
|
* **リビジョンと異なるチップベースを考慮** - 僅かに異なる設定、さらには異なるチップベースを可能にするリビジョンを持つキーボードが幾つかあります。ARM および AVR でサポートされる機能を作成する、あるいは動作しないプラットフォームでは自動的に無効化するようにしてください。
|
||||||
* **機能の説明** - 新しいファイルあるいは既存のファイルの一部として、`docs/` の中に文章化します。文章化しないと、他の人はあなたの苦労から利益を得ることができません。
|
* **機能の説明** - 新しいファイルあるいは既存のファイルの一部として、`docs/` の中に文章化します。文章化しないと、他の人はあなたの苦労から利益を得ることができません。
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ VS Code のようなフル機能のエディタの使用は、プレーンテキ
|
|||||||
* [GitHub Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[オプション]_ - VS Code の markdown プレビューを GithHub のようにします。
|
* [GitHub Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[オプション]_ - VS Code の markdown プレビューを GithHub のようにします。
|
||||||
* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[オプション]_ - この拡張により、他の誰かがあなたのワークスペースにアクセスし(あるいは、あなたが他の誰かのワークスペースにアクセスし)、手伝うことができます。あなたが問題を抱えており、他の誰かの助けが必要な場合に便利です。
|
* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[オプション]_ - この拡張により、他の誰かがあなたのワークスペースにアクセスし(あるいは、あなたが他の誰かのワークスペースにアクセスし)、手伝うことができます。あなたが問題を抱えており、他の誰かの助けが必要な場合に便利です。
|
||||||
* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[オプション]_ - VIM スタイルのキーバインドを好む人向け。これには他のオプションもあります。
|
* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[オプション]_ - VIM スタイルのキーバインドを好む人向け。これには他のオプションもあります。
|
||||||
* [Travis CI Status](https://marketplace.visualstudio.com/items?itemName=felixrieseberg.vsc-travis-ci-status) - _[オプション]_ - セットアップした場合、現在の Travis CI の状態を表示します。
|
|
||||||
|
|
||||||
いずれかの拡張機能をインストールしたら、再起動します。
|
いずれかの拡張機能をインストールしたら、再起動します。
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Quantum Mechanical Keyboard Firmware
|
# Quantum Mechanical Keyboard Firmware
|
||||||
|
|
||||||
[](https://github.com/qmk/qmk_firmware/tags)
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
|
||||||
[](https://discord.gg/Uq7gcHh)
|
[](https://discord.gg/Uq7gcHh)
|
||||||
[](https://docs.qmk.fm)
|
[](https://docs.qmk.fm)
|
||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
|
|||||||
@@ -108,7 +108,6 @@ This installs a bunch of Git related tools that may make using Git with QMK Firm
|
|||||||
* [GitHub Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[Optional]_ - Makes the markdown preview in VS Code more like GitHub's.
|
* [GitHub Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[Optional]_ - Makes the markdown preview in VS Code more like GitHub's.
|
||||||
* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[Optional]_ - This extension allows somebody else to access your workspace (or you to access somebody else's workspace) and help out. This is great if you're having issues and need some help from somebody.
|
* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[Optional]_ - This extension allows somebody else to access your workspace (or you to access somebody else's workspace) and help out. This is great if you're having issues and need some help from somebody.
|
||||||
* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[Optional]_ - For those that prefer VIM style keybindings. There are other options for this, too.
|
* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[Optional]_ - For those that prefer VIM style keybindings. There are other options for this, too.
|
||||||
* [Travis CI Status](https://marketplace.visualstudio.com/items?itemName=felixrieseberg.vsc-travis-ci-status) - _[Optional]_ - This shows the current Travis CI status, if you have it set up.
|
|
||||||
|
|
||||||
Restart once you've installed any extensions
|
Restart once you've installed any extensions
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Quantum Mechanical Keyboard Firmware
|
# Quantum Mechanical Keyboard Firmware
|
||||||
|
|
||||||
[](https://github.com/qmk/qmk_firmware/tags)
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
|
||||||
[](https://discord.gg/Uq7gcHh)
|
[](https://discord.gg/Uq7gcHh)
|
||||||
[](https://docs.qmk.fm)
|
[](https://docs.qmk.fm)
|
||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Quantum Mechanical Keyboard Firmware
|
# Quantum Mechanical Keyboard Firmware
|
||||||
|
|
||||||
[](https://github.com/qmk/qmk_firmware/tags)
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
|
||||||
[](https://discord.gg/Uq7gcHh)
|
[](https://discord.gg/Uq7gcHh)
|
||||||
[](https://docs.qmk.fm)
|
[](https://docs.qmk.fm)
|
||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# QMK机械键盘固件
|
# QMK机械键盘固件
|
||||||
|
|
||||||
[](https://github.com/qmk/qmk_firmware/tags)
|
[](https://github.com/qmk/qmk_firmware/tags)
|
||||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
|
||||||
[](https://discord.gg/Uq7gcHh)
|
[](https://discord.gg/Uq7gcHh)
|
||||||
[](https://docs.qmk.fm)
|
[](https://docs.qmk.fm)
|
||||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||||
|
|||||||
@@ -0,0 +1,297 @@
|
|||||||
|
/*
|
||||||
|
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
|
||||||
|
// clang-format off
|
||||||
|
enum my_keycodes {
|
||||||
|
WPM = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
enum layer_names {
|
||||||
|
_HOME,
|
||||||
|
_FN2,
|
||||||
|
_FN3,
|
||||||
|
_FN4
|
||||||
|
};
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_HOME] = LAYOUT_all(
|
||||||
|
KC_MPLY,
|
||||||
|
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
||||||
|
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSPC,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), MO(2)
|
||||||
|
),
|
||||||
|
[_FN2] = LAYOUT_all(
|
||||||
|
RESET,
|
||||||
|
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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_FN3] = LAYOUT_all(
|
||||||
|
EEP_RST,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_FN4] = LAYOUT_all(
|
||||||
|
_______,
|
||||||
|
WPM, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_MSTP, KC_INS, KC_HOME, KC_DEL, KC_END, _______,
|
||||||
|
_______, _______, KC_BRID, KC_BRIU, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
/* WPM toggle key bongocat hehe */
|
||||||
|
bool wpm = false;
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case WPM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
wpm = !wpm;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*layer switcher */
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
state = update_tri_layer_state(state, _FN2, _FN3, _FN4);
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
/* rotary encoder (MX12) - add different functions for layers here */
|
||||||
|
#ifdef ENCODER_ENABLE
|
||||||
|
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (IS_LAYER_ON(_FN4)) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
} else if (IS_LAYER_ON(_FN3)) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
} else if (IS_LAYER_ON(_FN2)) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* oled stuff :) */
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
#define IDLE_FRAMES 5
|
||||||
|
#define IDLE_SPEED 20 // below this wpm value your animation will idle
|
||||||
|
#define TAP_FRAMES 2
|
||||||
|
#define TAP_SPEED 40 // above this wpm value typing animation to trigger
|
||||||
|
#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms
|
||||||
|
#define ANIM_SIZE 636 // number of bytes in array
|
||||||
|
|
||||||
|
uint32_t anim_timer = 0;
|
||||||
|
uint32_t anim_sleep = 0;
|
||||||
|
uint8_t current_idle_frame = 0;
|
||||||
|
uint8_t current_tap_frame = 0;
|
||||||
|
|
||||||
|
uint16_t startup_timer = 0;
|
||||||
|
|
||||||
|
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 raw_logo[] = {
|
||||||
|
0, 8, 0,192,194,192,192, 60, 60, 44, 60,188, 60, 60, 60, 60, 44, 61, 60,192,192,192,208, 1, 0,252,252,180,252, 60, 60, 44, 60,252,253,252,252, 60, 60, 44, 60,244,220,252,252, 0, 0, 16, 0, 0, 0,192,192, 65,192, 60, 60, 52, 60,192,193,192,192, 16, 0, 0,144, 4, 0,252,125,244, 60, 60, 60, 60, 61,252,252,244,252, 60, 60, 60, 61,248,108,252, 0, 0, 61, 60,188, 60, 52,252,252,220,252, 61, 60, 60, 52, 0, 0,192,210, 64,192, 60, 60, 44, 61, 60, 60, 60, 61, 52, 60, 60, 60,192,192, 64,196, 0, 4, 0,
|
||||||
|
0, 16, 0, 61, 63, 55, 63,192, 64,192,196,192,192,192,200,192,196,192,192, 3, 3, 2, 11, 0, 0, 35, 3, 3, 3, 0, 64, 2, 0,255,255,253,247, 0, 0, 0, 32, 1, 0, 1, 65, 8, 0,189,244,252,236, 3,130, 3, 1, 0, 68, 0, 0, 3, 34,131, 3,252,252,236,252, 0, 32, 17, 1, 1, 0, 0, 32, 0, 2,255,255,127,247, 0, 1, 0, 8, 1, 1, 1, 0, 0, 0, 16, 0, 64, 0,255,191,255,251, 0,129, 0, 2, 32, 0,255,255,239,255, 0, 0, 2, 0, 0, 0, 8, 64, 0, 1, 0, 0, 3, 35, 3, 3, 0, 8, 0,
|
||||||
|
1, 16, 0,192, 64,194,192, 3, 67, 3, 3, 9, 3, 3, 3, 3, 2, 83, 3,252,252,188,244, 0, 2, 32, 0, 0, 2, 0,144, 0, 0,255,255,237,255, 0, 16, 0, 0, 0, 64, 2, 0,128, 0,255,123,255,255, 60, 52, 60, 60, 60, 60, 60, 60, 44, 60, 56, 60,239,255,126,255, 0, 2, 32, 0, 0, 34, 0, 0, 16, 0,255,255,255,223, 0, 0, 4, 0, 0, 0, 33, 0, 0, 17, 0, 0, 0, 0,255,255,239,255, 0,128, 0, 0, 72, 0,255,253,247,255, 0, 0, 1, 0,144, 0, 4, 0, 32, 0, 0, 2,192,192,192,200, 0, 16, 0,
|
||||||
|
64, 4, 0, 3, 7, 3, 3, 60, 60, 52,188, 60, 61, 60, 60, 60, 60, 44, 60, 67, 3, 3, 3, 0, 0, 64, 0, 0, 4, 0, 0, 16, 0, 47, 63, 62, 63, 0, 0,132, 0, 0, 0, 0,128, 8, 0,255,255,111,127, 0, 0, 0, 2,128, 0, 0, 0, 64, 4, 0,128,127,127,107,127, 0, 32, 0, 0, 0, 66, 0, 0, 0,136, 55, 63, 61, 63, 0, 0, 0, 2, 0, 64, 0,136, 0, 0, 60, 44,189, 60, 63, 63, 63, 59, 60, 60,172, 60, 0, 64, 3, 2, 3,131, 60, 44, 60, 60, 60, 60,188, 60, 56, 44, 60, 60, 3, 3,131, 2, 0, 32, 2,
|
||||||
|
};
|
||||||
|
oled_write_raw_P(raw_logo, sizeof(raw_logo));
|
||||||
|
}
|
||||||
|
/* Shows the name of the current layer and locks for the host (CAPS etc.) */
|
||||||
|
static void render_layer(void) {
|
||||||
|
led_t led_state = host_keyboard_led_state();
|
||||||
|
// clang-format off
|
||||||
|
static const char PROGMEM logo[][3][7] = {
|
||||||
|
{{0x97, 0x98, 0x99, 0x9A, 0}, {0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0}, {0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0}}, /* l num CB */
|
||||||
|
{{0xB7, 0xB8, 0xB9, 0xBA, 0}, {0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0}, {0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0}}, /* 1 num CB */
|
||||||
|
{{0xD7, 0xD8, 0xD9, 0xDA, 0}, {0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0}, {0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0}}, /* 1 cap CB */
|
||||||
|
{{0xF7, 0xF8, 0xF9, 0xFA, 0}, {0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0}, {0xFB, 0xFC, 0xFD, 0xFE, 0xFF, 0}}, /* l cap CB */
|
||||||
|
{{0xB7, 0xC0, 0xC1, 0xBA, 0}, {0xB7, 0xC2, 0xC3, 0xBA, 0}, {0xB7, 0xC4, 0xC5, 0xBA, 0}}, /* 2 3 4 */
|
||||||
|
{{0xD7, 0xE0, 0xE1, 0xDA, 0}, {0xD7, 0xE2, 0xE3, 0xDA, 0}, {0xD7, 0xE4, 0xE5, 0xDA, 0}}, /* 2 3 4 */
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
oled_set_cursor(0, 0);
|
||||||
|
oled_write_P(logo[0][0], false);
|
||||||
|
oled_set_cursor(0, 3);
|
||||||
|
oled_write_P(logo[3][0], false);
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _HOME:
|
||||||
|
oled_set_cursor(0, 1);
|
||||||
|
oled_write_P(logo[1][0], false);
|
||||||
|
oled_set_cursor(0, 2);
|
||||||
|
oled_write_P(logo[2][0], false);
|
||||||
|
break;
|
||||||
|
case _FN2:
|
||||||
|
oled_set_cursor(0, 1);
|
||||||
|
oled_write_P(logo[4][0], false);
|
||||||
|
oled_set_cursor(0, 2);
|
||||||
|
oled_write_P(logo[5][0], false);
|
||||||
|
break;
|
||||||
|
case _FN3:
|
||||||
|
oled_set_cursor(0, 1);
|
||||||
|
oled_write_P(logo[4][1], false);
|
||||||
|
oled_set_cursor(0, 2);
|
||||||
|
oled_write_P(logo[5][1], false);
|
||||||
|
break;
|
||||||
|
case _FN4:
|
||||||
|
oled_set_cursor(0, 1);
|
||||||
|
oled_write_P(logo[4][2], false);
|
||||||
|
oled_set_cursor(0, 2);
|
||||||
|
oled_write_P(logo[5][2], false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_set_cursor(0, 1);
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
oled_set_cursor(0, 2);
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
}
|
||||||
|
oled_set_cursor(8, 0);
|
||||||
|
oled_write_P(led_state.num_lock ? logo[0][1] : PSTR(" "), false);
|
||||||
|
oled_set_cursor(8, 1);
|
||||||
|
oled_write_P(led_state.num_lock ? logo[1][1] : PSTR(" "), false);
|
||||||
|
oled_set_cursor(8, 2);
|
||||||
|
oled_write_P(led_state.caps_lock ? logo[2][1] : PSTR(" "), false);
|
||||||
|
oled_set_cursor(8, 3);
|
||||||
|
oled_write_P(led_state.caps_lock ? logo[3][1] : PSTR(" "), false);
|
||||||
|
|
||||||
|
oled_set_cursor(16, 0);
|
||||||
|
oled_write_P(logo[0][2], false);
|
||||||
|
oled_set_cursor(16, 1);
|
||||||
|
oled_write_P(logo[1][2], false);
|
||||||
|
oled_set_cursor(16, 2);
|
||||||
|
oled_write_P(logo[2][2], false);
|
||||||
|
oled_set_cursor(16, 3);
|
||||||
|
oled_write_P(logo[3][2], false);
|
||||||
|
|
||||||
|
/* Fill empty space to clear animation */
|
||||||
|
oled_set_cursor(4, 0);
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
oled_set_cursor(4, 1);
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
oled_set_cursor(4, 2);
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
oled_set_cursor(4, 3);
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
|
||||||
|
oled_set_cursor(14, 0);
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
oled_set_cursor(14, 1);
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
oled_set_cursor(14, 2);
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
oled_set_cursor(14, 3);
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void render_cat(void) {
|
||||||
|
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
|
||||||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 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, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 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, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 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, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 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, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 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, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
|
||||||
|
static const char PROGMEM prep[][ANIM_SIZE] = {
|
||||||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 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, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
|
||||||
|
static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = {
|
||||||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 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, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 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, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||||
|
};
|
||||||
|
|
||||||
|
void animation_phase(void) {
|
||||||
|
if (get_current_wpm() <= IDLE_SPEED) {
|
||||||
|
current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES;
|
||||||
|
oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE);
|
||||||
|
}
|
||||||
|
if (get_current_wpm() > IDLE_SPEED && get_current_wpm() < TAP_SPEED) {
|
||||||
|
oled_write_raw_P(prep[0], ANIM_SIZE);
|
||||||
|
}
|
||||||
|
if (get_current_wpm() >= TAP_SPEED) {
|
||||||
|
current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES;
|
||||||
|
oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (get_current_wpm() != 000) {
|
||||||
|
if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||||
|
anim_timer = timer_read32();
|
||||||
|
animation_phase();
|
||||||
|
}
|
||||||
|
anim_sleep = timer_read32();
|
||||||
|
} else {
|
||||||
|
if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||||
|
anim_timer = timer_read32();
|
||||||
|
animation_phase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
static bool finished_timer = false;
|
||||||
|
if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) {
|
||||||
|
render_logo();
|
||||||
|
} else {
|
||||||
|
if (!finished_timer) {
|
||||||
|
oled_clear();
|
||||||
|
finished_timer = true;
|
||||||
|
}
|
||||||
|
if (wpm) {
|
||||||
|
render_cat();
|
||||||
|
oled_set_cursor(0, 0);
|
||||||
|
char string[10];
|
||||||
|
uint16_t m = get_current_wpm();
|
||||||
|
string[3] = '\0';
|
||||||
|
string[2] = '0' + m % 10;
|
||||||
|
string[1] = ( m /= 10) % 10 ? '0' + (m) % 10 : (m / 10) % 10 ? '0' : ' ';
|
||||||
|
string[0] = m / 10 ? '0' + m / 10 : ' ';
|
||||||
|
oled_write_P(PSTR("WPM:"), false);
|
||||||
|
oled_write(string, false);
|
||||||
|
} else {
|
||||||
|
render_layer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Resets via on eep reset - thank you drashna! */
|
||||||
|
void eeconfig_init_kb(void) {
|
||||||
|
via_eeprom_set_valid(false);
|
||||||
|
via_init();
|
||||||
|
eeconfig_init_user();
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
WPM_ENABLE = yes
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "3w6",
|
||||||
|
"url": "https://github.com/weteor/3W6/",
|
||||||
|
"maintainer": "weteor",
|
||||||
|
"width": 13,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label": "k00", "x": 0, "y": 0.8},
|
||||||
|
{"label": "k01", "x": 1, "y": 0.2},
|
||||||
|
{"label": "k02", "x": 2, "y": 0},
|
||||||
|
{"label": "k03", "x": 3, "y": 0.2},
|
||||||
|
{"label": "k04", "x": 4, "y": 0.4},
|
||||||
|
|
||||||
|
{"label": "k05", "x": 8, "y": 0.4},
|
||||||
|
{"label": "k06", "x": 9, "y": 0.2},
|
||||||
|
{"label": "k07", "x": 10, "y": 0},
|
||||||
|
{"label": "k08", "x": 11, "y": 0.2},
|
||||||
|
{"label": "k09", "x": 12, "y": 0.8},
|
||||||
|
|
||||||
|
{"label": "k10", "x": 0, "y": 1.8},
|
||||||
|
{"label": "k11", "x": 1, "y": 1.2},
|
||||||
|
{"label": "k12", "x": 2, "y": 1},
|
||||||
|
{"label": "k13", "x": 3, "y": 1.2},
|
||||||
|
{"label": "k14", "x": 4, "y": 1.4},
|
||||||
|
|
||||||
|
{"label": "k15", "x": 8, "y": 1.4},
|
||||||
|
{"label": "k16", "x": 9, "y": 1.2},
|
||||||
|
{"label": "k17", "x": 10, "y": 1},
|
||||||
|
{"label": "k18", "x": 11, "y": 1.2},
|
||||||
|
{"label": "k19", "x": 12, "y": 1.8},
|
||||||
|
|
||||||
|
{"label": "k20", "x": 0, "y": 2.8},
|
||||||
|
{"label": "k21", "x": 1, "y": 2.2},
|
||||||
|
{"label": "k22", "x": 2, "y": 2},
|
||||||
|
{"label": "k23", "x": 3, "y": 2.2},
|
||||||
|
{"label": "k24", "x": 4, "y": 2.4},
|
||||||
|
|
||||||
|
{"label": "k25", "x": 8, "y": 2.4},
|
||||||
|
{"label": "k26", "x": 9, "y": 2.2},
|
||||||
|
{"label": "k27", "x": 10, "y": 2},
|
||||||
|
{"label": "k28", "x": 11, "y": 2.2},
|
||||||
|
{"label": "k29", "x": 12, "y": 2.8},
|
||||||
|
|
||||||
|
{"label": "k32", "x": 3.2, "y": 3.6},
|
||||||
|
{"label": "k33", "x": 4.2, "y": 3.6},
|
||||||
|
{"label": "k34", "x": 5.2, "y": 3.8},
|
||||||
|
|
||||||
|
{"label": "k35", "x": 6.8, "y": 3.8},
|
||||||
|
{"label": "k36", "x": 7.8, "y": 3.6},
|
||||||
|
{"label": "k37", "x": 8.8, "y": 3.6}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/* Copyright 2021 weteor
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
_ALPHA_QWERTY = 0,
|
||||||
|
_ALPHA_COLEMAK,
|
||||||
|
_SYM,
|
||||||
|
_NAV,
|
||||||
|
_NUM,
|
||||||
|
_CFG,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
|
||||||
|
[_ALPHA_QWERTY] = 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),
|
||||||
|
|
||||||
|
LCTL_T(KC_ESC), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL)
|
||||||
|
),
|
||||||
|
[_ALPHA_COLEMAK] = LAYOUT(
|
||||||
|
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT,
|
||||||
|
KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,
|
||||||
|
LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SCLN),
|
||||||
|
LCTL_T(KC_ENT), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL)
|
||||||
|
),
|
||||||
|
[_SYM] = LAYOUT(
|
||||||
|
KC_GRV , KC_CIRC, KC_AT, KC_DLR, KC_TILD, KC_AMPR, KC_EXLM, KC_PIPE, KC_UNDS, KC_HASH,
|
||||||
|
KC_SLSH, KC_LBRC, KC_LCBR, KC_LPRN, KC_EQL, KC_ASTR, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS,
|
||||||
|
_______, KC_QUES, KC_PLUS, KC_PERC, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, XXXXXXX, _______,
|
||||||
|
XXXXXXX, MO(_CFG), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
[_NAV] = LAYOUT(
|
||||||
|
XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_PGDN, KC_UP, KC_PGUP, KC_DEL,
|
||||||
|
KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_CFG), XXXXXXX
|
||||||
|
),
|
||||||
|
[_NUM] = LAYOUT(
|
||||||
|
XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PSLS,
|
||||||
|
XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_P0, KC_P4, KC_P5, KC_P6, KC_PDOT,
|
||||||
|
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PAST,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_PEQL, KC_PENT, XXXXXXX
|
||||||
|
),
|
||||||
|
[_CFG] = LAYOUT(
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,DF(_ALPHA_QWERTY), DF(_ALPHA_COLEMAK),
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/* Copyright 2021 weteor
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*-
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define LAYOUT_miryoku( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \
|
||||||
|
N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \
|
||||||
|
) \
|
||||||
|
LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \
|
||||||
|
K32, K33, K34, K35, K36, K37 \
|
||||||
|
)
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2021 weteor
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*-
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
# 3W6
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The 3w6 is a low profile, split ortholinear keyboard with 36 keys.
|
||||||
|
|
||||||
|
I needed a keyboard for work and wasn't really satisfied with the available alternatives (namely Corne, Kyria and Ferris), mostly because they are either rather large and/or don't have the spacing I would like.
|
||||||
|
|
||||||
|
The 3w6 is designed to be a simple, realiable, cheap and small keyboard to be taken everywhere.
|
||||||
|
|
||||||
|
There are currently two revisions:
|
||||||
|
* Rev1:
|
||||||
|
- onboard microcontroller (ATMega32U4)
|
||||||
|
- USB-C connector Board <-> PC
|
||||||
|
- USB-C connectors between both split halfs
|
||||||
|
- choc spacing (18x17mm)
|
||||||
|
- aggressive pinky stagger
|
||||||
|
- support for Choc V1 switches
|
||||||
|
* Rev2:
|
||||||
|
- everything Rev1 did
|
||||||
|
- additional middle plate (2mm)
|
||||||
|
- support for [Pimoroni Trackball](https://shop.pimoroni.com/products/trackball-breakout) instead of outer thumb switch on right half, needs midplate
|
||||||
|
- mounting holes for [Tenting Puck](https://splitkb.com/collections/keyboard-parts/products/tenting-puck), only usable without mid or switchplate
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [weteor](https://github.com/weteor)
|
||||||
|
* Hardware Supported:
|
||||||
|
* 3w6 rev1
|
||||||
|
* 3w6 rev2 (with Pimoroni support)
|
||||||
|
* Hardware Availability:
|
||||||
|
* make one yourself: [Design and Productionfiles](https://github.com/weteor/3w6)
|
||||||
|
* maintainer is selling kits when available
|
||||||
|
---
|
||||||
|
To reach the bootloader, connect the board to the PC and push the reset button on left half.
|
||||||
|
|
||||||
|
Make examples for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 3w6/rev1:default
|
||||||
|
make 3w6/rev2:default
|
||||||
|
make 3w6/rev2:default_pimoroni
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
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,63 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 weteor
|
||||||
|
|
||||||
|
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 VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x4658
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER weteor
|
||||||
|
#define PRODUCT 3w6
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 10
|
||||||
|
|
||||||
|
#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
|
||||||
|
#define MATRIX_COLS_PER_SIDE (MATRIX_COLS / 2)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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_ROW_PINS_L { B0, B1, B2, B4}
|
||||||
|
#define MATRIX_COL_PINS_L { B3, E6, F7, B6, B5 }
|
||||||
|
#define UNUSED_PINS_L { B7, C6, C7, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6 }
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS_R { P10, P11, P12, P05 }
|
||||||
|
#define MATRIX_COL_PINS_R { P06, P13, P14, P01, P00 }
|
||||||
|
#define UNUSED_PINS_R { P02, P03, P04, P07, P15, P16, P17 }
|
||||||
|
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
@@ -0,0 +1,280 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2013 Oleg Kostyuk <[email protected]>
|
||||||
|
2020 Pierre Chevalier <[email protected]>
|
||||||
|
2021 weteor
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This code was heavily inspired by the ergodox_ez keymap, and modernized
|
||||||
|
* to take advantage of the quantum.h microcontroller agnostics gpio control
|
||||||
|
* abstractions and use the macros defined in config.h for the wiring as opposed
|
||||||
|
* to repeating that information all over the place.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "i2c_master.h"
|
||||||
|
|
||||||
|
extern i2c_status_t tca9555_status;
|
||||||
|
#define I2C_TIMEOUT 1000
|
||||||
|
|
||||||
|
// I2C address:
|
||||||
|
// All address pins of the tca9555 are connected to the ground
|
||||||
|
// | 0 | 1 | 0 | 0 | A2 | A1 | A0 |
|
||||||
|
// | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
||||||
|
#define I2C_ADDR 0b0100000
|
||||||
|
#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE)
|
||||||
|
#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ)
|
||||||
|
|
||||||
|
// Register addresses
|
||||||
|
#define IODIRA 0x06 // i/o direction register
|
||||||
|
#define IODIRB 0x07
|
||||||
|
#define IREGP0 0x00 // GPIO pull-up resistor register
|
||||||
|
#define IREGP1 0x01
|
||||||
|
#define OREGP0 0x02 // general purpose i/o port register (write modifies OLAT)
|
||||||
|
#define OREGP1 0x03
|
||||||
|
|
||||||
|
bool i2c_initialized = 0;
|
||||||
|
i2c_status_t tca9555_status = I2C_ADDR;
|
||||||
|
|
||||||
|
uint8_t init_tca9555(void) {
|
||||||
|
print("starting init");
|
||||||
|
tca9555_status = I2C_ADDR;
|
||||||
|
|
||||||
|
// I2C subsystem
|
||||||
|
if (i2c_initialized == 0) {
|
||||||
|
i2c_init(); // on pins D(1,0)
|
||||||
|
i2c_initialized = true;
|
||||||
|
wait_ms(I2C_TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set pin direction
|
||||||
|
// - unused : input : 1
|
||||||
|
// - input : input : 1
|
||||||
|
// - driving : output : 0
|
||||||
|
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_write(IODIRA, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
// This means: write on pin 5 of port 0, read on rest
|
||||||
|
tca9555_status = i2c_write(0b11011111, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
// This means: we will write on pins 0 to 2 on port 1. read rest
|
||||||
|
tca9555_status = i2c_write(0b11111000, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
|
||||||
|
out:
|
||||||
|
i2c_stop();
|
||||||
|
return tca9555_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
||||||
|
|
||||||
|
static matrix_row_t read_cols(uint8_t row);
|
||||||
|
static void init_cols(void);
|
||||||
|
static void unselect_rows(void);
|
||||||
|
static void select_row(uint8_t row);
|
||||||
|
|
||||||
|
static uint8_t tca9555_reset_loop;
|
||||||
|
|
||||||
|
void matrix_init_custom(void) {
|
||||||
|
// initialize row and col
|
||||||
|
|
||||||
|
tca9555_status = init_tca9555();
|
||||||
|
|
||||||
|
unselect_rows();
|
||||||
|
init_cols();
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_power_up(void) {
|
||||||
|
tca9555_status = init_tca9555();
|
||||||
|
|
||||||
|
unselect_rows();
|
||||||
|
init_cols();
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reads and stores a row, returning
|
||||||
|
// whether a change occurred.
|
||||||
|
static inline bool store_matrix_row(matrix_row_t current_matrix[], uint8_t index) {
|
||||||
|
matrix_row_t temp = read_cols(index);
|
||||||
|
if (current_matrix[index] != temp) {
|
||||||
|
current_matrix[index] = temp;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||||
|
if (tca9555_status) { // if there was an error
|
||||||
|
if (++tca9555_reset_loop == 0) {
|
||||||
|
// since tca9555_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
|
||||||
|
// this will be approx bit more frequent than once per second
|
||||||
|
dprint("trying to reset tca9555\n");
|
||||||
|
tca9555_status = init_tca9555();
|
||||||
|
if (tca9555_status) {
|
||||||
|
dprint("right side not responding\n");
|
||||||
|
} else {
|
||||||
|
dprint("right side attached\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool changed = false;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
||||||
|
// select rows from left and right hands
|
||||||
|
uint8_t left_index = i;
|
||||||
|
uint8_t right_index = i + MATRIX_ROWS_PER_SIDE;
|
||||||
|
select_row(left_index);
|
||||||
|
select_row(right_index);
|
||||||
|
|
||||||
|
// we don't need a 30us delay anymore, because selecting a
|
||||||
|
// left-hand row requires more than 30us for i2c.
|
||||||
|
|
||||||
|
changed |= store_matrix_row(current_matrix, left_index);
|
||||||
|
changed |= store_matrix_row(current_matrix, right_index);
|
||||||
|
|
||||||
|
unselect_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void init_cols(void) {
|
||||||
|
// init on tca9555
|
||||||
|
// not needed, already done as part of init_tca9555()
|
||||||
|
|
||||||
|
// init on mcu
|
||||||
|
pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L;
|
||||||
|
for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) {
|
||||||
|
pin_t pin = matrix_col_pins_mcu[pin_index];
|
||||||
|
setPinInput(pin);
|
||||||
|
writePinHigh(pin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static matrix_row_t read_cols(uint8_t row) {
|
||||||
|
if (row < MATRIX_ROWS_PER_SIDE) {
|
||||||
|
pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L;
|
||||||
|
matrix_row_t current_row_value = 0;
|
||||||
|
// For each col...
|
||||||
|
for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) {
|
||||||
|
// Select the col pin to read (active low)
|
||||||
|
uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]);
|
||||||
|
|
||||||
|
// Populate the matrix row with the state of the col pin
|
||||||
|
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
|
||||||
|
}
|
||||||
|
return current_row_value;
|
||||||
|
} else {
|
||||||
|
if (tca9555_status) { // if there was an error
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
uint8_t data = 0;
|
||||||
|
uint8_t port0 = 0;
|
||||||
|
uint8_t port1 = 0;
|
||||||
|
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_write(IREGP0, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_read_ack(I2C_TIMEOUT);
|
||||||
|
if (tca9555_status < 0) goto out;
|
||||||
|
port0 = (uint8_t)tca9555_status;
|
||||||
|
tca9555_status = i2c_read_nack(I2C_TIMEOUT);
|
||||||
|
if (tca9555_status < 0) goto out;
|
||||||
|
port1 = (uint8_t)tca9555_status;
|
||||||
|
|
||||||
|
// The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero.
|
||||||
|
// The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys.
|
||||||
|
// Since the pins are not ordered sequentially, we have to build the correct dataset from the two ports. Refer to the schematic to see where every pin is connected.
|
||||||
|
data |= ( port0 & 0x01 );
|
||||||
|
data |= ( port0 & 0x02 );
|
||||||
|
data |= ( port1 & 0x10 ) >> 2;
|
||||||
|
data |= ( port1 & 0x08 );
|
||||||
|
data |= ( port0 & 0x40 ) >> 2;
|
||||||
|
data = ~(data);
|
||||||
|
|
||||||
|
tca9555_status = I2C_STATUS_SUCCESS;
|
||||||
|
out:
|
||||||
|
i2c_stop();
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_rows(void) {
|
||||||
|
// no need to unselect on tca9555, because the select step sets all
|
||||||
|
// the other row bits high, and it's not changing to a different
|
||||||
|
// direction
|
||||||
|
|
||||||
|
// unselect rows on microcontroller
|
||||||
|
pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L;
|
||||||
|
for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) {
|
||||||
|
pin_t pin = matrix_row_pins_mcu[pin_index];
|
||||||
|
setPinInput(pin);
|
||||||
|
writePinLow(pin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_row(uint8_t row) {
|
||||||
|
uint8_t port0 = 0xff;
|
||||||
|
uint8_t port1 = 0xff;
|
||||||
|
|
||||||
|
if (row < MATRIX_ROWS_PER_SIDE) {
|
||||||
|
// select on atmega32u4
|
||||||
|
pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L;
|
||||||
|
pin_t pin = matrix_row_pins_mcu[row];
|
||||||
|
setPinOutput(pin);
|
||||||
|
writePinLow(pin);
|
||||||
|
} else {
|
||||||
|
// select on tca9555
|
||||||
|
if (tca9555_status) { // if there was an error
|
||||||
|
// do nothing
|
||||||
|
} else {
|
||||||
|
switch(row) {
|
||||||
|
case 4: port1 &= ~(1 << 0); break;
|
||||||
|
case 5: port1 &= ~(1 << 1); break;
|
||||||
|
case 6: port1 &= ~(1 << 2); break;
|
||||||
|
case 7: port0 &= ~(1 << 5); break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
|
||||||
|
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_write(OREGP0, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_write(port0, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_write(port1, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
// Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one.
|
||||||
|
// Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus.
|
||||||
|
out:
|
||||||
|
i2c_stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# 3W6
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
The 3w6 is a low profile, split ortholinear keyboard with 36 keys.
|
||||||
|
|
||||||
|
* Rev1:
|
||||||
|
- onboard microcontroller (ATMega32U4)
|
||||||
|
- USB-C connector Board <-> PC
|
||||||
|
- USB-C connectors between both split halfs
|
||||||
|
- choc spacing (18x17mm)
|
||||||
|
- aggressive pinky stagger
|
||||||
|
- support for Choc V1 switches
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [weteor](https://github.com/weteor)
|
||||||
|
* Hardware Supported:
|
||||||
|
* 3w6 rev1
|
||||||
|
* Hardware Availability (this is an older version, current revision is rev2):
|
||||||
|
* make one yourself: [Design and Productionfiles](https://github.com/weteor/3w6)
|
||||||
|
---
|
||||||
|
To reach the bootloader, connect the board to the PC and push the reset button on left half.
|
||||||
|
|
||||||
|
Make examples for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 3w6/rev1: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,17 @@
|
|||||||
|
/* Copyright 2021 weteor
|
||||||
|
*
|
||||||
|
* 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 "rev1.h"
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/* Copyright 2021 weteor
|
||||||
|
*
|
||||||
|
* 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 is 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( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09,\
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19,\
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29,\
|
||||||
|
k32, k33, k34, k35, k36, k37\
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04 }, \
|
||||||
|
{ k10, k11, k12, k13, k14 }, \
|
||||||
|
{ k20, k21, k22, k23, k24 }, \
|
||||||
|
{ KC_NO, KC_NO, k32, k33, k34 }, \
|
||||||
|
\
|
||||||
|
{ k05, k06, k07, k08, k09 }, \
|
||||||
|
{ k15, k16, k17, k18, k19 }, \
|
||||||
|
{ k25, k26, k27, k28, k29 }, \
|
||||||
|
{ k35, k36, k37, KC_NO, KC_NO }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# 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 = 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
|
||||||
|
UNICODE_ENABLE = yes
|
||||||
|
CUSTOM_MATRIX = lite
|
||||||
|
NO_USB_STARTUP_CHECK = yes
|
||||||
|
LTO_ENABLE = no
|
||||||
|
|
||||||
|
SRC += matrix.c
|
||||||
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 weteor
|
||||||
|
|
||||||
|
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 VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x4658
|
||||||
|
#define DEVICE_VER 0x0002
|
||||||
|
#define MANUFACTURER weteor
|
||||||
|
#define PRODUCT 3w6
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 10
|
||||||
|
|
||||||
|
#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
|
||||||
|
#define MATRIX_COLS_PER_SIDE (MATRIX_COLS / 2)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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_ROW_PINS_L { B0, B1, B2, B4}
|
||||||
|
#define MATRIX_COL_PINS_L { B3, E6, F7, B6, B5 }
|
||||||
|
#define UNUSED_PINS_L { B7, C6, C7, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6 }
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS_R { P10, P11, P12, P05 }
|
||||||
|
#define MATRIX_COL_PINS_R { P06, P13, P14, P01, P00 }
|
||||||
|
#define UNUSED_PINS_R { P02, P03, P04, P07, P15, P16, P17 }
|
||||||
|
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/* Copyright 2021 weteor
|
||||||
|
*
|
||||||
|
* 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 PIMORONI_TRACKBALL_INVERT_Y
|
||||||
|
#define PIMORONI_TRACKBALL_ROTATE
|
||||||
|
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 weteor
|
||||||
|
|
||||||
|
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
|
||||||
|
{
|
||||||
|
_ALPHA_QWERTY = 0,
|
||||||
|
_ALPHA_COLEMAK,
|
||||||
|
_SYM,
|
||||||
|
_NAV,
|
||||||
|
_NUM,
|
||||||
|
_CFG,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
|
||||||
|
[_ALPHA_QWERTY] = 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),
|
||||||
|
|
||||||
|
LCTL_T(KC_ESC), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL)
|
||||||
|
),
|
||||||
|
[_ALPHA_COLEMAK] = LAYOUT(
|
||||||
|
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT,
|
||||||
|
KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,
|
||||||
|
LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SCLN),
|
||||||
|
LCTL_T(KC_ENT), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL)
|
||||||
|
),
|
||||||
|
[_SYM] = LAYOUT(
|
||||||
|
KC_GRV , KC_CIRC, KC_AT, KC_DLR, KC_TILD, KC_AMPR, KC_EXLM, KC_PIPE, KC_UNDS, KC_HASH,
|
||||||
|
KC_SLSH, KC_LBRC, KC_LCBR, KC_LPRN, KC_EQL, KC_ASTR, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS,
|
||||||
|
_______, KC_QUES, KC_PLUS, KC_PERC, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, XXXXXXX, _______,
|
||||||
|
XXXXXXX, MO(_CFG), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
[_NAV] = LAYOUT(
|
||||||
|
XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_PGDN, KC_UP, KC_PGUP, KC_DEL,
|
||||||
|
KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_CFG), XXXXXXX
|
||||||
|
),
|
||||||
|
[_NUM] = LAYOUT(
|
||||||
|
XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PSLS,
|
||||||
|
XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_P0, KC_P4, KC_P5, KC_P6, KC_PDOT,
|
||||||
|
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PAST,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_PEQL, KC_PENT, XXXXXXX
|
||||||
|
),
|
||||||
|
[_CFG] = LAYOUT(
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,DF(_ALPHA_QWERTY), DF(_ALPHA_COLEMAK),
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <[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 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 "pimoroni_trackball.h"
|
||||||
|
#include "i2c_master.h"
|
||||||
|
|
||||||
|
static uint8_t scrolling = 0;
|
||||||
|
static int16_t x_offset = 0;
|
||||||
|
static int16_t y_offset = 0;
|
||||||
|
static int16_t h_offset = 0;
|
||||||
|
static int16_t v_offset = 0;
|
||||||
|
static float precisionSpeed = 1;
|
||||||
|
|
||||||
|
static uint16_t i2c_timeout_timer;
|
||||||
|
|
||||||
|
#ifndef I2C_TIMEOUT
|
||||||
|
# define I2C_TIMEOUT 100
|
||||||
|
#endif
|
||||||
|
#ifndef I2C_WAITCHECK
|
||||||
|
# define I2C_WAITCHECK 1000
|
||||||
|
#endif
|
||||||
|
#ifndef MOUSE_DEBOUNCE
|
||||||
|
# define MOUSE_DEBOUNCE 5
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) {
|
||||||
|
uint8_t data[] = {0x00, red, green, blue, white};
|
||||||
|
i2c_transmit(TRACKBALL_WRITE, data, sizeof(data), I2C_TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) {
|
||||||
|
int16_t offset = (int16_t)positive - (int16_t)negative;
|
||||||
|
int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed);
|
||||||
|
return offset < 0 ? -magnitude : magnitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
void update_member(int8_t* member, int16_t* offset) {
|
||||||
|
if (*offset > 127) {
|
||||||
|
*member = 127;
|
||||||
|
*offset -= 127;
|
||||||
|
} else if (*offset < -127) {
|
||||||
|
*member = -127;
|
||||||
|
*offset += 127;
|
||||||
|
} else {
|
||||||
|
*member = *offset;
|
||||||
|
*offset = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) {
|
||||||
|
if (pressed) {
|
||||||
|
mouse->buttons |= MOUSE_BTN1;
|
||||||
|
} else {
|
||||||
|
mouse->buttons &= ~MOUSE_BTN1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||||
|
if (true) {
|
||||||
|
xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!process_record_user(keycode, record)) { return false; }
|
||||||
|
|
||||||
|
/* If Mousekeys is disabled, then use handle the mouse button
|
||||||
|
* keycodes. This makes things simpler, and allows usage of
|
||||||
|
* the keycodes in a consistent manner. But only do this if
|
||||||
|
* Mousekeys is not enable, so it's not handled twice.
|
||||||
|
*/
|
||||||
|
#ifndef MOUSEKEY_ENABLE
|
||||||
|
if (IS_MOUSEKEY_BUTTON(keycode)) {
|
||||||
|
report_mouse_t currentReport = pointing_device_get_report();
|
||||||
|
if (record->event.pressed) {
|
||||||
|
currentReport.buttons |= 1 << (keycode - KC_MS_BTN1);
|
||||||
|
} else {
|
||||||
|
currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1));
|
||||||
|
}
|
||||||
|
pointing_device_set_report(currentReport);
|
||||||
|
pointing_device_send();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void trackball_register_button(bool pressed, enum mouse_buttons button) {
|
||||||
|
report_mouse_t currentReport = pointing_device_get_report();
|
||||||
|
if (pressed) {
|
||||||
|
currentReport.buttons |= button;
|
||||||
|
} else {
|
||||||
|
currentReport.buttons &= ~button;
|
||||||
|
}
|
||||||
|
pointing_device_set_report(currentReport);
|
||||||
|
}
|
||||||
|
|
||||||
|
float trackball_get_precision(void) { return precisionSpeed; }
|
||||||
|
void trackball_set_precision(float precision) { precisionSpeed = precision; }
|
||||||
|
bool trackball_is_scrolling(void) { return scrolling; }
|
||||||
|
void trackball_set_scrolling(bool scroll) { scrolling = scroll; }
|
||||||
|
|
||||||
|
|
||||||
|
__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x80, 0x00, 0x00, 0x00); }
|
||||||
|
|
||||||
|
void pointing_device_task(void) {
|
||||||
|
static bool debounce;
|
||||||
|
static uint16_t debounce_timer;
|
||||||
|
uint8_t state[5] = {};
|
||||||
|
if (timer_elapsed(i2c_timeout_timer) > I2C_WAITCHECK) {
|
||||||
|
if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
|
||||||
|
if (!state[4] && !debounce) {
|
||||||
|
if (scrolling) {
|
||||||
|
#ifdef PIMORONI_TRACKBALL_INVERT_X
|
||||||
|
h_offset += mouse_offset(state[2], state[3], 1);
|
||||||
|
#else
|
||||||
|
h_offset -= mouse_offset(state[2], state[3], 1);
|
||||||
|
#endif
|
||||||
|
#ifdef PIMORONI_TRACKBALL_INVERT_Y
|
||||||
|
v_offset += mouse_offset(state[1], state[0], 1);
|
||||||
|
#else
|
||||||
|
v_offset -= mouse_offset(state[1], state[0], 1);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
#ifdef PIMORONI_TRACKBALL_INVERT_X
|
||||||
|
x_offset -= mouse_offset(state[2], state[3], 5);
|
||||||
|
#else
|
||||||
|
x_offset += mouse_offset(state[2], state[3], 5);
|
||||||
|
#endif
|
||||||
|
#ifdef PIMORONI_TRACKBALL_INVERT_Y
|
||||||
|
y_offset -= mouse_offset(state[1], state[0], 5);
|
||||||
|
#else
|
||||||
|
y_offset += mouse_offset(state[1], state[0], 5);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (state[4]) {
|
||||||
|
debounce = true;
|
||||||
|
debounce_timer = timer_read();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
i2c_timeout_timer = timer_read();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false;
|
||||||
|
|
||||||
|
report_mouse_t mouse = pointing_device_get_report();
|
||||||
|
// trackball_check_click(state[4] & (1 << 7), &mouse);
|
||||||
|
|
||||||
|
#ifndef PIMORONI_TRACKBALL_ROTATE
|
||||||
|
update_member(&mouse.x, &x_offset);
|
||||||
|
update_member(&mouse.y, &y_offset);
|
||||||
|
update_member(&mouse.h, &h_offset);
|
||||||
|
update_member(&mouse.v, &v_offset);
|
||||||
|
#else
|
||||||
|
update_member(&mouse.x, &y_offset);
|
||||||
|
update_member(&mouse.y, &x_offset);
|
||||||
|
update_member(&mouse.h, &v_offset);
|
||||||
|
update_member(&mouse.v, &h_offset);
|
||||||
|
#endif
|
||||||
|
pointing_device_set_report(mouse);
|
||||||
|
pointing_device_send();
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <[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 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"
|
||||||
|
#include "pointing_device.h"
|
||||||
|
|
||||||
|
#ifndef TRACKBALL_ADDRESS
|
||||||
|
# define TRACKBALL_ADDRESS 0x0A
|
||||||
|
#endif
|
||||||
|
#define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE)
|
||||||
|
#define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ)
|
||||||
|
|
||||||
|
void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
|
||||||
|
void trackball_check_click(bool pressed, report_mouse_t *mouse);
|
||||||
|
void trackball_register_button(bool pressed, enum mouse_buttons button);
|
||||||
|
|
||||||
|
float trackball_get_precision(void);
|
||||||
|
void trackball_set_precision(float precision);
|
||||||
|
bool trackball_is_scrolling(void);
|
||||||
|
void trackball_set_scrolling(bool scroll);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
POINTING_DEVICE_ENABLE = yes
|
||||||
|
SRC += pimoroni_trackball.c
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
@@ -0,0 +1,275 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
|
||||||
|
2020 Pierre Chevalier <pierrechevalier83@gmail.com>
|
||||||
|
2021 weteor
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This code was heavily inspired by the ergodox_ez keymap, and modernized
|
||||||
|
* to take advantage of the quantum.h microcontroller agnostics gpio control
|
||||||
|
* abstractions and use the macros defined in config.h for the wiring as opposed
|
||||||
|
* to repeating that information all over the place.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "i2c_master.h"
|
||||||
|
|
||||||
|
extern i2c_status_t tca9555_status;
|
||||||
|
#define I2C_TIMEOUT 1000
|
||||||
|
|
||||||
|
// I2C address:
|
||||||
|
// All address pins of the tca9555 are connected to the ground
|
||||||
|
// | 0 | 1 | 0 | 0 | A2 | A1 | A0 |
|
||||||
|
// | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
||||||
|
#define I2C_ADDR 0b0100000
|
||||||
|
#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE)
|
||||||
|
#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ)
|
||||||
|
|
||||||
|
// Register addresses
|
||||||
|
#define IODIRA 0x06 // i/o direction register
|
||||||
|
#define IODIRB 0x07
|
||||||
|
#define IREGP0 0x00 // GPIO pull-up resistor register
|
||||||
|
#define IREGP1 0x01
|
||||||
|
#define OREGP0 0x02 // general purpose i/o port register (write modifies OLAT)
|
||||||
|
#define OREGP1 0x03
|
||||||
|
|
||||||
|
bool i2c_initialized = 0;
|
||||||
|
i2c_status_t tca9555_status = I2C_ADDR;
|
||||||
|
|
||||||
|
uint8_t init_tca9555(void) {
|
||||||
|
print("starting init");
|
||||||
|
tca9555_status = I2C_ADDR;
|
||||||
|
|
||||||
|
// I2C subsystem
|
||||||
|
if (i2c_initialized == 0) {
|
||||||
|
i2c_init(); // on pins D(1,0)
|
||||||
|
i2c_initialized = true;
|
||||||
|
wait_ms(I2C_TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set pin direction
|
||||||
|
// - unused : input : 1
|
||||||
|
// - input : input : 1
|
||||||
|
// - driving : output : 0
|
||||||
|
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_write(IODIRA, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
// This means: read all pins of port 0
|
||||||
|
tca9555_status = i2c_write(0b11111111, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
// This means: we will write on pins 0 to 3 on port 1. read rest
|
||||||
|
tca9555_status = i2c_write(0b11110000, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
|
||||||
|
out:
|
||||||
|
i2c_stop();
|
||||||
|
return tca9555_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* matrix state(1:on, 0:off) */
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
||||||
|
|
||||||
|
static matrix_row_t read_cols(uint8_t row);
|
||||||
|
static void init_cols(void);
|
||||||
|
static void unselect_rows(void);
|
||||||
|
static void select_row(uint8_t row);
|
||||||
|
|
||||||
|
static uint8_t tca9555_reset_loop;
|
||||||
|
|
||||||
|
void matrix_init_custom(void) {
|
||||||
|
// initialize row and col
|
||||||
|
|
||||||
|
tca9555_status = init_tca9555();
|
||||||
|
|
||||||
|
unselect_rows();
|
||||||
|
init_cols();
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_power_up(void) {
|
||||||
|
tca9555_status = init_tca9555();
|
||||||
|
|
||||||
|
unselect_rows();
|
||||||
|
init_cols();
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reads and stores a row, returning
|
||||||
|
// whether a change occurred.
|
||||||
|
static inline bool store_matrix_row(matrix_row_t current_matrix[], uint8_t index) {
|
||||||
|
matrix_row_t temp = read_cols(index);
|
||||||
|
if (current_matrix[index] != temp) {
|
||||||
|
current_matrix[index] = temp;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||||
|
if (tca9555_status) { // if there was an error
|
||||||
|
if (++tca9555_reset_loop == 0) {
|
||||||
|
// since tca9555_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
|
||||||
|
// this will be approx bit more frequent than once per second
|
||||||
|
dprint("trying to reset tca9555\n");
|
||||||
|
tca9555_status = init_tca9555();
|
||||||
|
if (tca9555_status) {
|
||||||
|
dprint("right side not responding\n");
|
||||||
|
} else {
|
||||||
|
dprint("right side attached\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool changed = false;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
||||||
|
// select rows from left and right hands
|
||||||
|
uint8_t left_index = i;
|
||||||
|
uint8_t right_index = i + MATRIX_ROWS_PER_SIDE;
|
||||||
|
select_row(left_index);
|
||||||
|
select_row(right_index);
|
||||||
|
|
||||||
|
// we don't need a 30us delay anymore, because selecting a
|
||||||
|
// left-hand row requires more than 30us for i2c.
|
||||||
|
|
||||||
|
changed |= store_matrix_row(current_matrix, left_index);
|
||||||
|
changed |= store_matrix_row(current_matrix, right_index);
|
||||||
|
|
||||||
|
unselect_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void init_cols(void) {
|
||||||
|
// init on tca9555
|
||||||
|
// not needed, already done as part of init_tca9555()
|
||||||
|
|
||||||
|
// init on mcu
|
||||||
|
pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L;
|
||||||
|
for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) {
|
||||||
|
pin_t pin = matrix_col_pins_mcu[pin_index];
|
||||||
|
setPinInput(pin);
|
||||||
|
writePinHigh(pin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static matrix_row_t read_cols(uint8_t row) {
|
||||||
|
if (row < MATRIX_ROWS_PER_SIDE) {
|
||||||
|
pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L;
|
||||||
|
matrix_row_t current_row_value = 0;
|
||||||
|
// For each col...
|
||||||
|
for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) {
|
||||||
|
// Select the col pin to read (active low)
|
||||||
|
uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]);
|
||||||
|
|
||||||
|
// Populate the matrix row with the state of the col pin
|
||||||
|
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
|
||||||
|
}
|
||||||
|
return current_row_value;
|
||||||
|
} else {
|
||||||
|
if (tca9555_status) { // if there was an error
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
uint8_t data = 0;
|
||||||
|
uint8_t port0 = 0;
|
||||||
|
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_write(IREGP0, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_read_nack(I2C_TIMEOUT);
|
||||||
|
if (tca9555_status < 0) goto out;
|
||||||
|
|
||||||
|
port0 = ~(uint8_t)tca9555_status;
|
||||||
|
|
||||||
|
// We read all the pins on GPIOA.
|
||||||
|
// The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero.
|
||||||
|
// The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys.
|
||||||
|
// the pins connected to eact columns are sequential, but in reverse order, and counting from zero down (col 5 -> GPIO04, col6 -> GPIO03 and so on).
|
||||||
|
data |= ( port0 & 0x01 ) << 4;
|
||||||
|
data |= ( port0 & 0x02 ) << 2;
|
||||||
|
data |= ( port0 & 0x04 );
|
||||||
|
data |= ( port0 & 0x08 ) >> 2;
|
||||||
|
data |= ( port0 & 0x10 ) >> 4;
|
||||||
|
|
||||||
|
tca9555_status = I2C_STATUS_SUCCESS;
|
||||||
|
out:
|
||||||
|
i2c_stop();
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unselect_rows(void) {
|
||||||
|
// no need to unselect on tca9555, because the select step sets all
|
||||||
|
// the other row bits high, and it's not changing to a different
|
||||||
|
// direction
|
||||||
|
|
||||||
|
// unselect rows on microcontroller
|
||||||
|
pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L;
|
||||||
|
for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) {
|
||||||
|
pin_t pin = matrix_row_pins_mcu[pin_index];
|
||||||
|
setPinInput(pin);
|
||||||
|
writePinLow(pin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_row(uint8_t row) {
|
||||||
|
uint8_t port1 = 0xff;
|
||||||
|
|
||||||
|
if (row < MATRIX_ROWS_PER_SIDE) {
|
||||||
|
// select on atmega32u4
|
||||||
|
pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L;
|
||||||
|
pin_t pin = matrix_row_pins_mcu[row];
|
||||||
|
setPinOutput(pin);
|
||||||
|
writePinLow(pin);
|
||||||
|
} else {
|
||||||
|
// select on tca9555
|
||||||
|
if (tca9555_status) { // if there was an error
|
||||||
|
// do nothing
|
||||||
|
} else {
|
||||||
|
switch(row) {
|
||||||
|
case 4: port1 &= ~(1 << 0); break;
|
||||||
|
case 5: port1 &= ~(1 << 1); break;
|
||||||
|
case 6: port1 &= ~(1 << 2); break;
|
||||||
|
case 7: port1 &= ~(1 << 3); break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one.
|
||||||
|
// Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus.
|
||||||
|
tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_write(OREGP1, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
tca9555_status = i2c_write(port1, I2C_TIMEOUT);
|
||||||
|
if (tca9555_status) goto out;
|
||||||
|
out:
|
||||||
|
i2c_stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# 3W6
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
The 3w6 is a low profile, split ortholinear keyboard with 36 keys.
|
||||||
|
|
||||||
|
* Rev2:
|
||||||
|
- onboard microcontroller (ATMega32U4)
|
||||||
|
- USB-C connector Board <-> PC
|
||||||
|
- USB-C connectors between both split halfs
|
||||||
|
- choc spacing (18x17mm)
|
||||||
|
- aggressive pinky stagger
|
||||||
|
- support for Choc V1 switches
|
||||||
|
- files for midplate (1.6 to 2mm)
|
||||||
|
- support for [Pimoroni Trackball](https://shop.pimoroni.com/products/trackball-breakout) instead of outer thumb switch on right half, needs midplate
|
||||||
|
- mounting holes for [Tenting Puck](https://splitkb.com/collections/keyboard-parts/products/tenting-puck), only usable without mid or switchplate
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [weteor](https://github.com/weteor)
|
||||||
|
* Hardware Supported:
|
||||||
|
* 3w6 rev2 (with Pimoroni support)
|
||||||
|
* Hardware Availability:
|
||||||
|
* make one yourself: [Design and Productionfiles](https://github.com/weteor/3w6)
|
||||||
|
* maintainer is selling kits when available
|
||||||
|
|
||||||
|
---
|
||||||
|
To reach the bootloader, connect the board to the PC and push the reset button on left half.
|
||||||
|
|
||||||
|
Make examples for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 3w6/rev2:default
|
||||||
|
make 3w6/rev2:default_pimoroni
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
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,17 @@
|
|||||||
|
/* Copyright 2021 weteor
|
||||||
|
*
|
||||||
|
* 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 "rev2.h"
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/* Copyright 2021 weteor
|
||||||
|
*
|
||||||
|
* 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 is 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( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09,\
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19,\
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29,\
|
||||||
|
k32, k33, k34, k35, k36, k37\
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04 }, \
|
||||||
|
{ k10, k11, k12, k13, k14 }, \
|
||||||
|
{ k20, k21, k22, k23, k24 }, \
|
||||||
|
{ KC_NO, KC_NO, k32, k33, k34 }, \
|
||||||
|
\
|
||||||
|
{ k05, k06, k07, k08, k09 }, \
|
||||||
|
{ k15, k16, k17, k18, k19 }, \
|
||||||
|
{ k25, k26, k27, k28, k29 }, \
|
||||||
|
{ k35, k36, k37, KC_NO, KC_NO }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# 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 = 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
|
||||||
|
UNICODE_ENABLE = yes
|
||||||
|
CUSTOM_MATRIX = lite
|
||||||
|
NO_USB_STARTUP_CHECK = yes
|
||||||
|
LTO_ENABLE = no
|
||||||
|
|
||||||
|
SRC += matrix.c
|
||||||
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# AJP10304 Custom Shark Layout
|
# AJP10304 Custom Shark Layout
|
||||||
# Also available for the Planck, JJ40 and Atreus50
|
# Also available for the Planck, Quark, JJ40 and Atreus50
|
||||||
|
|
||||||
**Note:** In the tables below where there are two characters on a key,
|
**Note:** In the tables below where there are two characters on a key,
|
||||||
the second is the output when shift is applied.
|
the second is the output when shift is applied.
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/* Copyright 2021 Nathan Spears
|
||||||
|
*
|
||||||
|
* 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 0x7070
|
||||||
|
#define PRODUCT_ID 0x5342
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Nasp
|
||||||
|
#define PRODUCT QUARK²
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { C5, C4, C6, C7 }
|
||||||
|
#define MATRIX_COL_PINS { B4, B5, B6, B3, C2, B2, D6, D2, D3, D4, D5, B1 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
// ws2812 options
|
||||||
|
#define RGB_DI_PIN D0 // pin the DI on the ws2812 is hooked-up to
|
||||||
|
#define RGBLIGHT_ANIMATIONS // run RGB animations
|
||||||
|
#define RGBLED_NUM 14 // number of LEDs
|
||||||
|
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
|
||||||
|
#define RGBLIGHT_SAT_STEP 12 // units to step when in/decresing saturation
|
||||||
|
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Quark_Squared",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "nasp",
|
||||||
|
"width": 12,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ortho_2x225u": {
|
||||||
|
"layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Super", "x":1.25, "y":3, "w":1.25}, {"label":"Alt", "x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":2.25}, {"x":6, "y":3, "w":2.25}, {"label":"Alt", "x":8.25, "y":3, "w":1.25}, {"label":"Super", "x":9.5, "y":3, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":3, "w":1.25}]
|
||||||
|
},
|
||||||
|
"LAYOUT_ortho_2u": {
|
||||||
|
"layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Alt", "x":1.25, "y":3, "w":1.25}, {"label":"Super", "x":2.5, "y":3, "w":1.25}, {"label":"⇓", "x":3.75, "y":3, "w":1.25}, {"x":5, "y":3, "w":2}, {"label":"←", "x":7, "y":3, "w":1.25}, {"label":"↓", "x":8.25, "y":3, "w":1.25}, {"label":"↑", "x":9.5, "y":3, "w":1.25}, {"label":"→", "x":10.75, "y":3, "w":1.25}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2021 Nathan Spears
|
||||||
|
*
|
||||||
|
* 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 TAPPING_TOGGLE 2
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
/* Copyright 2021 Nathan Spears
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// Defines for task manager and such
|
||||||
|
#define CALTDEL LCTL(LALT(KC_DEL))
|
||||||
|
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* [0]
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* |------------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||||
|
* |------------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | CTL & ESC | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift | Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |-------+-------+-------+-------+-------+-------+------+------+------+------+------+------|
|
||||||
|
* | PRINT | OS | Alt | Layer | Space & Layer | [ | ] | CAPS |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_ortho_2u(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||||
|
CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
KC_GRV, KC_LGUI, KC_LALT, TT(1), KC_SPC, TT(2), CALTDEL, KC_RALT, KC_CAPS
|
||||||
|
),
|
||||||
|
|
||||||
|
/* [1]
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* |------------+------+------+------+------+------+------+------+------+------+------+----|
|
||||||
|
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BCKSPC |
|
||||||
|
* |------------+------+------+------+------+-------------+------+------+------+------+----|
|
||||||
|
* | \ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | / |
|
||||||
|
* |------------+------+------+------+------+------|------+------+------+------+------+----|
|
||||||
|
* | | | | | | | | + | = | | | |
|
||||||
|
* |-------+-------+-------+-------+-------+-------+------+------+------+------+------+----|
|
||||||
|
* | ESC | CTRL-ALT-DEL | TASK | | | '|' | ` | |
|
||||||
|
* `---------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT_ortho_2u(
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||||
|
KC_SLSH, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_PPLS, KC_EQL, _______, _______, _______,
|
||||||
|
KC_ESC, CALTDEL, TSKMGR, _______, _______, _______, KC_NUBS, KC_GRV, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* [2]
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* |------------+------+------+------+------+------+------+------+------+------+------+---|
|
||||||
|
* | | | | UP | | | | _ | | [ | ] | |
|
||||||
|
* |------------+------+------+------+------+-------------+------+------+------+------+---|
|
||||||
|
* | | | LEFT | DOWN | RIGHT | | | - | | [ | ] | |
|
||||||
|
* |------------+------+------+------+------+-----+-----+------+------+------+------+-----|
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |-------+-------+-------+-------+-------+-------+------+------+------+------+------+---|
|
||||||
|
* | RESET | | | | | | | |
|
||||||
|
* `---------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[2] = LAYOUT_ortho_2u(
|
||||||
|
_______, _______, _______, KC_UP, _______, _______, _______, KC_UNDS, _______, KC_LBRC, KC_RBRC, _______,
|
||||||
|
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, _______, KC_LCBR, KC_RCBR, _______,
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
RESET, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2021 Nathan Spears
|
||||||
|
*
|
||||||
|
* 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 TAPPING_TOGGLE 2
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
/* Copyright 2021 Nathan Spears
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// Defines for task manager and such
|
||||||
|
#define CALTDEL LCTL(LALT(KC_DEL))
|
||||||
|
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* [0]
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* |------------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||||
|
* |------------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | CTL & ESC | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift | Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |-------+-------+-------+-------+-------+-------+------+------+------+------+------+------|
|
||||||
|
* | PRINT | OS | Alt | Layer | Space & Layer | [ | ] | CAPS |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_ortho_2x225u2u(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||||
|
CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
KC_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, CALTDEL, KC_RALT, KC_CAPS
|
||||||
|
),
|
||||||
|
|
||||||
|
/* [1]
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* |------------+------+------+------+------+------+------+------+------+------+------+----|
|
||||||
|
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BCKSPC |
|
||||||
|
* |------------+------+------+------+------+-------------+------+------+------+------+----|
|
||||||
|
* | \ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | / |
|
||||||
|
* |------------+------+------+------+------+------|------+------+------+------+------+----|
|
||||||
|
* | | | | | | | | + | = | | | |
|
||||||
|
* |-------+-------+-------+-------+-------+-------+------+------+------+------+------+----|
|
||||||
|
* | ESC | CTRL-ALT-DEL | TASK | | | '|' | ` | |
|
||||||
|
* `---------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT_ortho_2x225u(
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||||
|
KC_SLSH, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_PPLS, KC_EQL, _______, _______, _______,
|
||||||
|
KC_ESC, CALTDEL, TSKMGR, _______, _______, KC_NUBS, KC_GRV, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* [2]
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* |------------+------+------+------+------+------+------+------+------+------+------+---|
|
||||||
|
* | | | | UP | | | | _ | | [ | ] | |
|
||||||
|
* |------------+------+------+------+------+-------------+------+------+------+------+---|
|
||||||
|
* | | | LEFT | DOWN | RIGHT | | | - | | [ | ] | |
|
||||||
|
* |------------+------+------+------+------+-----+-----+------+------+------+------+-----|
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |-------+-------+-------+-------+-------+-------+------+------+------+------+------+---|
|
||||||
|
* | RESET | | | | | | | |
|
||||||
|
* `---------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[2] = LAYOUT_ortho_2x225u(
|
||||||
|
_______, _______, _______, KC_UP, _______, _______, _______, KC_UNDS, _______, KC_LBRC, KC_RBRC, _______,
|
||||||
|
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, _______, KC_LCBR, KC_RCBR, _______,
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
RESET, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2021 Nathan Spears
|
||||||
|
*
|
||||||
|
* 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 TAPPING_TOGGLE 2
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
/* Copyright 2021 Nathan Spears
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// Defines for task manager and such
|
||||||
|
#define CALTDEL LCTL(LALT(KC_DEL))
|
||||||
|
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* [0]
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* |------------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||||
|
* |------------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | CTL & ESC | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift | Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |-------+-------+-------+-------+-------+-------+------+------+------+------+------+------|
|
||||||
|
* | PRINT | OS | Alt | Layer | Space & Layer | [ | ] | CAPS |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_ortho_2x225u(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||||
|
CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
KC_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, CALTDEL, KC_RALT, KC_CAPS
|
||||||
|
),
|
||||||
|
|
||||||
|
/* [1]
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* |------------+------+------+------+------+------+------+------+------+------+------+----|
|
||||||
|
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BCKSPC |
|
||||||
|
* |------------+------+------+------+------+-------------+------+------+------+------+----|
|
||||||
|
* | \ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | / |
|
||||||
|
* |------------+------+------+------+------+------|------+------+------+------+------+----|
|
||||||
|
* | | | | | | | | + | = | | | |
|
||||||
|
* |-------+-------+-------+-------+-------+-------+------+------+------+------+------+----|
|
||||||
|
* | ESC | CTRL-ALT-DEL | TASK | | | '|' | ` | |
|
||||||
|
* `---------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[1] = LAYOUT_ortho_2x225u(
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||||
|
KC_SLSH, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_PPLS, KC_EQL, _______, _______, _______,
|
||||||
|
KC_ESC, CALTDEL, TSKMGR, _______, _______, KC_NUBS, KC_GRV, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* [2]
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* |------------+------+------+------+------+------+------+------+------+------+------+---|
|
||||||
|
* | | | | UP | | | | _ | | [ | ] | |
|
||||||
|
* |------------+------+------+------+------+-------------+------+------+------+------+---|
|
||||||
|
* | | | LEFT | DOWN | RIGHT | | | - | | [ | ] | |
|
||||||
|
* |------------+------+------+------+------+-----+-----+------+------+------+------+-----|
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |-------+-------+-------+-------+-------+-------+------+------+------+------+------+---|
|
||||||
|
* | RESET | | | | | | | |
|
||||||
|
* `---------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[2] = LAYOUT_ortho_2x225u(
|
||||||
|
_______, _______, _______, KC_UP, _______, _______, _______, KC_UNDS, _______, KC_LBRC, KC_RBRC, _______,
|
||||||
|
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, _______, KC_LCBR, KC_RCBR, _______,
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
RESET, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* [3]
|
||||||
|
* ,---------------------------------------------------------------------------------------.
|
||||||
|
* |------------+------+------+------+------+------+------+------+------+------+------+---|
|
||||||
|
* | | | | UP | | | | _ | | [ | ] | |
|
||||||
|
* |------------+------+------+------+------+-------------+------+------+------+------+---|
|
||||||
|
* | | | LEFT | DOWN | RIGHT | | | - | | [ | ] | |
|
||||||
|
* |------------+------+------+------+------+-----+-----+------+------+------+------+-----|
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |-------+-------+-------+-------+-------+-------+------+------+------+------+------+---|
|
||||||
|
* | RESET | | | | | | | |
|
||||||
|
* `---------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[3] = LAYOUT_ortho_2x225u(
|
||||||
|
_______, _______, _______, KC_UP, _______, _______, _______, KC_UNDS, _______, KC_LBRC, KC_RBRC, _______,
|
||||||
|
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, _______, KC_LCBR, KC_RCBR, _______,
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
RESET, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2021 Nathan Spears
|
||||||
|
*
|
||||||
|
* 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 "quark_squared.h"
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/* Copyright 2021 Nathan Spears
|
||||||
|
*
|
||||||
|
* 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 XXX KC_NO
|
||||||
|
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_2x225u( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \
|
||||||
|
k30, k31, k33, k34, k36, k38, k39, k3B \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \
|
||||||
|
{ k30, k31, XXX, k33, k34, XXX, k36, XXX, k38, k39, XXX, k3B } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_2u( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \
|
||||||
|
k30, k31, k33, k34, k35, k36, k38, k39, k3B \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \
|
||||||
|
{ k30, k31, XXX, k33, k34, k35, k36, XXX, k38, k39, XXX, k3B } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Quark_Squared
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The Quark² PCB is a hotswap version of the Quark PCB. Just like the OG, it has a modified layout than a traditonal 4x12 ortholinear keyboard.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Nasp](https://github.com/npspears)
|
||||||
|
* Hardware Supported: Planck
|
||||||
|
* Hardware Availability: https://www.checkerboards.xyz/Quark2_p_35.html
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make checkerboards:quark_squared: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,27 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # 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 = 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 = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
UNICODE_ENABLE = yes # Unicode
|
||||||
|
|
||||||
|
# Disable unsupported hardware
|
||||||
|
AUDIO_SUPPORTED = no
|
||||||
|
BACKLIGHT_SUPPORTED = no
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019-2021 iw0rm3r, tiltowait
|
||||||
|
|
||||||
|
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 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0000
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER tiltowait
|
||||||
|
#define PRODUCT IBM Model M Space-Saving Keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 16
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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_COL_PINS { C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D5, D4, D3, D2, D1 }
|
||||||
|
#define MATRIX_ROW_PINS { F0, F1, F2, F3, F4, F5, F6, F7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* The Model M does not have NKRO */
|
||||||
|
#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
#define LED_NUM_LOCK_PIN B4
|
||||||
|
#define LED_CAPS_LOCK_PIN B6
|
||||||
|
#define LED_SCROLL_LOCK_PIN B5
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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,457 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "IBM Model M Space-Saving Keyboard",
|
||||||
|
"url": "https://github.com/tiltowait/qmk_firmware/tree/modelm_ssk/keyboards/converter/modelm_ssk",
|
||||||
|
"maintainer": "tiltowait",
|
||||||
|
"width": 17.75,
|
||||||
|
"height": 6.5,
|
||||||
|
"layouts":
|
||||||
|
{
|
||||||
|
"LAYOUT":
|
||||||
|
{
|
||||||
|
"layout":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"label": "Esc",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F1",
|
||||||
|
"x": 2,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F2",
|
||||||
|
"x": 3,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F3",
|
||||||
|
"x": 4,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F4",
|
||||||
|
"x": 5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F5",
|
||||||
|
"x": 6.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F6",
|
||||||
|
"x": 7.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F7",
|
||||||
|
"x": 8.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F8",
|
||||||
|
"x": 9.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F9",
|
||||||
|
"x": 11,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F10",
|
||||||
|
"x": 12,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F11",
|
||||||
|
"x": 13,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F12",
|
||||||
|
"x": 14,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "PrtSc",
|
||||||
|
"x": 15.25,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Scroll Lock",
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Pause",
|
||||||
|
"x": 17.25,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "~",
|
||||||
|
"x": 0,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "!",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "@",
|
||||||
|
"x": 2,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "#",
|
||||||
|
"x": 3,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "$",
|
||||||
|
"x": 4,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "%",
|
||||||
|
"x": 5,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "^",
|
||||||
|
"x": 6,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "&",
|
||||||
|
"x": 7,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "*",
|
||||||
|
"x": 8,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "(",
|
||||||
|
"x": 9,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": ")",
|
||||||
|
"x": 10,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "_",
|
||||||
|
"x": 11,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "+",
|
||||||
|
"x": 12,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Backspace",
|
||||||
|
"x": 13,
|
||||||
|
"y": 1.5,
|
||||||
|
"w": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Insert",
|
||||||
|
"x": 15.25,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Home",
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "PgUp",
|
||||||
|
"x": 17.25,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Tab",
|
||||||
|
"x": 0,
|
||||||
|
"y": 2.5,
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Q",
|
||||||
|
"x": 1.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "W",
|
||||||
|
"x": 2.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "E",
|
||||||
|
"x": 3.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "R",
|
||||||
|
"x": 4.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "T",
|
||||||
|
"x": 5.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Y",
|
||||||
|
"x": 6.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "U",
|
||||||
|
"x": 7.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "I",
|
||||||
|
"x": 8.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "O",
|
||||||
|
"x": 9.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "P",
|
||||||
|
"x": 10.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "{",
|
||||||
|
"x": 11.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "}",
|
||||||
|
"x": 12.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "|",
|
||||||
|
"x": 13.5,
|
||||||
|
"y": 2.5,
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Delete",
|
||||||
|
"x": 15.25,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "End",
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "PgDn",
|
||||||
|
"x": 17.25,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Caps Lock",
|
||||||
|
"x": 0,
|
||||||
|
"y": 3.5,
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "A",
|
||||||
|
"x": 1.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "S",
|
||||||
|
"x": 2.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "D",
|
||||||
|
"x": 3.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F",
|
||||||
|
"x": 4.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "G",
|
||||||
|
"x": 5.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "H",
|
||||||
|
"x": 6.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "J",
|
||||||
|
"x": 7.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "K",
|
||||||
|
"x": 8.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "L",
|
||||||
|
"x": 9.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": ":",
|
||||||
|
"x": 10.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "\"",
|
||||||
|
"x": 11.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "~",
|
||||||
|
"x": 12.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Enter",
|
||||||
|
"x": 13.75,
|
||||||
|
"y": 3.5,
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Shift",
|
||||||
|
"x": 0,
|
||||||
|
"y": 4.5,
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "|",
|
||||||
|
"x": 1.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Z",
|
||||||
|
"x": 2.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "X",
|
||||||
|
"x": 3.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "C",
|
||||||
|
"x": 4.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "V",
|
||||||
|
"x": 5.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "B",
|
||||||
|
"x": 6.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "N",
|
||||||
|
"x": 7.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "M",
|
||||||
|
"x": 8.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "<",
|
||||||
|
"x": 9.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": ">",
|
||||||
|
"x": 10.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "?",
|
||||||
|
"x": 11.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Shift",
|
||||||
|
"x": 12.25,
|
||||||
|
"y": 4.5,
|
||||||
|
"w": 2.75
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "↑",
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Ctrl",
|
||||||
|
"x": 0,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alt",
|
||||||
|
"x": 2.5,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 4,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alt",
|
||||||
|
"x": 11,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Ctrl",
|
||||||
|
"x": 13.5,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "←",
|
||||||
|
"x": 15.25,
|
||||||
|
"y": 5.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "↓",
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 5.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "→",
|
||||||
|
"x": 17.25,
|
||||||
|
"y": 5.5
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
/* Copyright 2019-2021 iw0rm3r, tiltowait
|
||||||
|
*
|
||||||
|
* 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 custom_layers {
|
||||||
|
_BASE,
|
||||||
|
_NUMPAD,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
NUM_SCRL = SAFE_RANGE
|
||||||
|
};
|
||||||
|
|
||||||
|
void toggle_numpad_layer(int set_state);
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT( /* Base layer */
|
||||||
|
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, NUM_SCRL, KC_PAUS,
|
||||||
|
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_INS, KC_HOME, KC_PGUP,
|
||||||
|
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, KC_DEL, KC_END, KC_PGDN,
|
||||||
|
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_NUHS, KC_ENT,
|
||||||
|
KC_LSFT, KC_NUBS, 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_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[_NUMPAD] = LAYOUT( /* Numpad Layer */
|
||||||
|
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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_7, KC_KP_8, KC_KP_9, KC_TRNS, KC_KP_MINUS, KC_KP_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_4, KC_KP_5, KC_KP_6, 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_KP_1, KC_KP_2, KC_KP_3, KC_KP_ASTERISK, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_0, KC_TRNS, KC_KP_DOT, KC_KP_SLASH, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
static uint16_t last_num_scroll = 0; /* For unregistering the proper key */
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case NUM_SCRL: /* Numlock / Scroll Lock */
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (get_mods() & MOD_MASK_SHIFT) {
|
||||||
|
/* Remove the shift modifiers */
|
||||||
|
uint8_t shift_mods = get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT));
|
||||||
|
del_mods(MOD_MASK_SHIFT);
|
||||||
|
|
||||||
|
last_num_scroll = KC_NUMLOCK;
|
||||||
|
register_code(last_num_scroll);
|
||||||
|
toggle_numpad_layer(-1);
|
||||||
|
|
||||||
|
/* Reset the shift modifiers */
|
||||||
|
set_mods(shift_mods);
|
||||||
|
} else {
|
||||||
|
last_num_scroll = KC_SCROLLLOCK;
|
||||||
|
register_code(last_num_scroll);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
unregister_code(last_num_scroll);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void toggle_numpad_layer(int set_state) {
|
||||||
|
static uint8_t numlock_enabled = 0;
|
||||||
|
|
||||||
|
/* set_state allows us to explicitly change the numlock state
|
||||||
|
rather than merely toggling it. */
|
||||||
|
if (set_state == -1) {
|
||||||
|
numlock_enabled = !numlock_enabled;
|
||||||
|
} else {
|
||||||
|
numlock_enabled = set_state;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numlock_enabled) {
|
||||||
|
layer_on(_NUMPAD);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
layer_off(_NUMPAD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool led_update_user(led_t led_state) {
|
||||||
|
/* In rare and unlikely conditions, it's possible for numlock
|
||||||
|
state to change externally from the keyboard. If this happens,
|
||||||
|
we want to match the new state.
|
||||||
|
|
||||||
|
On Windows and Linux, this means that the keyboard will technically
|
||||||
|
toggle the numpad layer twice.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static int8_t numlock_state = -1; /* Unknown state at default */
|
||||||
|
|
||||||
|
if (led_state.num_lock != numlock_state) {
|
||||||
|
numlock_state = led_state.num_lock;
|
||||||
|
toggle_numpad_layer(led_state.num_lock);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for modelm_ssk
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/* Copyright 2021 tiltowait
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#define PERMISSIVE_HOLD
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
/* Copyright 2021 tiltowait
|
||||||
|
*
|
||||||
|
* 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 custom_layers {
|
||||||
|
_BASE,
|
||||||
|
_SECOND,
|
||||||
|
_NUMPAD,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
NUM_SCRL = SAFE_RANGE /* Dual-purpose Scroll Lock / Numlock button as on original hardware */
|
||||||
|
};
|
||||||
|
|
||||||
|
void toggle_numlock_layer(int set_state);
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT( /* Base layer */
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_MUTE, KC_F10, KC_VOLD, KC_VOLU, S(G(KC_4)), NUM_SCRL, KC_PAUS,
|
||||||
|
|
||||||
|
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_BSLS, KC_INS, KC_HOME, KC_PGUP,
|
||||||
|
LT(_SECOND,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_BSPC, KC_DEL, KC_END, KC_PGDN,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||||
|
KC_LSFT, KC_NUBS, 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_LALT, LGUI_T(KC_ENT), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[_SECOND] = LAYOUT( /* Layer 1 */
|
||||||
|
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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(A(KC_MINS)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, C(KC_LEFT), C(KC_RGHT), 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, S(A(KC_M)), KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, C(KC_SPC), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
[_NUMPAD] = LAYOUT( /* Numpad Layer */
|
||||||
|
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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_7, KC_KP_8, KC_KP_9, KC_TRNS, KC_KP_MINUS, KC_KP_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_4, KC_KP_5, KC_KP_6, 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_KP_1, KC_KP_2, KC_KP_3, KC_KP_ASTERISK, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_0, KC_TRNS, KC_KP_DOT, KC_KP_SLASH, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
static uint16_t last_num_scroll = 0; /* For unregistering the proper key */
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case NUM_SCRL:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (get_mods() & MOD_MASK_SHIFT) {
|
||||||
|
/* Remove the shift modifiers */
|
||||||
|
uint8_t shift_mods = get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT));
|
||||||
|
set_mods(get_mods() & ~(MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) );
|
||||||
|
|
||||||
|
last_num_scroll = KC_NUMLOCK;
|
||||||
|
register_code(last_num_scroll);
|
||||||
|
toggle_numlock_layer(-1);
|
||||||
|
|
||||||
|
/* Reset the shift modifiers */
|
||||||
|
set_mods(shift_mods);
|
||||||
|
} else {
|
||||||
|
last_num_scroll = KC_SCROLLLOCK;
|
||||||
|
register_code(last_num_scroll);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
unregister_code(last_num_scroll);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void toggle_numlock_layer(int set_state) {
|
||||||
|
static uint8_t numlock_enabled = 0;
|
||||||
|
|
||||||
|
/* set_state allows us to explicitly change the numlock state
|
||||||
|
rather than merely toggling it. */
|
||||||
|
if (set_state == -1) {
|
||||||
|
numlock_enabled = !numlock_enabled;
|
||||||
|
} else {
|
||||||
|
numlock_enabled = set_state;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numlock_enabled) {
|
||||||
|
layer_on(_NUMPAD);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
layer_off(_NUMPAD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool led_update_kb(led_t led_state) {
|
||||||
|
static int8_t numlock_state = -1;
|
||||||
|
|
||||||
|
if (led_state.num_lock != numlock_state) {
|
||||||
|
numlock_state = led_state.num_lock;
|
||||||
|
toggle_numlock_layer(led_state.num_lock);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# The maintainer's personal keymap for modelm_ssk
|
||||||
|
|
||||||
|
This is a keymap suitable for macOS use.
|
||||||
|
|
||||||
|
* Backspace and backslash have been swapped (HHKB style)
|
||||||
|
* Capslock is LCTRL
|
||||||
|
* LCTRL is LALT
|
||||||
|
* LALT is LGUI
|
||||||
|
* Tab shifts to layer 1 on hold
|
||||||
|
* Layer 1 has a couple of Mac shortcuts, plus Vim-style arrow keys
|
||||||
|
* Shift+Numlock enables numlock
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2019 iw0rm3r
|
||||||
|
*
|
||||||
|
* 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 "modelm_ssk.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/* Copyright 2019-2021 iw0rm3r, tiltowait
|
||||||
|
*
|
||||||
|
* 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 "names" for physical keys of the keyboard
|
||||||
|
* and defines their position on the board.
|
||||||
|
* The second section defines position of the keys on the switch matrix
|
||||||
|
* (where COLUMNS and ROWS crosses). */
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \
|
||||||
|
\
|
||||||
|
K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, \
|
||||||
|
K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, \
|
||||||
|
K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, \
|
||||||
|
K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, \
|
||||||
|
K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
/* 00 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, KC_NO, K0F, K0D }, \
|
||||||
|
/* 01 */ { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, KC_NO, KC_NO, KC_NO, KC_NO, K5P, KC_NO }, \
|
||||||
|
/* 02 */ { KC_NO, KC_NO, K2B, K2C, K2D, K2E, K3N, K2H, K2I, K2J, K2K, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
/* 03 */ { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, KC_NO, KC_NO, KC_NO, KC_NO, K5O }, \
|
||||||
|
/* 04 */ { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \
|
||||||
|
/* 05 */ { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \
|
||||||
|
/* 06 */ { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
/* 07 */ { KC_NO, KC_NO, K5A, KC_NO, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, KC_NO, KC_NO, K1N, K0B }, \
|
||||||
|
}
|
||||||
|
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
# modelm_ssk
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This is a QMK firmware configuration for the IBM Model M Space-Saving Keyboard (SSK). Based on [this project](https://github.com/qmk/qmk_firmware/tree/master/keyboards/converter/modelm101), it features a few slight improvements and, most importantly, a full remapping to match the SSK's matrix, which differs from its full-sized cousins. The modification is easily reversible, as no part of the keyboard is permanently changed. Just take out the replacement controller and reinstall the original, should you desire.
|
||||||
|
|
||||||
|
The numpad layer (accessed with Shift + Scroll Lock as with the original controller) is mapped to layer 7 by default. All non-numpad keys are transparent.
|
||||||
|
|
||||||
|
**Note:** As of this writing, this configuration has only been tested on the 1392464 SSK. It's possible other models differ in their internal matrices. Should the provided matrix not work for you (and you are certain of your connections), you can enable debugging with `CONSOLE_ENABLE = yes` in `rules.mk` and by following the directions in `default/keymap.c`. Once done, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) will display row/col information to help you remap `modelm_ssk.h`.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
* [Teensy++ 2.0](https://www.pjrc.com/store/teensypp.html) - I recommend buying one with pins already attached
|
||||||
|
* A Trio-Mate 16-pin ribbon connector (6-520315-6 or 6-520415-6)
|
||||||
|
* A Trio-Mate 8-pin ribbon connector (5-120628-8 or 5-520314-8). Alternatively, two 16-pin connectors can be used if the 8-pin is out of stock. Just be sure to line up your pins correctly
|
||||||
|
* Breadboard or perfboard. A perfboard is recommended due to its reduced height and low clearance inside the chassis
|
||||||
|
* Mini-B to USB-A cable
|
||||||
|
* Jumper wires and wire strippers/cutters
|
||||||
|
* Soldering iron if not using a breadboard
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The controller uses the following mapping (in zero-indexed hex):
|
||||||
|
|
||||||
|
```
|
||||||
|
Column: 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
||||||
|
Pin: C7 C6 C5 C4 C3 C2 C1 C0 E1 E0 D7 D5 D4 D3 D2 D1
|
||||||
|
--------------------------------------------------------
|
||||||
|
Row: 0 1 2 3 4 5 6 7
|
||||||
|
Pin: F0 F1 F2 F3 F4 F5 F6 F7
|
||||||
|
```
|
||||||
|
|
||||||
|
**IMPORTANT:** It is necessary to skip pin D6 on the Teensy. There is an LED attached to this pin, which can cause interference with registering keys. Alternatively, you can remove the LED from the board, which is likely to be a permanent modification of the Teensy. The choice is yours. I am not responsible for any damage to your Teensy or keyboard.
|
||||||
|
|
||||||
|
## A note on the Unicomp Mini M
|
||||||
|
|
||||||
|
This configuration will not work out of the box with the [Unicomp Mini M](https://www.pckeyboard.com/page/product/MINI_M). That keyboard uses a 16x12 matrix rather than the SSK's 16x8 in order to reduce occurrences of 2KRO lockup. It also features lock lights, which the SSK lacks. However, it should be possible to map out the Mini M's matrix to get it working.
|
||||||
|
|
||||||
|
## Maintainer
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [tiltowait](https://github.com/tiltowait), original work by [iw0rm3r](https://github.com/iw0rm3r)
|
||||||
|
* Hardware Supported: Teensy 2.0++ board by PJRC
|
||||||
|
* Hardware Availability: https://www.pjrc.com/store/teensypp.html
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make converter/modelm_ssk:default
|
||||||
|
|
||||||
|
You must press the button on the Teensy to enter the bootloader the first time. Afterward, so long as you keep `COMMAND_ENABLE = yes` in `rules.mk` (enabled by default), you can use `Left Shift + Right Shift + B` to enter the bootloader. With this method, you can omit `:teensy` from the end of the `make` command.
|
||||||
|
|
||||||
|
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 = at90usb1286
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = halfkay
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # 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 = 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
|
||||||
|
# Do not enable NKRO_ENABLE. The SSK lacks diodes and cannot support it
|
||||||
|
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
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT_all(
|
[0] = LAYOUT_all(
|
||||||
KC_ESC, 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_HOME,
|
KC_ESC, 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_HOME,
|
||||||
@@ -34,14 +35,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[2] = LAYOUT_all(
|
[2] = LAYOUT_all(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
[3] = LAYOUT_all(
|
[3] = LAYOUT_all(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 <me@fjlaboratories.com>
|
||||||
|
|
||||||
|
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 0x7074 // FJLabs
|
||||||
|
#define PRODUCT_ID 0x1003 // Ready100
|
||||||
|
#define DEVICE_VER 0x0001 // Version 1
|
||||||
|
#define MANUFACTURER FJLabs
|
||||||
|
#define PRODUCT Ready100
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 14
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Checked with Eagle Schematic
|
||||||
|
#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 }
|
||||||
|
#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B3, B2, B1 }
|
||||||
|
#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
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* 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 RGB Underglow */
|
||||||
|
#define RGB_DI_PIN F7
|
||||||
|
#define RGBLED_NUM 64
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 108
|
||||||
|
#define RGB_VAL_STEP 12
|
||||||
|
/* #define RGBLIGHT_LAYER_BLINK*/
|
||||||
|
|
||||||
|
/* Define less important options */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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,82 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Ready100",
|
||||||
|
"url": "https://www.ready100.com",
|
||||||
|
"maintainer": "FJLabs",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_65_ansi": {
|
||||||
|
"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, "w": 2},
|
||||||
|
|
||||||
|
{"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},
|
||||||
|
{"x": 2, "y": 3},
|
||||||
|
{"x": 3, "y": 3},
|
||||||
|
{"x": 4, "y": 3},
|
||||||
|
{"x": 5, "y": 3},
|
||||||
|
{"x": 6, "y": 3},
|
||||||
|
{"x": 7, "y": 3},
|
||||||
|
{"x": 8, "y": 3},
|
||||||
|
{"x": 9, "y": 3},
|
||||||
|
{"x": 10, "y": 3},
|
||||||
|
{"x": 11, "y": 3},
|
||||||
|
{"x": 12, "y": 3},
|
||||||
|
{"x": 13, "y": 3},
|
||||||
|
{"x": 14, "y": 3},
|
||||||
|
{"x": 15, "y": 3},
|
||||||
|
|
||||||
|
{"x": 0, "y": 4, "w": 1.25},
|
||||||
|
{"x": 1.25, "y": 4, "w": 1.25},
|
||||||
|
{"x": 2.5, "y": 4, "w": 1.25},
|
||||||
|
{"x": 3.75, "y": 4, "w": 6.25},
|
||||||
|
{"x": 10, "y": 4},
|
||||||
|
{"x": 11, "y": 4},
|
||||||
|
{"x": 12, "y": 4},
|
||||||
|
{"x": 13, "y": 4},
|
||||||
|
{"x": 14, "y": 4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 <me@fjlaboratories.com>
|
||||||
|
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 {
|
||||||
|
_LAYER0,
|
||||||
|
_LAYER1,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_LAYER0] = LAYOUT_64key(
|
||||||
|
KC_GESC, 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_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,
|
||||||
|
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_LSFT, 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_DEL,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LAYER1] = LAYOUT_64key(
|
||||||
|
KC_GESC, 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_DEL,
|
||||||
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUSE, RESET,
|
||||||
|
KC_TRNS, RGB_SPI, RGB_SPD, 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, NK_TOGG, 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
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 <me@fjlaboratories.com>
|
||||||
|
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 {
|
||||||
|
_LAYER0,
|
||||||
|
_LAYER1,
|
||||||
|
_LAYER2,
|
||||||
|
_LAYER3,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_LAYER0] = LAYOUT_64key(
|
||||||
|
KC_GESC, 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_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,
|
||||||
|
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_LSFT, 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_DEL,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LAYER1] = LAYOUT_64key(
|
||||||
|
KC_GESC, 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_DEL,
|
||||||
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUSE, RESET,
|
||||||
|
KC_TRNS, RGB_SPI, RGB_SPD, 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, NK_TOGG, 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
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LAYER2] = LAYOUT_64key(
|
||||||
|
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, 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, 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, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LAYER3] = LAYOUT_64key(
|
||||||
|
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, 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, 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, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Ready100
|
||||||
|
|
||||||
|
The following is the QMK Firmware for the [Ready100](https://www.ready100.com) 64-key PCB, a universal tray mount 60% hotswap PCB with per key RGB LED's.
|
||||||
|
|
||||||
|
The PCB will feature:
|
||||||
|
* Kailh Hotswap sockets
|
||||||
|
* QMK & VIA compatibility
|
||||||
|
* Per-Key RGB LED's
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
* Keyboard Maintainer: FJLabs
|
||||||
|
* Hardware Supported: Ready100
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make fjlabs/ready100: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). You can enter the bootloader by pressing the reset button on the back of the PCB.
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 <me@fjlaboratories.com>
|
||||||
|
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 "ready100.h"
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 <me@fjlaboratories.com>
|
||||||
|
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"
|
||||||
|
|
||||||
|
/* Ready100 Keymap Definitions */
|
||||||
|
#define LAYOUT_64key( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||||
|
K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
|
||||||
|
{ K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency
|
||||||
|
F_CPU = 8000000
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-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 = 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 = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
KEYBOARD_LOCK_ENABLE = yes
|
||||||
@@ -17,36 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "rgb_matrix_map.h"
|
#include "rgb_matrix_map.h"
|
||||||
|
#include "jonavin.h"
|
||||||
#define ARRAYSIZE(arr) sizeof(arr)/sizeof(arr[0])
|
|
||||||
|
|
||||||
enum custom_layers {
|
|
||||||
_BASE,
|
|
||||||
_FN1,
|
|
||||||
_MO2,
|
|
||||||
_MO3,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum custom_keycodes {
|
|
||||||
KC_00 = SAFE_RANGE,
|
|
||||||
KC_WINLCK, //Toggles Win key on and off
|
|
||||||
RGB_TOI, // Timeout idle time up
|
|
||||||
RGB_TOD, // Timeout idle time down
|
|
||||||
};
|
|
||||||
|
|
||||||
// Tap Dance Definitions
|
|
||||||
enum custom_tapdance {
|
|
||||||
TD_LSFT_CAPSLOCK,
|
|
||||||
};
|
|
||||||
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
||||||
// Tap once for shift, twice for Caps Lock
|
|
||||||
[TD_LSFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
|
|
||||||
};
|
|
||||||
|
|
||||||
#define KC_LSFTCAPS TD(TD_LSFT_CAPSLOCK)
|
|
||||||
|
|
||||||
bool _isWinKeyDisabled = false;
|
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
@@ -63,8 +34,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
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_INS, KC_MUTE,
|
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_INS, KC_MUTE,
|
||||||
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_DEL,
|
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_DEL,
|
||||||
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, KC_PGUP,
|
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, KC_PGUP,
|
||||||
TT(_MO2), 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_PGDN,
|
TT(_LOWER), 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_PGDN,
|
||||||
KC_LSFTCAPS, 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_END,
|
KC_LSFTCAPSWIN, 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_END,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -77,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, KC_WINLCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI
|
_______, KC_WINLCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI
|
||||||
),
|
),
|
||||||
|
|
||||||
[_MO2] = LAYOUT(
|
[_LOWER] = LAYOUT(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, _______, _______,
|
||||||
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PDOT, _______, _______, _______, KC_HOME,
|
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PDOT, _______, _______, _______, KC_HOME,
|
||||||
@@ -86,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______, KC_BSPC, _______, _______, _______, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT)
|
_______, _______, _______, KC_BSPC, _______, _______, _______, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT)
|
||||||
),
|
),
|
||||||
|
|
||||||
[_MO3] = LAYOUT(
|
[_RAISE] = LAYOUT(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
@@ -98,139 +69,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// TIMEOUTS
|
|
||||||
#define TIMEOUT_THRESHOLD_DEFAULT 5 // default timeout minutes
|
|
||||||
#define TIMEOUT_THRESHOLD_MAX 140 // upper limits (2 hours and 10 minutes -- no rgb indicators above this value)
|
|
||||||
static uint16_t timeout_timer = 0;
|
|
||||||
static uint16_t timeout_counter = 0; //in minute intervals
|
|
||||||
static uint16_t timeout_threshold = TIMEOUT_THRESHOLD_DEFAULT;
|
|
||||||
|
|
||||||
void timeout_reset_timer(void) {
|
|
||||||
timeout_timer = timer_read();
|
|
||||||
timeout_counter = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
void timeout_update_threshold(bool increase) {
|
|
||||||
if (increase && timeout_threshold < TIMEOUT_THRESHOLD_MAX) timeout_threshold++;
|
|
||||||
if (!increase && timeout_threshold > 0) timeout_threshold--;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
switch (keycode) {
|
|
||||||
case KC_00:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
// when keycode KC_00 is pressed
|
|
||||||
SEND_STRING("00");
|
|
||||||
} else {
|
|
||||||
// when keycode KC_00 is released
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case KC_WINLCK:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
_isWinKeyDisabled = !_isWinKeyDisabled; //toggle status
|
|
||||||
if(_isWinKeyDisabled) {
|
|
||||||
process_magic(GUI_OFF, record);
|
|
||||||
} else {
|
|
||||||
process_magic(GUI_ON, record);
|
|
||||||
}
|
|
||||||
} else unregister_code16(keycode);
|
|
||||||
break;
|
|
||||||
case RGB_TOI:
|
|
||||||
if(record->event.pressed) {
|
|
||||||
timeout_update_threshold(true);
|
|
||||||
} else unregister_code16(keycode);
|
|
||||||
break;
|
|
||||||
case RGB_TOD:
|
|
||||||
if(record->event.pressed) {
|
|
||||||
timeout_update_threshold(false); //decrease timeout
|
|
||||||
} else unregister_code16(keycode);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (record->event.pressed) { //reset activity timer
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
|
||||||
rgb_matrix_enable();
|
|
||||||
#endif
|
|
||||||
timeout_reset_timer();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
if (timeout_threshold > 0) {
|
|
||||||
if (timer_elapsed(timeout_timer) >= 60000) { // 1 minute tick
|
|
||||||
timeout_counter++;
|
|
||||||
timeout_timer = timer_read();
|
|
||||||
}
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
|
||||||
if (timeout_threshold > 0 && timeout_counter >= timeout_threshold) {
|
|
||||||
rgb_matrix_disable_noeeprom();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
} // timeout_threshold = 0 will disable timeout
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef ENCODER_ENABLE // Encoder Functionality
|
|
||||||
uint8_t selected_layer = 0;
|
|
||||||
|
|
||||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
|
||||||
if ( clockwise ) {
|
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ) { // If you are holding L shift, encoder changes layers
|
|
||||||
if(selected_layer < 3) {
|
|
||||||
selected_layer ++;
|
|
||||||
layer_move(selected_layer);
|
|
||||||
}
|
|
||||||
} else if (keyboard_report->mods & MOD_BIT(KC_RSFT) ) { // If you are holding R shift, Page up
|
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
register_code(KC_PGDN);
|
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
|
||||||
} else if (keyboard_report->mods & MOD_BIT(KC_LCTL)) { // if holding Left Ctrl, navigate next word
|
|
||||||
tap_code16(LCTL(KC_RGHT));
|
|
||||||
} else if (keyboard_report->mods & MOD_BIT(KC_LALT)) { // if holding Left Alt, change media next track
|
|
||||||
tap_code(KC_MEDIA_NEXT_TRACK);
|
|
||||||
} else {
|
|
||||||
switch (selected_layer) {
|
|
||||||
case _FN1:
|
|
||||||
timeout_update_threshold(true);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
tap_code(KC_VOLU); // Otherwise it just changes volume
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ) {
|
|
||||||
if (selected_layer > 0) {
|
|
||||||
selected_layer --;
|
|
||||||
layer_move(selected_layer);
|
|
||||||
}
|
|
||||||
} else if (keyboard_report->mods & MOD_BIT(KC_RSFT) ) {
|
|
||||||
unregister_mods(MOD_BIT(KC_LSFT));
|
|
||||||
register_code(KC_PGUP);
|
|
||||||
register_mods(MOD_BIT(KC_LSFT));
|
|
||||||
} else if (keyboard_report->mods & MOD_BIT(KC_LCTL)) { // if holding Left Ctrl, navigate previous word
|
|
||||||
tap_code16(LCTL(KC_LEFT));
|
|
||||||
} else if (keyboard_report->mods & MOD_BIT(KC_LALT)) { // if holding Left Alt, change media previous track
|
|
||||||
tap_code(KC_MEDIA_PREV_TRACK);
|
|
||||||
} else {
|
|
||||||
switch (selected_layer) {
|
|
||||||
case _FN1:
|
|
||||||
timeout_update_threshold(false);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
tap_code(KC_VOLD);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
// Capslock, Scroll lock and Numlock indicator on Left side lights.
|
// Capslock, Scroll lock and Numlock indicator on Left side lights.
|
||||||
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||||
@@ -247,7 +85,7 @@ void matrix_scan_user(void) {
|
|||||||
rgb_matrix_set_color(LED_L6, RGB_RED);
|
rgb_matrix_set_color(LED_L6, RGB_RED);
|
||||||
rgb_matrix_set_color(LED_L7, RGB_RED);
|
rgb_matrix_set_color(LED_L7, RGB_RED);
|
||||||
}
|
}
|
||||||
if (_isWinKeyDisabled) {
|
if (keymap_config.no_gui) {
|
||||||
rgb_matrix_set_color(LED_LWIN, RGB_RED); //light up Win key when disabled
|
rgb_matrix_set_color(LED_LWIN, RGB_RED); //light up Win key when disabled
|
||||||
}
|
}
|
||||||
switch(get_highest_layer(layer_state)){ // special handling per layer
|
switch(get_highest_layer(layer_state)){ // special handling per layer
|
||||||
@@ -258,6 +96,7 @@ void matrix_scan_user(void) {
|
|||||||
rgb_matrix_set_color(LED_FN, RGB_RED); //FN key
|
rgb_matrix_set_color(LED_FN, RGB_RED); //FN key
|
||||||
|
|
||||||
// Add RGB Timeout Indicator -- shows 0 to 139 using F row and num row; larger numbers using 16bit code
|
// Add RGB Timeout Indicator -- shows 0 to 139 using F row and num row; larger numbers using 16bit code
|
||||||
|
uint16_t timeout_threshold = get_timeout_threshold();
|
||||||
if (timeout_threshold <= 10) rgb_matrix_set_color(LED_LIST_FUNCROW[timeout_threshold], RGB_RED);
|
if (timeout_threshold <= 10) rgb_matrix_set_color(LED_LIST_FUNCROW[timeout_threshold], RGB_RED);
|
||||||
else if (timeout_threshold < 140) {
|
else if (timeout_threshold < 140) {
|
||||||
rgb_matrix_set_color(LED_LIST_FUNCROW[(timeout_threshold / 10)], RGB_RED);
|
rgb_matrix_set_color(LED_LIST_FUNCROW[(timeout_threshold / 10)], RGB_RED);
|
||||||
@@ -268,7 +107,7 @@ void matrix_scan_user(void) {
|
|||||||
rgb_matrix_set_color(LED_LIST_NUMROW[12], RGB_RED);
|
rgb_matrix_set_color(LED_LIST_NUMROW[12], RGB_RED);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _MO2:
|
case _LOWER:
|
||||||
for (uint8_t i=0; i<ARRAYSIZE(LED_LIST_NUMPAD); i++) {
|
for (uint8_t i=0; i<ARRAYSIZE(LED_LIST_NUMPAD); i++) {
|
||||||
rgb_matrix_set_color(LED_LIST_NUMPAD[i], RGB_MAGENTA);
|
rgb_matrix_set_color(LED_LIST_NUMPAD[i], RGB_MAGENTA);
|
||||||
}
|
}
|
||||||
@@ -276,7 +115,7 @@ void matrix_scan_user(void) {
|
|||||||
rgb_matrix_set_color(LED_R5, RGB_MAGENTA);
|
rgb_matrix_set_color(LED_R5, RGB_MAGENTA);
|
||||||
rgb_matrix_set_color(LED_R6, RGB_MAGENTA);
|
rgb_matrix_set_color(LED_R6, RGB_MAGENTA);
|
||||||
break;
|
break;
|
||||||
case _MO3:
|
case _RAISE:
|
||||||
rgb_matrix_set_color(LED_R6, RGB_GREEN);
|
rgb_matrix_set_color(LED_R6, RGB_GREEN);
|
||||||
rgb_matrix_set_color(LED_R7, RGB_GREEN);
|
rgb_matrix_set_color(LED_R7, RGB_GREEN);
|
||||||
rgb_matrix_set_color(LED_R8, RGB_GREEN);
|
rgb_matrix_set_color(LED_R8, RGB_GREEN);
|
||||||
@@ -296,12 +135,8 @@ void matrix_scan_user(void) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_keymap(void) {
|
||||||
|
// keyboard_post_init_user() moved to userspace
|
||||||
if (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // turn on Num lock by defautl so that the numpad layer always has predictable results
|
|
||||||
tap_code(KC_NUMLOCK);
|
|
||||||
}
|
|
||||||
timeout_timer = timer_read(); // set inital time for ide timeout
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_matrix_set_color_all(RGB_NAUTILUS); // Default startup colour
|
rgb_matrix_set_color_all(RGB_NAUTILUS); // Default startup colour
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -29,6 +29,19 @@
|
|||||||
- Win Key light up red when Win Lock mode enabled
|
- Win Key light up red when Win Lock mode enabled
|
||||||
- Layer 2 activation lights up Numpad area
|
- Layer 2 activation lights up Numpad area
|
||||||
|
|
||||||
|
rules.mk OPTIONS - Active features from userspace
|
||||||
|
STARTUP_NUMLOCK_ON = yes
|
||||||
|
- turns on NUMLOCK by default
|
||||||
|
|
||||||
|
ENCODER_DEFAULTACTIONS_ENABLE = yes
|
||||||
|
- Enabled default encoder funtions
|
||||||
|
|
||||||
|
TD_LSFT_CAPSLOCK_ENABLE = yes
|
||||||
|
- This will enable double tap on Left Shift to toggle CAPSLOCK when using KC_LSFTCAPS
|
||||||
|
|
||||||
|
IDLE_TIMEOUT_ENABLE = yes
|
||||||
|
- Enables Timer functionality; for RGB idle timeouts that can be changed dynamically
|
||||||
|
|
||||||
## All layers diagram
|
## All layers diagram
|
||||||
Default layer
|
Default layer
|
||||||

|

|
||||||
|
|||||||
@@ -2,3 +2,8 @@ VIA_ENABLE = yes
|
|||||||
MOUSEKEY_ENABLE = no
|
MOUSEKEY_ENABLE = no
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
BOOTMAGIC_ENABLE = lite
|
BOOTMAGIC_ENABLE = lite
|
||||||
|
|
||||||
|
TD_LSFT_CAPSLOCK_ENABLE = yes
|
||||||
|
IDLE_TIMEOUT_ENABLE = yes
|
||||||
|
STARTUP_NUMLOCK_ON = yes
|
||||||
|
ENCODER_DEFAULTACTIONS_ENABLE = yes
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2021 Alan Pocklington
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2021 Alan Pocklington
|
||||||
|
*
|
||||||
|
* 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
|
#include QMK_KEYBOARD_H
|
||||||
#include "keymap_uk.h"
|
#include "keymap_uk.h"
|
||||||
#include "ajp10304.h"
|
#include "ajp10304.h"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# AJP10304 Custom Atreus50 Layout
|
# AJP10304 Custom Atreus50 Layout
|
||||||
# Also available for the Planck, Shark and JJ40
|
# Also available for the Planck, Shark, Quark and JJ40
|
||||||
|
|
||||||
**Note:** In the tables below where there are two characters on a key,
|
**Note:** In the tables below where there are two characters on a key,
|
||||||
the second is the output when shift is applied.
|
the second is the output when shift is applied.
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2021 Yaroslav Smirnov <elorenn@bk.ru>
|
||||||
|
*
|
||||||
|
* 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"
|
||||||
|
|
||||||
|
// Rows are doubled-up for splits
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
// Wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { B1, B3, B2, B6 }
|
||||||
|
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
|
||||||
|
// Reversed sort
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define PRODUCT Elrgo S
|
||||||
|
#define MANUFACTURER Eloren
|
||||||
|
#define VENDOR_ID 0x454C
|
||||||
|
#define PRODUCT_ID 0x3436
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* serial.c configuration for split keyboard */
|
||||||
|
#define SOFT_SERIAL_PIN D0
|
||||||
|
|
||||||
|
|
||||||
|
/* 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,17 @@
|
|||||||
|
/* Copyright 2021 Yaroslav Smirnov <[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 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 "elrgo_s.h"
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/* Copyright 2021 Yaroslav Smirnov <[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 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_split_3x6_5(\
|
||||||
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||||
|
L31, L32, L33, L34, L35, R30, R31, R32, R33, R34 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
|
{KC_NO, L31, L32, L33, L34, L35}, \
|
||||||
|
\
|
||||||
|
{ R00, R01, R02, R03, R04, R05 }, \
|
||||||
|
{ R10, R11, R12, R13, R14, R15 }, \
|
||||||
|
{ R20, R21, R22, R23, R24, R25 }, \
|
||||||
|
{ R30, R31, R32, R33, R34, KC_NO} \
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Elrgo S",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 17,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_split_3x6_5": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"L00", "x":0, "y":0},
|
||||||
|
{"label":"L01", "x":1, "y":0},
|
||||||
|
{"label":"L02", "x":2, "y":0},
|
||||||
|
{"label":"L03", "x":3, "y":0},
|
||||||
|
{"label":"L04", "x":4, "y":0},
|
||||||
|
{"label":"L05", "x":5, "y":0},
|
||||||
|
{"label":"R00", "x":9, "y":0},
|
||||||
|
{"label":"R01", "x":10, "y":0},
|
||||||
|
{"label":"R02", "x":11, "y":0},
|
||||||
|
{"label":"R03", "x":12, "y":0},
|
||||||
|
{"label":"R04", "x":13, "y":0},
|
||||||
|
{"label":"R05", "x":14, "y":0},
|
||||||
|
{"label":"L10", "x":0, "y":1},
|
||||||
|
{"label":"L11", "x":1, "y":1},
|
||||||
|
{"label":"L12", "x":2, "y":1},
|
||||||
|
{"label":"L13", "x":3, "y":1},
|
||||||
|
{"label":"L14", "x":4, "y":1},
|
||||||
|
{"label":"L15", "x":5, "y":1},
|
||||||
|
{"label":"R10", "x":9, "y":1},
|
||||||
|
{"label":"R11", "x":10, "y":1},
|
||||||
|
{"label":"R12", "x":11, "y":1},
|
||||||
|
{"label":"R13", "x":12, "y":1},
|
||||||
|
{"label":"R14", "x":13, "y":1},
|
||||||
|
{"label":"R15", "x":14, "y":1},
|
||||||
|
{"label":"L20", "x":0, "y":2},
|
||||||
|
{"label":"L21", "x":1, "y":2},
|
||||||
|
{"label":"L22", "x":2, "y":2},
|
||||||
|
{"label":"L23", "x":3, "y":2},
|
||||||
|
{"label":"L24", "x":4, "y":2},
|
||||||
|
{"label":"L25", "x":5, "y":2},
|
||||||
|
{"label":"R20", "x":9, "y":2},
|
||||||
|
{"label":"R21", "x":10, "y":2},
|
||||||
|
{"label":"R22", "x":11, "y":2},
|
||||||
|
{"label":"R23", "x":12, "y":2},
|
||||||
|
{"label":"R24", "x":13, "y":2},
|
||||||
|
{"label":"R25", "x":14, "y":2},
|
||||||
|
{"label":"L31", "x":3, "y":3},
|
||||||
|
{"label":"L32", "x":4, "y":3},
|
||||||
|
{"label":"L33", "x":5, "y":3},
|
||||||
|
{"label":"L34", "x":6, "y":3},
|
||||||
|
{"label":"L35", "x":6, "y":2},
|
||||||
|
{"label":"R30", "x":8, "y":2},
|
||||||
|
{"label":"R31", "x":8, "y":3},
|
||||||
|
{"label":"R32", "x":9, "y":3},
|
||||||
|
{"label":"R33", "x":10, "y":3},
|
||||||
|
{"label":"R34", "x":11, "y":3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/* Copyright 2021 Yaroslav Smirnov <[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 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 USE_SERIAL
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/* Copyright 2021 Yaroslav Smirnov <[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 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 { _QWERTY, _LOWER, _RAISE, _ADJUST };
|
||||||
|
|
||||||
|
#define LOWER TT(_LOWER)
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
|
||||||
|
#define M_SHLL LCTL(KC_LSFT)
|
||||||
|
#define M_SHLA LCTL(KC_LALT)
|
||||||
|
#define M_BBSLS LSFT(KC_BSLS)
|
||||||
|
#define M_FLEFT LCTL(KC_LEFT)
|
||||||
|
#define M_FRIGHT LCTL(KC_RIGHT)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = LAYOUT_split_3x6_5(
|
||||||
|
KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC ,
|
||||||
|
KC_LBRC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT ,
|
||||||
|
KC_RBRC , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_GRAVE,
|
||||||
|
KC_LGUI , KC_LCTL , KC_LSFT , LOWER , M_SHLL , M_SHLA , RAISE , KC_SPC , KC_LALT , KC_ENT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_split_3x6_5(
|
||||||
|
KC_ESC , KC_PDOT , KC_PMNS , KC_PPLS , KC_MINS , KC_EQL , KC_MUTE , KC_MSTP , KC_MPLY , KC_MPRV , KC_MNXT , KC_BSPC ,
|
||||||
|
KC_PAST , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 ,
|
||||||
|
KC_PSLS , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,
|
||||||
|
KC_LGUI , KC_LCTL , KC_LSFT , KC_TRNS , M_SHLL , M_SHLA , KC_TRNS , KC_SPC , KC_LALT , KC_ENT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_split_3x6_5(
|
||||||
|
KC_ESC , KC_PDOT , M_BBSLS , KC_BSLS , LSFT(KC_MINS), LSFT(KC_EQL), KC_HOME , KC_WH_L , KC_UP , KC_WH_R , KC_PGUP , KC_BSPC ,
|
||||||
|
KC_TAB , LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4) , LSFT(KC_5) , M_FLEFT , KC_LEFT , KC_DOWN , KC_RIGHT, M_FRIGHT, KC_DEL ,
|
||||||
|
LSFT(KC_TAB), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9) , LSFT(KC_0) , KC_END , KC_F22 , KC_F23 , KC_CAPS , KC_PGDN , MO(_ADJUST),
|
||||||
|
KC_LGUI , KC_LCTL , KC_LSFT , KC_LALT , M_SHLL , M_SHLA , KC_TRNS , KC_SPC , KC_RALT , KC_ENT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT_split_3x6_5(
|
||||||
|
KC_NO , KC_SLEP , KC_VOLU , KC_BRIU , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NLCK ,
|
||||||
|
KC_NO , KC_WAKE , KC_VOLD , KC_BRID , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
|
||||||
|
KC_NO , KC_NO , KC_NO , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_NO , KC_NO , MO(_ADJUST),
|
||||||
|
RESET , KC_NO , KC_NO , KC_TRNS , KC_NO , KC_NO , KC_TRNS , KC_TRNS , KC_NO , KC_NO
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# Elrgo S Split Keyboard
|
||||||
|
|
||||||
|
This is a fork of the VOID Ergo S with QMK Configurator support.
|
||||||
|
|
||||||
|
Elrgo S uses 2x Arduino Pro Micro (ATmega32U4) with 3D printed case.
|
||||||
|
|
||||||
|
[Building guide, models for 3D printing](https://github.com/Eloren1/Elrgo_S)
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Eloren](https://github.com/Eloren1)
|
||||||
|
* Hardware Supported: Arduino Pro Micro
|
||||||
|
* Hardware Availability: [Open Source](https://github.com/Eloren1/Elrgo_S)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/elrgo_s:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make handwired/elrgo_s: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).
|
||||||
|
|
||||||
|
## Bootloader
|
||||||
|
|
||||||
|
Enter the bootloader in 2 ways:
|
||||||
|
|
||||||
|
* **Physical reset button**: Briefly press the button through the hole on the left side of the case.
|
||||||
|
* **Keycode in layout**: Press the key mapped to `RESET` if it is available
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# 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 = 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 = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
SPLIT_KEYBOARD = yes
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# AJP10304 Custom JJ40 Layout
|
# AJP10304 Custom JJ40 Layout
|
||||||
# Also available for the Planck, Shark and Atreus50
|
# Also available for the Planck, Shark, Quark and Atreus50
|
||||||
|
|
||||||
**Note:** In the tables below where there are two characters on a key,
|
**Note:** In the tables below where there are two characters on a key,
|
||||||
the second is the output when shift is applied.
|
the second is the output when shift is applied.
|
||||||
|
|||||||
@@ -4,6 +4,11 @@
|
|||||||
"maintainer": "kb-elmo",
|
"maintainer": "kb-elmo",
|
||||||
"width": 16,
|
"width": 16,
|
||||||
"height": 5,
|
"height": 5,
|
||||||
|
"layout_aliases": {
|
||||||
|
"LAYOUT_ansi": "LAYOUT_65_ansi_blocker",
|
||||||
|
"LAYOUT_ansi_splitbs": "LAYOUT_65_ansi_blocker_split_bs",
|
||||||
|
"LAYOUT_iso": "LAYOUT_65_iso_blocker"
|
||||||
|
},
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_all": {
|
"LAYOUT_all": {
|
||||||
"layout": [
|
"layout": [
|
||||||
@@ -23,6 +28,7 @@
|
|||||||
{"x":13, "y":0},
|
{"x":13, "y":0},
|
||||||
{"x":14, "y":0},
|
{"x":14, "y":0},
|
||||||
{"x":15, "y":0},
|
{"x":15, "y":0},
|
||||||
|
|
||||||
{"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},
|
||||||
@@ -38,6 +44,7 @@
|
|||||||
{"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":15, "y":1},
|
{"x":15, "y":1},
|
||||||
|
|
||||||
{"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},
|
||||||
@@ -52,6 +59,7 @@
|
|||||||
{"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":15, "y":2},
|
{"x":15, "y":2},
|
||||||
|
|
||||||
{"x":0, "y":3, "w":1.25},
|
{"x":0, "y":3, "w":1.25},
|
||||||
{"x":1.25, "y":3},
|
{"x":1.25, "y":3},
|
||||||
{"x":2.25, "y":3},
|
{"x":2.25, "y":3},
|
||||||
@@ -67,6 +75,7 @@
|
|||||||
{"x":12.25, "y":3, "w":1.75},
|
{"x":12.25, "y":3, "w":1.75},
|
||||||
{"x":14, "y":3},
|
{"x":14, "y":3},
|
||||||
{"x":15, "y":3},
|
{"x":15, "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},
|
||||||
@@ -78,7 +87,7 @@
|
|||||||
{"x":15, "y":4}
|
{"x":15, "y":4}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_ansi": {
|
"LAYOUT_65_ansi_blocker": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0},
|
{"x":0, "y":0},
|
||||||
{"x":1, "y":0},
|
{"x":1, "y":0},
|
||||||
@@ -95,6 +104,7 @@
|
|||||||
{"x":12, "y":0},
|
{"x":12, "y":0},
|
||||||
{"x":13, "y":0, "w":2},
|
{"x":13, "y":0, "w":2},
|
||||||
{"x":15, "y":0},
|
{"x":15, "y":0},
|
||||||
|
|
||||||
{"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},
|
||||||
@@ -110,6 +120,7 @@
|
|||||||
{"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":15, "y":1},
|
{"x":15, "y":1},
|
||||||
|
|
||||||
{"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},
|
||||||
@@ -124,6 +135,7 @@
|
|||||||
{"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":15, "y":2},
|
{"x":15, "y":2},
|
||||||
|
|
||||||
{"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},
|
||||||
@@ -138,6 +150,7 @@
|
|||||||
{"x":12.25, "y":3, "w":1.75},
|
{"x":12.25, "y":3, "w":1.75},
|
||||||
{"x":14, "y":3},
|
{"x":14, "y":3},
|
||||||
{"x":15, "y":3},
|
{"x":15, "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},
|
||||||
@@ -149,7 +162,7 @@
|
|||||||
{"x":15, "y":4}
|
{"x":15, "y":4}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_ansi_splitbs": {
|
"LAYOUT_65_ansi_blocker_split_bs": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0},
|
{"x":0, "y":0},
|
||||||
{"x":1, "y":0},
|
{"x":1, "y":0},
|
||||||
@@ -167,6 +180,7 @@
|
|||||||
{"x":13, "y":0},
|
{"x":13, "y":0},
|
||||||
{"x":14, "y":0},
|
{"x":14, "y":0},
|
||||||
{"x":15, "y":0},
|
{"x":15, "y":0},
|
||||||
|
|
||||||
{"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},
|
||||||
@@ -182,6 +196,7 @@
|
|||||||
{"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":15, "y":1},
|
{"x":15, "y":1},
|
||||||
|
|
||||||
{"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},
|
||||||
@@ -196,6 +211,7 @@
|
|||||||
{"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":15, "y":2},
|
{"x":15, "y":2},
|
||||||
|
|
||||||
{"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},
|
||||||
@@ -210,6 +226,7 @@
|
|||||||
{"x":12.25, "y":3, "w":1.75},
|
{"x":12.25, "y":3, "w":1.75},
|
||||||
{"x":14, "y":3},
|
{"x":14, "y":3},
|
||||||
{"x":15, "y":3},
|
{"x":15, "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},
|
||||||
@@ -221,7 +238,83 @@
|
|||||||
{"x":15, "y":4}
|
{"x":15, "y":4}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_iso": {
|
"LAYOUT_65_iso_blocker": {
|
||||||
|
"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, "w":2},
|
||||||
|
{"x":15, "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":15, "y":1},
|
||||||
|
|
||||||
|
{"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},
|
||||||
|
{"x":13.75, "y":1, "w":1.25, "h":2},
|
||||||
|
{"x":15, "y":2},
|
||||||
|
|
||||||
|
{"x":0, "y":3, "w":1.25},
|
||||||
|
{"x":1.25, "y":3},
|
||||||
|
{"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},
|
||||||
|
{"x":12.25, "y":3, "w":1.75},
|
||||||
|
{"x":14, "y":3},
|
||||||
|
{"x":15, "y":3},
|
||||||
|
|
||||||
|
{"x":0, "y":4, "w":1.25},
|
||||||
|
{"x":1.25, "y":4, "w":1.25},
|
||||||
|
{"x":2.5, "y":4, "w":1.25},
|
||||||
|
{"x":3.75, "y":4, "w":6.25},
|
||||||
|
{"x":10, "y":4, "w":1.25},
|
||||||
|
{"x":11.25, "y":4, "w":1.25},
|
||||||
|
{"x":13, "y":4},
|
||||||
|
{"x":14, "y":4},
|
||||||
|
{"x":15, "y":4}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_65_iso_blocker_split_bs": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0},
|
{"x":0, "y":0},
|
||||||
{"x":1, "y":0},
|
{"x":1, "y":0},
|
||||||
@@ -239,6 +332,7 @@
|
|||||||
{"x":13, "y":0},
|
{"x":13, "y":0},
|
||||||
{"x":14, "y":0},
|
{"x":14, "y":0},
|
||||||
{"x":15, "y":0},
|
{"x":15, "y":0},
|
||||||
|
|
||||||
{"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},
|
||||||
@@ -252,8 +346,8 @@
|
|||||||
{"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":15, "y":1},
|
{"x":15, "y":1},
|
||||||
|
|
||||||
{"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},
|
||||||
@@ -266,9 +360,12 @@
|
|||||||
{"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},
|
||||||
|
{"x":13.75, "y":1, "w":1.25, "h":2},
|
||||||
{"x":15, "y":2},
|
{"x":15, "y":2},
|
||||||
{"x":0, "y":3, "w":2.25},
|
|
||||||
|
{"x":0, "y":3, "w":1.25},
|
||||||
|
{"x":1.25, "y":3},
|
||||||
{"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},
|
||||||
@@ -282,6 +379,7 @@
|
|||||||
{"x":12.25, "y":3, "w":1.75},
|
{"x":12.25, "y":3, "w":1.75},
|
||||||
{"x":14, "y":3},
|
{"x":14, "y":3},
|
||||||
{"x":15, "y":3},
|
{"x":15, "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},
|
||||||
|
|||||||
@@ -16,14 +16,14 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT_ansi(
|
[0] = LAYOUT_65_ansi_blocker(
|
||||||
KC_ESC, 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_DEL,
|
KC_ESC, 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_DEL,
|
||||||
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, KC_HOME,
|
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, KC_HOME,
|
||||||
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_PGUP,
|
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_PGUP,
|
||||||
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_UP, KC_PGDN,
|
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_UP, KC_PGDN,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
[1] = LAYOUT_ansi(
|
[1] = LAYOUT_65_ansi_blocker(
|
||||||
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, 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, 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, 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, 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,
|
||||||
|
|||||||
@@ -18,68 +18,91 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define ____ KC_NO
|
#define ___ KC_NO
|
||||||
|
|
||||||
/* This is a shortcut to help you visually see your layout.
|
/*
|
||||||
*
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───────┐
|
||||||
* The first section contains all of the arguments representing the physical
|
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │0F │ │0D │ 2u Backspace
|
||||||
* layout of the board and position of the keys.
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ └─┬─────┤
|
||||||
*
|
* │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │1F │ │ │
|
||||||
* The second converts the arguments into a two-dimensional array which
|
* 2.25u ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ ┌──┴┐2D │ ISO Enter
|
||||||
* represents the switch matrix.
|
* LShift │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2D │2F │ │1D │ │
|
||||||
|
* ┌────────┐ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ └───┴────┘
|
||||||
|
* │30 │ │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3F │
|
||||||
|
* └────────┘ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
* │40 │41 │42 │46 │4B │4C │ │4D │4E │4F │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘
|
||||||
|
* ┌─────┬───┬─────┬───────────────────────────┬─────┐
|
||||||
|
* │40 │41 │42 │46 │4C │ Tsangan
|
||||||
|
* └─────┴───┴─────┴───────────────────────────┴─────┘
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LAYOUT_all( \
|
#define LAYOUT_all( \
|
||||||
k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \
|
||||||
k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \
|
||||||
k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \
|
||||||
k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \
|
||||||
k400, k401, k402, k406, k411, k412, k413, k414, k415 \
|
k40, k41, k42, k46, k4B, k4C, k4D, k4E, k4F \
|
||||||
) { \
|
) { \
|
||||||
{ k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \
|
||||||
{ k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, ____, k115 }, \
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F }, \
|
||||||
{ k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, ____, k213, ____, k215 }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, ___, k2F }, \
|
||||||
{ k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, ____, k315 }, \
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, ___, k3F }, \
|
||||||
{ k400, k401, k402, ____, ____, ____, k406, ____, ____, ____, ____, k411, k412, k413, k414, k415 } \
|
{ k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, ___, k4B, k4C, k4D, k4E, k4F } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_ansi( \
|
#define LAYOUT_65_ansi_blocker( \
|
||||||
k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k015, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \
|
||||||
k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \
|
||||||
k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \
|
||||||
k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \
|
||||||
k400, k401, k402, k406, k411, k412, k413, k414, k415 \
|
k40, k41, k42, k46, k4B, k4C, k4D, k4E, k4F \
|
||||||
) { \
|
) { \
|
||||||
{ k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, ____, k015 }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, ___, k0F }, \
|
||||||
{ k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, ____, k115 }, \
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F }, \
|
||||||
{ k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, ____, k213, ____, k215 }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, ___, k2F }, \
|
||||||
{ k300, ____, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, ____, k315 }, \
|
{ k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, ___, k3F }, \
|
||||||
{ k400, k401, k402, ____, ____, ____, k406, ____, ____, ____, ____, k411, k412, k413, k414, k415 } \
|
{ k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, ___, k4B, k4C, k4D, k4E, k4F } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_ansi_splitbs( \
|
#define LAYOUT_65_ansi_blocker_split_bs( \
|
||||||
k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \
|
||||||
k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \
|
||||||
k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \
|
||||||
k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \
|
||||||
k400, k401, k402, k406, k411, k412, k413, k414, k415 \
|
k40, k41, k42, k46, k4B, k4C, k4D, k4E, k4F \
|
||||||
) { \
|
) { \
|
||||||
{ k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \
|
||||||
{ k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, ____, k115 }, \
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F }, \
|
||||||
{ k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, ____, k213, ____, k215 }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, ___, k2F }, \
|
||||||
{ k300, ____, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, ____, k315 }, \
|
{ k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, ___, k3F }, \
|
||||||
{ k400, k401, k402, ____, ____, ____, k406, ____, ____, ____, ____, k411, k412, k413, k414, k415 } \
|
{ k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, ___, k4B, k4C, k4D, k4E, k4F } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_iso( \
|
#define LAYOUT_65_iso_blocker( \
|
||||||
k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k015, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \
|
||||||
k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k115, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \
|
||||||
k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k113, k213, k215, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, k2F, \
|
||||||
k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \
|
||||||
k400, k401, k402, k406, k411, k412, k413, k414, k415 \
|
k40, k41, k42, k46, k4B, k4C, k4D, k4E, k4F \
|
||||||
) { \
|
) { \
|
||||||
{ k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, ____, k015 }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, ___, k0F }, \
|
||||||
{ k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, ____, k115 }, \
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F }, \
|
||||||
{ k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, ____, k213, ____, k215 }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, ___, k2F }, \
|
||||||
{ k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, ____, k315 }, \
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, ___, k3F }, \
|
||||||
{ k400, k401, k402, ____, ____, ____, k406, ____, ____, ____, ____, k411, k412, k413, k414, k415 } \
|
{ k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, ___, k4B, k4C, k4D, k4E, k4F } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_65_iso_blocker_split_bs( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, k2F, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \
|
||||||
|
k40, k41, k42, k46, k4B, k4C, k4D, k4E, k4F \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, ___, k2F }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, ___, k3F }, \
|
||||||
|
{ k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, ___, k4B, k4C, k4D, k4E, k4F } \
|
||||||
}
|
}
|
||||||
@@ -20,3 +20,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
|||||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
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 = 65_ansi_blocker 65_ansi_blocker_split_bs 65_iso_blocker 65_iso_blocker_split_bs
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2021 Jonavin Eng
|
/* Copyright 2021 Jonavin Eng @Jonavin
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -16,36 +16,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "jonavin.h"
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
|
||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
|
||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
|
||||||
// entirely and just use numbers.
|
|
||||||
enum custom_layers {
|
|
||||||
_BASE,
|
|
||||||
_FN1,
|
|
||||||
_MO2,
|
|
||||||
_MO3,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum custom_keycodes {
|
|
||||||
DOUBLEZERO = SAFE_RANGE,
|
|
||||||
KC_WINLCK, //Toggles Win key on and off
|
|
||||||
};
|
|
||||||
|
|
||||||
// Tap Dance Definitions
|
|
||||||
enum custom_tapdance {
|
|
||||||
TD_LSFT_CAPSLOCK,
|
|
||||||
};
|
|
||||||
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
||||||
// Tap once for shift, twice for Caps Lock
|
|
||||||
[TD_LSFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
|
|
||||||
};
|
|
||||||
|
|
||||||
#define KC_LSFTCAPS TD(TD_LSFT_CAPSLOCK)
|
|
||||||
|
|
||||||
bool _isWinKeyDisabled = false;
|
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
// Custom RGB Colours
|
// Custom RGB Colours
|
||||||
@@ -56,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_BASE] = LAYOUT_65(
|
[_BASE] = LAYOUT_65(
|
||||||
KC_GESC, 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_BSLS, KC_INS,
|
KC_GESC, 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_BSLS, KC_INS,
|
||||||
KC_PSCR, 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_BSPC, KC_DEL,
|
KC_PSCR, 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_BSPC, KC_DEL,
|
||||||
TT(_MO2), 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_PGUP,
|
TT(_LOWER), 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_PGUP,
|
||||||
KC_LSFTCAPS, 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_PGDN,
|
KC_LSFTCAPS, 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_PGDN,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, LT(_FN1, KC_SPC), KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
KC_LCTL, KC_LGUI, KC_LALT, LT(_FN1, KC_SPC), KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
[_FN1] = LAYOUT_65(
|
[_FN1] = LAYOUT_65(
|
||||||
@@ -65,13 +36,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_CAPS, KC_NO, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_HOME,
|
KC_CAPS, KC_NO, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_HOME,
|
||||||
KC_TRNS, KC_NO, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_MOD, KC_END,
|
KC_TRNS, KC_NO, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_MOD, KC_END,
|
||||||
KC_TRNS, KC_WINLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_APP, RGB_SPD, RGB_RMOD, RGB_SPI),
|
KC_TRNS, KC_WINLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_APP, RGB_SPD, RGB_RMOD, RGB_SPI),
|
||||||
[_MO2] = LAYOUT_65(
|
[_LOWER] = LAYOUT_65(
|
||||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_PSLS, KC_PEQL, KC_TRNS,
|
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_PSLS, KC_PEQL, KC_TRNS,
|
||||||
KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS,
|
KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_TAB, KC_P1, KC_P2, KC_P3, KC_NO, KC_PAST, KC_PENT, KC_HOME,
|
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_TAB, KC_P1, KC_P2, KC_P3, KC_NO, KC_PAST, KC_PENT, KC_HOME,
|
||||||
KC_TRNS, KC_NO, KC_DEL, KC_INS, KC_NO, KC_NO, KC_NLCK, KC_P0, DOUBLEZERO, KC_PDOT, KC_PSLS, KC_TRNS, RCTL(KC_PGUP), KC_END,
|
KC_TRNS, KC_NO, KC_DEL, KC_INS, KC_NO, KC_NO, KC_NLCK, KC_P0, KC_00, KC_PDOT, KC_PSLS, KC_TRNS, RCTL(KC_PGUP), KC_END,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT)),
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT)),
|
||||||
[_MO3] = LAYOUT_65(
|
[_RAISE] = LAYOUT_65(
|
||||||
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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_DOWN, 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_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
@@ -80,27 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
// process_record_user() moved to userspace
|
||||||
case DOUBLEZERO:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
// when keycode DOUBLEZERO is pressed
|
|
||||||
SEND_STRING("00");
|
|
||||||
} else {
|
|
||||||
// when keycode DOUBLEZERO is released
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case KC_WINLCK:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
_isWinKeyDisabled = !_isWinKeyDisabled; //toggle status
|
|
||||||
if(_isWinKeyDisabled) {
|
|
||||||
process_magic(GUI_OFF, record);
|
|
||||||
} else {
|
|
||||||
process_magic(GUI_ON, record);
|
|
||||||
}
|
|
||||||
} else unregister_code16(keycode);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -183,22 +135,19 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
|||||||
|
|
||||||
bool led_update_user(led_t led_state) {
|
bool led_update_user(led_t led_state) {
|
||||||
rgblight_set_layer_state(_rgbCAPS, led_state.caps_lock);
|
rgblight_set_layer_state(_rgbCAPS, led_state.caps_lock);
|
||||||
rgblight_set_layer_state(_rgbWINLOCK, _isWinKeyDisabled);
|
rgblight_set_layer_state(_rgbWINLOCK, keymap_config.no_gui);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
rgblight_set_layer_state(_rgbFN, layer_state_cmp(state, _FN1));
|
rgblight_set_layer_state(_rgbFN, layer_state_cmp(state, _FN1));
|
||||||
rgblight_set_layer_state(_rgbNUMPAD, layer_state_cmp(state, _MO2));
|
rgblight_set_layer_state(_rgbNUMPAD, layer_state_cmp(state, _LOWER));
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_keymap(void) {
|
||||||
|
// keyboard_post_init_user() moved to userspace
|
||||||
if (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // turn on Num lock by defautl so that the numpad layer always has predictable results
|
|
||||||
tap_code(KC_NUMLOCK);
|
|
||||||
}
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_mode(1); // single colour mode
|
rgblight_mode(1); // single colour mode
|
||||||
rgblight_setrgb(RGB_GODSPEED); // Default startup colour
|
rgblight_setrgb(RGB_GODSPEED); // Default startup colour
|
||||||
|
|||||||
@@ -18,6 +18,13 @@
|
|||||||
- Add capslock indicator, win key lock indicator
|
- Add capslock indicator, win key lock indicator
|
||||||
- Fn and layer 2 indicators using RGB underglow
|
- Fn and layer 2 indicators using RGB underglow
|
||||||
|
|
||||||
|
rules.mk OPTIONS - Active features from userspace
|
||||||
|
STARTUP_NUMLOCK_ON = yes
|
||||||
|
- turns on NUMLOCK by default
|
||||||
|
|
||||||
|
TD_LSFT_CAPSLOCK_ENABLE = yes
|
||||||
|
- This will enable double tap on Left Shift to toggle CAPSLOCK when using KC_LSFTCAPS
|
||||||
|
|
||||||
## All layers diagram
|
## All layers diagram
|
||||||
|
|
||||||
Default Layer
|
Default Layer
|
||||||
|
|||||||
@@ -4,3 +4,6 @@ LTO_ENABLE = yes
|
|||||||
|
|
||||||
MOUSEKEY_ENABLE = no
|
MOUSEKEY_ENABLE = no
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
|
|
||||||
|
TD_LSFT_CAPSLOCK_ENABLE = yes
|
||||||
|
STARTUP_NUMLOCK_ON = yes
|
||||||
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define ___ KC_NO
|
#define ___ KC_NO
|
||||||
|
|
||||||
#define LAYOUT( \
|
#define LAYOUT_all( \
|
||||||
k00, k13, k14, k12, k10, \
|
k00, k13, k14, k12, k10, \
|
||||||
k11, k04, k02, k03, \
|
k11, k04, k02, k03, \
|
||||||
k22, k32, k21, k01 \
|
k22, k32, k21, k01 \
|
||||||
|
|||||||
Loaded 100 of 259 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user