mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79edb7c594 | ||
|
|
d1b6c11b7f | ||
|
|
5421ba11de | ||
|
|
b252cce18f | ||
|
|
3f6426ff5f | ||
|
|
e75919960f | ||
|
|
af683fc2ca | ||
|
|
80713a8a58 | ||
|
|
f48986dda2 | ||
|
|
543e612003 | ||
|
|
1d550552ca | ||
|
|
b2b947f815 | ||
|
|
54d8251f6f | ||
|
|
e87434aa32 | ||
|
|
1d4287cb95 |
@@ -5,3 +5,4 @@
|
||||
- [:fr: Français](/fr-fr/)
|
||||
- [:he: עברית](/he-il/)
|
||||
- [:ru: Русский](/ru-ru/)
|
||||
- [:ja: 日本語](/ja/)
|
||||
|
||||
@@ -41,11 +41,13 @@
|
||||
placeholder: {
|
||||
'/es/': 'Buscar',
|
||||
'/zh-cn/': '搜索',
|
||||
'/ja/': '検索',
|
||||
'/': 'Search'
|
||||
},
|
||||
noData: {
|
||||
'/es/': '¡Ningún resultado!',
|
||||
'/zh-cn/': '没有结果!',
|
||||
'/ja/': '見つかりません!',
|
||||
'/': 'No results!'
|
||||
},
|
||||
depth: 6
|
||||
|
||||
40
docs/ja/newbs.md
Normal file
40
docs/ja/newbs.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# QMK 初心者ガイド
|
||||
|
||||
<!---
|
||||
original document: ed0575fc8:docs/newbs.md
|
||||
$ git diff ed0575fc8 HEAD docs/newbs.md
|
||||
-->
|
||||
|
||||
QMK は、メカニカルキーボード用の強力なオープンソースファームウェアです。
|
||||
QMK を使用して、シンプルかつ強力な方法でキーボードをカスタマイズできます。
|
||||
完全な初心者からプログラマーに至るまで、あらゆるスキルレベルの人々が QMK を使用してキーボードをカスタマイズしています。
|
||||
このガイドは、あなたのスキルにかかわらず、同じことを行う手助けをします。
|
||||
|
||||
お使いのキーボードで QMK を実行できるかどうか不明ですか?
|
||||
もし作成したキーボードがメカニカルキーボードの場合、実行できる可能性が高いです。
|
||||
QMK は[多くの趣味のキーボード](http://qmk.fm/keyboards/)をサポートしているため、もし現在のキーボードで QMK を実行できない場合でも、ニーズに合ったキーボードを見つけるのに問題はないはずです。
|
||||
|
||||
## 概要
|
||||
|
||||
このガイドには7つの主要なセクションがあります。
|
||||
|
||||
* [はじめに](newbs_getting_started.md)
|
||||
* [コマンドラインを使用して初めてのファームウェアを構築する](newbs_building_firmware.md)
|
||||
* [オンライン GUI を使用して初めてのファームウェアを構築する](newbs_building_firmware_configurator.md)
|
||||
* [ファームウェアを書きこむ](newbs_flashing.md)
|
||||
* [テストとデバッグ](newbs_testing_debugging.md)
|
||||
* [Git の最良の慣行](newbs_best_practices.md)
|
||||
* [さらに学ぶための学習リソース](newbs_learn_more_resources.md)
|
||||
|
||||
このガイドは、これまでソフトウェアをコンパイルしたことがない人を支援することに特化しています。
|
||||
その観点から選択と推奨を行います。
|
||||
これらの手順の多くには代替方法があり、これらの代替方法のほとんどをサポートしています。
|
||||
タスクを達成する方法について疑問がある場合は、[案内を求めることができます](getting_started_getting_help.md)。
|
||||
|
||||
## 追加のリソース(英語)
|
||||
|
||||
* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 新規ユーザ視点から見た QMK ファームウェアの基本的な使用方法をカバーしたユーザ作成のブログ。
|
||||
|
||||
## 追加のリソース(日本語)
|
||||
|
||||
_日本語のリソース情報を募集中です。_
|
||||
168
docs/ja/newbs_best_practices.md
Normal file
168
docs/ja/newbs_best_practices.md
Normal file
@@ -0,0 +1,168 @@
|
||||
# Best Practices
|
||||
|
||||
<!---
|
||||
original document: ed0575fc8:docs/newbs_best_practices.md
|
||||
$ git diff ed0575fc8 HEAD docs/newbs_best_practices.md
|
||||
-->
|
||||
|
||||
## Or, "How I Learned to Stop Worrying and Love Git."
|
||||
|
||||
This document aims to instruct novices in the best ways to have a smooth experience in contributing to QMK. We will walk through the process of contributing to QMK, detailing some ways to make this task easier, and then later we'll break some things in order to teach you how to fix them.
|
||||
|
||||
This document assumes a few things:
|
||||
|
||||
1. You have a GitHub account, and have [forked the qmk_firmware repository](getting_started_github.md) to your account.
|
||||
2. You've [set up your build environment](newbs_getting_started.md?id=environment-setup).
|
||||
|
||||
|
||||
## Your fork's master: Update Often, Commit Never
|
||||
|
||||
It is highly recommended for QMK development, regardless of what is being done or where, to keep your `master` branch updated, but ***never*** commit to it. Instead, do all your changes in a development branch and issue pull requests from your branches when you're developing.
|
||||
|
||||
To reduce the chances of merge conflicts — instances where two or more users have edited the same part of a file concurrently — keep your `master` branch relatively up-to-date, and start any new developments by creating a new branch.
|
||||
|
||||
### Updating your master branch
|
||||
|
||||
To keep your `master` branch updated, it is recommended to add the QMK Firmware repository ("repo") as a remote repository in git. To do this, open your Git command line interface and enter:
|
||||
|
||||
```
|
||||
git remote add upstream https://github.com/qmk/qmk_firmware.git
|
||||
```
|
||||
|
||||
To verify that the repository has been added, run `git remote -v`, which should return the following:
|
||||
|
||||
```
|
||||
$ git remote -v
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (fetch)
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (push)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (fetch)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (push)
|
||||
```
|
||||
|
||||
Now that this is done, you can check for updates to the repo by running `git fetch upstream`. This retrieves the branches and tags — collectively referred to as "refs" — from the QMK repo, which now has the nickname `upstream`. We can now compare the data on our fork `origin` to that held by QMK.
|
||||
|
||||
To update your fork's master, run the following, hitting the Enter key after each line:
|
||||
|
||||
```
|
||||
git checkout master
|
||||
git fetch upstream
|
||||
git pull upstream master
|
||||
git push origin master
|
||||
```
|
||||
|
||||
This switches you to your `master` branch, retrieves the refs from the QMK repo, downloads the current QMK `master` branch to your computer, and then uploads it to your fork.
|
||||
|
||||
### Making Changes
|
||||
|
||||
To make changes, create a new branch by entering:
|
||||
|
||||
```
|
||||
git checkout -b dev_branch
|
||||
git push --set-upstream origin dev_branch
|
||||
```
|
||||
|
||||
This creates a new branch named `dev_branch`, checks it out, and then saves the new branch to your fork. The `--set-upstream` argument tells git to use your fork and the `dev_branch` branch every time you use `git push` or `git pull` from this branch. It only needs to be used on the first push; after that, you can safely use `git push` or `git pull`, without the rest of the arguments.
|
||||
|
||||
!> With `git push`, you can use `-u` in place of `--set-upstream` — `-u` is an alias for `--set-upstream`.
|
||||
|
||||
You can name your branch nearly anything you want, though it is recommended to name it something related to the changes you are going to make.
|
||||
|
||||
By default `git checkout -b` will base your new branch on the branch that is checked out. You can base your new branch on an existing branch that is not checked out by adding the name of the existing branch to the command:
|
||||
|
||||
```
|
||||
git checkout -b dev_branch master
|
||||
```
|
||||
|
||||
Now that you have a development branch, open your text editor and make whatever changes you need to make. It is recommended to make many small commits to your branch; that way, any change that causes issues can be more easily traced and undone if needed. To make your changes, edit and save any files that need to be updated, add them to Git's *staging area*, and then commit them to your branch:
|
||||
|
||||
```
|
||||
git add path/to/updated_file
|
||||
git commit -m "My commit message."
|
||||
```
|
||||
|
||||
`git add` adds files that have been changed to Git's *staging area*, which is Git's "loading zone." This contains the changes that are going to be *committed* by `git commit`, which saves the changes to the repo. Use descriptive commit messages so you can know what was changed at a glance.
|
||||
|
||||
!> If you've changed a lot of files, but all the files are part of the same change, you can use `git add .` to add all the changed files that are in your current directory, rather than having to add each file individually.
|
||||
|
||||
### Publishing Your Changes
|
||||
|
||||
The last step is to push your changes to your fork. To do this, enter `git push`. Git now publishes the current state of `dev_branch` to your fork.
|
||||
|
||||
|
||||
## Resolving Merge Conflicts
|
||||
|
||||
Sometimes when your work in a branch takes a long time to complete, changes that have been made by others conflict with changes you have made to your branch when you open a pull request. This is called a *merge conflict*, and is what happens when multiple people edit the same parts of the same files.
|
||||
|
||||
### Rebasing Your Changes
|
||||
|
||||
A *rebase* is Git's way of taking changes that were applied at one point, reversing them, and then applying the same changes to another point. In the case of a merge conflict, you can rebase your branch to grab the changes that were made between when you created your branch and the present time.
|
||||
|
||||
To start, run the following:
|
||||
|
||||
```
|
||||
git fetch upstream
|
||||
git rev-list --left-right --count HEAD...upstream/master
|
||||
```
|
||||
|
||||
The `git rev-list` command entered here returns the number of commits that differ between the current branch and QMK's master branch. We run `git fetch` first to make sure we have the refs that represent the current state of the upstream repo. The output of the `git rev-list` command entered returns two numbers:
|
||||
|
||||
```
|
||||
$ git rev-list --left-right --count HEAD...upstream/master
|
||||
7 35
|
||||
```
|
||||
|
||||
The first number represents the number of commits on the current branch since it was created, and the second number is the number of commits made to `upstream/master` since the current branch was created, and thus, the changes that are not recorded in the current branch.
|
||||
|
||||
Now that the current states of both the current branch and the upstream repo are known, we can start a rebase operation:
|
||||
|
||||
```
|
||||
git rebase upstream/master
|
||||
```
|
||||
|
||||
This tells Git to undo the commits on the current branch, and then reapply them against QMK's master branch.
|
||||
|
||||
```
|
||||
$ git rebase upstream/master
|
||||
First, rewinding head to replay your work on top of it...
|
||||
Applying: Commit #1
|
||||
Using index info to reconstruct a base tree...
|
||||
M conflicting_file_1.txt
|
||||
Falling back to patching base and 3-way merge...
|
||||
Auto-merging conflicting_file_1.txt
|
||||
CONFLICT (content): Merge conflict in conflicting_file_1.txt
|
||||
error: Failed to merge in the changes.
|
||||
hint: Use 'git am --show-current-patch' to see the failed patch
|
||||
Patch failed at 0001 Commit #1
|
||||
|
||||
Resolve all conflicts manually, mark them as resolved with
|
||||
"git add/rm <conflicted_files>", then run "git rebase --continue".
|
||||
You can instead skip this commit: run "git rebase --skip".
|
||||
To abort and get back to the state before "git rebase", run "git rebase --abort".
|
||||
```
|
||||
|
||||
This tells us that we have a merge conflict, and gives the name of the file with the conflict. Open the conflicting file in your text editor, and somewhere in the file, you'll find something like this:
|
||||
|
||||
```
|
||||
<<<<<<< HEAD
|
||||
<p>For help with any issues, email us at support@webhost.us.</p>
|
||||
=======
|
||||
<p>Need help? Email support@webhost.us.</p>
|
||||
>>>>>>> Commit #1
|
||||
```
|
||||
|
||||
The line `<<<<<<< HEAD` marks the beginning of a merge conflict, and the `>>>>>>> Commit #1` line marks the end, with the conflicting sections separated by `=======`. The part on the `HEAD` side is from the QMK master version of the file, and the part marked with the commit message is from the current branch and commit.
|
||||
|
||||
Because Git tracks *changes to files* rather than the contents of the files directly, if Git can't find the text that was in the file previous to the commit that was made, it won't know how to edit the file. Re-editing the file will solve the conflict. Make your changes, and then save the file.
|
||||
|
||||
```
|
||||
<p>Need help? Email support@webhost.us.</p>
|
||||
```
|
||||
|
||||
Now run:
|
||||
|
||||
```
|
||||
git add conflicting_file_1.txt
|
||||
git rebase --continue
|
||||
```
|
||||
|
||||
Git logs the changes to the conflicting file, and continues applying the commits from our branch until it reaches the end.
|
||||
98
docs/ja/newbs_building_firmware.md
Normal file
98
docs/ja/newbs_building_firmware.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# 初めてのファームウェアを構築する(コマンドライン版)
|
||||
|
||||
<!---
|
||||
original document: ed0575fc8:docs/newbs_building_firmware.md
|
||||
$ git diff ed0575fc8 HEAD docs/newbs_building_firmware.md
|
||||
-->
|
||||
|
||||
ビルド環境をセットアップしたので、カスタムファームウェアのビルドを開始する準備ができました。
|
||||
ガイドのこのセクションでは、ファイルマネージャ、テキストエディタ、ターミナルウィンドウの3つのプログラム間を行き来します。
|
||||
キーボードファームウェアが完成して満足するまで、この3つすべてを開いたままにします。
|
||||
|
||||
ガイドの最初の部分を読んだ後でターミナルウィンドウを閉じて再度開いていた場合は、ターミナルが正しいディレクトリにあるように `cd qmk_firmware` を忘れないでください。
|
||||
|
||||
## キーマップフォルダに移動する
|
||||
|
||||
あなたのキーボードの `keymaps`フォルダに移動することから始めます。
|
||||
|
||||
macOS または Windows を使用している場合は、キーマップフォルダを簡単に開くために使用できるコマンドがあります。
|
||||
|
||||
### macOS:
|
||||
|
||||
``` open keyboards/<keyboard_folder>/keymaps ```
|
||||
|
||||
### Windows:
|
||||
|
||||
``` start .\\keyboards\\<keyboard_folder>\\keymaps ```
|
||||
|
||||
## `default` キーマップのコピーを作成する
|
||||
|
||||
`keymaps` フォルダを開いたら、`default`フォルダのコピーを作成します。
|
||||
フォルダには、あなたの GitHub でのユーザー名と同じ名前を付けることを強くお勧めしますが、小文字、数字、アンダースコアのみが含まれている限り、任意の名前を使用できます。
|
||||
|
||||
この手順を自動化するために、`new_keymap.sh`スクリプトを実行する方法もあります。
|
||||
|
||||
`qmk_firmware/util` ディレクトリに移動して、次を入力します。
|
||||
|
||||
```
|
||||
./new_keymap.sh <keyboard path> <username>
|
||||
```
|
||||
|
||||
たとえば、John という名前のユーザーが 1up60hse の新しいキーマップを作成しようとするには、次のように入力します。
|
||||
|
||||
```
|
||||
./new_keymap.sh 1upkeyboards/1up60hse john
|
||||
```
|
||||
|
||||
## あなたの好みのテキストエディタで `keymap.c` を開く
|
||||
|
||||
`keymap.c`を開きます。
|
||||
このファイル内には、キーボードの動作を制御する構造があります。
|
||||
`keymap.c`の上部には、キーマップを読みやすくする `define` と `enum` があります。
|
||||
さらに下には、次のような行があります。
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
この行はレイヤーのリストの開始を表わしています。
|
||||
その下には、`LAYOUT` または `KEYMAP` のいずれかを含む行があり、これらの行はレイヤーの開始を表わしています。
|
||||
その行の下には、その特定のレイヤーを構成するキーのリストがあります。
|
||||
|
||||
!> キーマップファイルを編集するときは、カンマを追加したり削除したりしないように注意してください。そうするとファームウェアのコンパイルができなくなり、余分であったり欠落していたりするカンマがどこにあるのかを容易に把握できない場合があります。
|
||||
|
||||
## 好みに合わせてレイアウトをカスタマイズ
|
||||
|
||||
納得のいくまでこのステップを繰り返します。
|
||||
気になる点をひとつづつ変更して試すのもよし、全部作りなおすのもよし。
|
||||
あるレイヤー全体が必要ない場合はレイヤーを削除することもでき、必要があれば、合計 32 個までレイヤーを追加することもできます。
|
||||
ここで定義できる内容については、次のドキュメントを参照してください。
|
||||
|
||||
* [キーコード](keycodes.md)
|
||||
* [機能](features.md)
|
||||
* [FAQ](faq.md)
|
||||
|
||||
?> キーマップがどのように機能するかを感じながら、各変更を小さくしてください。大きな変更は、発生する問題のデバッグを困難にします。
|
||||
|
||||
## ファームウェアをビルドする
|
||||
|
||||
キーマップの変更が完了したら、ファームウェアをビルドする必要があります。これを行うには、ターミナルウィンドウに戻り、ビルドコマンドを実行します:
|
||||
|
||||
make <my_keyboard>:<my_keymap>
|
||||
|
||||
たとえば、キーマップの名前が "xyverz" で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します:
|
||||
|
||||
make planck/rev5:xyverz
|
||||
|
||||
これがコンパイルされる間、どのファイルがコンパイルされているかを知らせる多くの出力が画面に表示されます。
|
||||
次のような出力で終わるはずです。
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev5_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
|
||||
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
|
||||
Checking file size of planck_rev5_xyverz.hex [OK]
|
||||
* File size is fine - 18392/28672
|
||||
```
|
||||
|
||||
## ファームウェアを書きこむ
|
||||
|
||||
[「ファームウェアを書きこむ」](newbs_flashing.md) に移動して、キーボードに新しいファームウェアを書き込む方法を学習します。
|
||||
112
docs/ja/newbs_building_firmware_configurator.md
Normal file
112
docs/ja/newbs_building_firmware_configurator.md
Normal file
@@ -0,0 +1,112 @@
|
||||
# QMK Configurator
|
||||
|
||||
<!---
|
||||
original document: ed0575fc8:docs/newbs_building_firmware_configurator.md
|
||||
$ git diff ed0575fc8 HEAD docs/newbs_building_firmware_configurator.md
|
||||
-->
|
||||
|
||||
[QMK Configurator](https://config.qmk.fm) は、QMKファームウェアの hex ファイルを生成するオンライングラフィカルユーザーインターフェイスです。
|
||||
|
||||
?> **次の手順を順番に実行してください。**
|
||||
|
||||
[Video Tutorial](https://youtu.be/tx54jkRC9ZY) を見てください。
|
||||
|
||||
QMK Configurator は Chrome/Firefox で最適に動作します。
|
||||
|
||||
!> **KLE や kbfirmware などの他のツールのファイルは、QMK Configurator と互換性がありません。それらをロードしたり、インポートしたりしないでください。QMK Configurator は異なるツールです。**
|
||||
|
||||
## キーボードを選ぶ
|
||||
|
||||
ドロップダウンボックスをクリックして、キーマップを作成するキーボードを選択します。
|
||||
|
||||
?> **キーボードに複数のバージョンがある場合は、正しいバージョンを選択してください。**
|
||||
|
||||
大事なことなのでもう一度言います。
|
||||
|
||||
!> **正しいバージョンを選択してください!**
|
||||
|
||||
キーボードが QMK を搭載していると宣伝されていてもリストにない場合は、開発者がまだ作業中か、私たちがまだマージするきっかけがなかった可能性があります。
|
||||
アクティブな [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) がない場合、[qmk_firmware](https://github.com/qmk/qmk_firmware/issues)で報告して、その特定のキーボードのサポートをリクエストします。
|
||||
製作者自身の github アカウントにある QMK 搭載キーボードもあります。
|
||||
それも再確認してください。
|
||||
|
||||
## キーボードのレイアウトを選択する
|
||||
|
||||
作成したいと思うキーマップに最も近いレイアウトを選択します。一部のキーボードには、まだ十分なレイアウトまたは正しいレイアウトが定義されていません。これらは将来サポートされる予定です。
|
||||
|
||||
## キーマップの名前
|
||||
|
||||
お好みの名前をキーマップにつけます。
|
||||
|
||||
?> コンパイル時に問題が発生した場合は、もしかすると QMK ファームウェアリポジトリに既に同じ名前が存在しているのかもしれません、名前を変更してみてください。
|
||||
|
||||
## キーマップを作る
|
||||
|
||||
キーコード入力は3つの方法で実行できます。
|
||||
1. ドラッグ・アンド・ドロップ
|
||||
2. レイアウト上の空の場所をクリックして、希望するキーコードをクリックします
|
||||
3. レイアウト上の空の場所をクリックして、キーボードの物理キーを押します
|
||||
|
||||
マウスをキーの上に置くと、そのキーコードの機能の短い説明文が出ます。より詳細な説明については以下を見てください。
|
||||
|
||||
[Basic Keycode Reference](https://docs.qmk.fm/#/keycodes_basic)
|
||||
[Advanced Keycode Reference](https://docs.qmk.fm/#/feature_advanced_keycodes)
|
||||
|
||||
キーマップをサポートするレイアウトが見つからない場合、例えばスペースバーが3分割されていたり、バックスペースが2分割されていたり、シフトが2分割されているような場合、それらを全て埋めてください。
|
||||
|
||||
### 例:
|
||||
|
||||
3分割のスペースバー: 全てスペースバーで埋めます。
|
||||
|
||||
2分割のバックスペース: 両方ともバックスペースで埋めます。
|
||||
|
||||
2分割の右シフト: 両方とも右シフトで埋めます。
|
||||
|
||||
左シフトとISOサポート用に1つずつ: 両方とも左シフトで埋めます。
|
||||
|
||||
5分割だが4キーのみ: 以前やったことがある人を推測して確認するか尋ねてください。
|
||||
|
||||
## 後日のためにキーマップを保存する
|
||||
|
||||
キーマップに満足するか、または後で作業したい場合は、`Export Keymap' ボタンを押します。上記で選択した名前に .json が追加されたキーマップが保存されます。
|
||||
|
||||
後日、`Import Keymap` ボタンを押すことで、この .json ファイルをロードできます。
|
||||
|
||||
!> **注意:** このファイルは、kbfirmware.com またはその他のツールに使用される .jsonファイルと同じ形式ではありません。これらのツールにこれを使用したり、QMK Configurator でこれらのツールの .json を使用しようとすると、キーボードが **爆発** する可能性があります。
|
||||
|
||||
## ファームウェアファイルを生成する
|
||||
|
||||
緑色の `Compile` ボタンを押します。
|
||||
|
||||
コンパイルが完了すると、緑色の `Download Firmware` ボタンを押すことができます。
|
||||
|
||||
## キーボードに書き込む(フラッシュする)
|
||||
|
||||
[ファームウェアを書きこむ](newbs_flashing.md) を参照してください。
|
||||
|
||||
## トラブルシューティング
|
||||
|
||||
#### 私の .json ファイルが動きません
|
||||
|
||||
.json ファイルが QMK Configurator で作ったものの場合、おめでとうございます。バグに遭遇しました。 [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) で報告してください。
|
||||
|
||||
そうでない場合は、... 他の .json ファイルを使用しないようにという、上に書いた注意書きを見逃してませんか?
|
||||
|
||||
#### レイアウトに余分なスペースがありますか?どうすればいいですか?
|
||||
|
||||
もしスペースバーが3つに分かれている場合は、全てスペースバーで埋めるのが最善の方法です。バックスペースやシフトについても同じことができます。
|
||||
|
||||
#### キーコードってなに?
|
||||
|
||||
以下を見てください。
|
||||
|
||||
[Basic Keycode Reference](https://docs.qmk.fm/#/keycodes_basic)
|
||||
[Advanced Keycode Reference](https://docs.qmk.fm/#/feature_advanced_keycodes)
|
||||
|
||||
#### コンパイルできません
|
||||
|
||||
キーマップの他のレイヤーを再確認して、ランダムなキーが存在しないことを確認してください。
|
||||
|
||||
## 問題とバグ
|
||||
|
||||
私たちは利用者の依頼やバグレポートを常に受け入れています。[qmk_configurator](https://github.com/qmk/qmk_configurator/issues) で報告してください。
|
||||
399
docs/ja/newbs_flashing.md
Normal file
399
docs/ja/newbs_flashing.md
Normal file
@@ -0,0 +1,399 @@
|
||||
# ファームウェアを書きこむ
|
||||
|
||||
<!---
|
||||
original document: ed0575fc8:docs/newbs_flashing.md
|
||||
$ git diff ed0575fc8 HEAD docs/newbs_flashing.md
|
||||
-->
|
||||
|
||||
カスタムファームウェアは出来たので、キーボードに書き込みたくなるでしょう/フラッシュしたくなるでしょう。
|
||||
|
||||
## QMK Toolbox を使ってキーボードに書き込む
|
||||
|
||||
キーボードに書き込む最も簡単な方法は [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) を使うことです。
|
||||
|
||||
ただし、QMK Toolbox は、現在は Windows と macOS でしか使えません。
|
||||
Linuxを使用している場合(および、コマンドラインでファームウェアを書き込みたい場合)は、下の方で概説する[方法](newbs_flashing.md#コマンドラインでファームウェアを書き込む)で行なう必要があります。
|
||||
|
||||
### QMK Toolbox にファイルをロードする
|
||||
|
||||
まず QMK Toolbox アプリケーションを起動します。
|
||||
Finder またはエクスプローラーでファームウェアのファイルを探します。
|
||||
ファイル名は `.hex` または `.bin` のどちらかの形式です。
|
||||
ビルド時に QMK は、キーボードに適した形式のものを `qmk_firmware` のトップフォルダにコピーしているはずです。
|
||||
|
||||
Windows か macOS を使用しているときは現在のファームウェアフォルダをエクスプローラーか Finder で簡単に開くためのコマンドがあります。
|
||||
|
||||
#### Windows
|
||||
|
||||
```
|
||||
start .
|
||||
```
|
||||
|
||||
#### macOS
|
||||
|
||||
```
|
||||
open .
|
||||
```
|
||||
|
||||
ファームウェアファイルは常に以下の命名形式に従っています。
|
||||
|
||||
```
|
||||
<keyboard_name>_<keymap_name>.{bin,hex}
|
||||
```
|
||||
|
||||
例えば、`plank/rev5` の `default` キーマップのファイル名は以下のようになります。
|
||||
|
||||
```
|
||||
planck_rev5_default.hex
|
||||
```
|
||||
|
||||
ファームウェアファイルを見つけたら、QMK Toolbox の "Local file" ボックスにドラッグするか、"Open" をクリックしてファームウェアファイルを指定します。
|
||||
|
||||
### キーボードを DFU (Bootloader) モードにする
|
||||
|
||||
ファームウェアを書き込むには、キーボードを普段とは違う特別な状態、フラッシュモードにする必要があります。
|
||||
このモードでは、キーボードはキーボードとしての機能をはたしません。
|
||||
ファームウェアの書き込み中にキーボードのケーブルを抜いたり、書き込みプロセスを中断したりしないことが非常に重要です。
|
||||
|
||||
キーボードによって、この特別なモードに入る方法は異なります。
|
||||
キーボードが現在 QMK または TMK を実行しており、キーボードメーカーから具体的な指示が与えられていない場合は、次を順番に試してください。
|
||||
|
||||
* 両方のシフトキーを押しながら、`Pause` キーを押す
|
||||
* 両方のシフトキーを押しながら、`B` キーを押す
|
||||
* キーボードのケーブルを抜いて、スペースバーとBを同時に押しながら、キーボードを再び接続し、1秒待ってからキーを放す
|
||||
* 基板(PCB)に付けられている物理的な `RESET` ボタンを押す
|
||||
* PCB 上の `BOOT0` か `RESET` のラベルの付いたヘッダピンを探し、PCB 接続中にそれらを互いにショートする
|
||||
|
||||
うまくいけば、QMK Toolboxに次のようなメッセージが表示されます。
|
||||
|
||||
```
|
||||
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
|
||||
*** DFU device connected
|
||||
```
|
||||
|
||||
### キーボードへの書き込み
|
||||
|
||||
QMK Toolbox の `Flash` ボタンをクリックします。
|
||||
次のような出力が表示されます。
|
||||
|
||||
```
|
||||
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
|
||||
*** DFU device connected
|
||||
*** Attempting to flash, please don't remove device
|
||||
>>> dfu-programmer atmega32u4 erase --force
|
||||
Erasing flash... Success
|
||||
Checking memory from 0x0 to 0x6FFF... Empty.
|
||||
>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
|
||||
Checking memory from 0x0 to 0x55FF... Empty.
|
||||
0% 100% Programming 0x5600 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
0% 100% Reading 0x7000 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
Validating... Success
|
||||
0x5600 bytes written into 0x7000 bytes memory (76.79%).
|
||||
>>> dfu-programmer atmega32u4 reset
|
||||
|
||||
*** DFU device disconnected
|
||||
*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
|
||||
```
|
||||
|
||||
## コマンドラインでファームウェアを書き込む
|
||||
|
||||
これは、以前のものと比較して非常に単純になりました。
|
||||
ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。
|
||||
|
||||
make <my_keyboard>:<my_keymap>:flash
|
||||
|
||||
たとえば、キーマップの名前が xyverz で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します。
|
||||
|
||||
make planck/rev5:xyverz:flash
|
||||
|
||||
これにより、キーボードの構成が確認され、指定されたブートローダに基づいてキーボードへの書き込みが試行されます。
|
||||
これはあなたがキーボードが使用するブートローダを知る必要がないことを意味します。
|
||||
コマンドをただ実行して、コマンド自身に難しい処理を任せます。
|
||||
|
||||
ただし、これはキーボードごとに設定されているブートローダに依存します。
|
||||
もしこの情報が設定されていない場合、または使用しているキーボードのファームウェアの書き込みにサポートしていないターゲットが設定されている場合、次のエラーが表示されます。
|
||||
|
||||
WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time.
|
||||
|
||||
この場合、あなたは明示的にブートローダを指定する方法を使わなければなりません。
|
||||
|
||||
ブートローダは主に 5 種類のものが使われています。
|
||||
Pro Micro とそのクローンは Caterina を、Teensy は HalfKay を、OLKBの AVR ボードは QMK-DFU を、その他の ATmega32U4 ボードは DFU を、そして多くの ARM ボードは ARM DFU を使います。
|
||||
|
||||
より詳しいブートローダの情報は、[Flashing Instructions and Bootloader Information](flashing.md) にあります。
|
||||
|
||||
使用しているブートローダがわかっているならば、ファームウェアをコンパイルするときに、実は `make` コマンドにブートローダを指定するテキストを追加して、書き込みプロセスを自動化できます。
|
||||
|
||||
### DFU
|
||||
|
||||
DFU ブートローダの場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。
|
||||
|
||||
make <my_keyboard>:<my_keymap>:dfu
|
||||
|
||||
たとえば、キーマップの名前が xyverz で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します。
|
||||
|
||||
make planck/rev5:xyverz:dfu
|
||||
|
||||
コンパイルが終了すると、以下の出力になるはずです。
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev5_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
|
||||
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
|
||||
Checking file size of planck_rev5_xyverz.hex
|
||||
* File size is fine - 18574/28672
|
||||
```
|
||||
|
||||
ここまでくると、ビルドスクリプトは5秒ごとに DFU ブートローダを探します。
|
||||
デバイスが見つかるか、あなたがキャンセルするまで、以下を繰り返します。
|
||||
|
||||
dfu-programmer: no device present.
|
||||
Error: Bootloader not found. Trying again in 5s.
|
||||
|
||||
これを実行したら、コントローラーをリセットする必要があります。
|
||||
そして下のような出力が表示されます。
|
||||
|
||||
```
|
||||
*** Attempting to flash, please don't remove device
|
||||
>>> dfu-programmer atmega32u4 erase --force
|
||||
Erasing flash... Success
|
||||
Checking memory from 0x0 to 0x6FFF... Empty.
|
||||
>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
|
||||
Checking memory from 0x0 to 0x55FF... Empty.
|
||||
0% 100% Programming 0x5600 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
0% 100% Reading 0x7000 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
Validating... Success
|
||||
0x5600 bytes written into 0x7000 bytes memory (76.79%).
|
||||
>>> dfu-programmer atmega32u4 reset
|
||||
```
|
||||
|
||||
?> `dfu-programmer:no device present` など、これに関する問題がある場合は、[よくある質問](faq_build.md) を参照してください。
|
||||
|
||||
#### DFU コマンド
|
||||
|
||||
ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。
|
||||
|
||||
* `:dfu` - これが通常のオプションで、DFUデバイスが使用可能になるまで待機したのちファームウェアを書き込みます。5秒ごとに、DFUデバイスが存在するかチェックしています。
|
||||
* `:dfu-ee` - 通常の hex ファイルの代わりに `eep` ファイルを書き込みます。これを使用するのはまれです。
|
||||
* `:dfu-split-left` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROMファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_
|
||||
* `:dfu-split-right` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROMファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_
|
||||
|
||||
|
||||
### Caterina
|
||||
|
||||
Arduino ボードとそれらのクローンの場合(たとえば SparkFun ProMicro)、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。
|
||||
|
||||
make <my_keyboard>:<my_keymap>:avrdude
|
||||
|
||||
たとえば、キーマップの名前が xyverz で、rev2 Lets Split のキーマップを作成している場合、次のコマンドを使用します。
|
||||
|
||||
make lets_split/rev2:xyverz:avrdude
|
||||
|
||||
ファームウェアのコンパイルが完了すると、以下のように出力されます。
|
||||
|
||||
```
|
||||
Linking: .build/lets_split_rev2_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK]
|
||||
Checking file size of lets_split_rev2_xyverz.hex [OK]
|
||||
* File size is fine - 27938/28672
|
||||
Detecting USB port, reset your controller now..............
|
||||
```
|
||||
|
||||
この時点で、キーボードをリセットすると、スクリプトがブートローダを検出し、キーボードに書き込みます。出力は次のようになります。
|
||||
|
||||
```
|
||||
Detected controller on USB port at /dev/ttyS15
|
||||
|
||||
Connecting to programmer: .
|
||||
Found programmer: Id = "CATERIN"; type = S
|
||||
Software Version = 1.0; No Hardware Version given.
|
||||
Programmer supports auto addr increment.
|
||||
Programmer supports buffered memory access with buffersize=128 bytes.
|
||||
|
||||
Programmer supports the following devices:
|
||||
Device code: 0x44
|
||||
|
||||
avrdude.exe: AVR device initialized and ready to accept instructions
|
||||
|
||||
Reading | ################################################## | 100% 0.00s
|
||||
|
||||
avrdude.exe: Device signature = 0x1e9587 (probably m32u4)
|
||||
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
|
||||
To disable this feature, specify the -D option.
|
||||
avrdude.exe: erasing chip
|
||||
avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex"
|
||||
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
|
||||
avrdude.exe: writing flash (27938 bytes):
|
||||
|
||||
Writing | ################################################## | 100% 2.40s
|
||||
|
||||
avrdude.exe: 27938 bytes of flash written
|
||||
avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex:
|
||||
avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex:
|
||||
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
|
||||
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes
|
||||
avrdude.exe: reading on-chip flash data:
|
||||
|
||||
Reading | ################################################## | 100% 0.43s
|
||||
|
||||
avrdude.exe: verifying ...
|
||||
avrdude.exe: 27938 bytes of flash verified
|
||||
|
||||
avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF)
|
||||
|
||||
avrdude.exe done. Thank you.
|
||||
```
|
||||
うまくいかない時は、以下のようにする必要があるかもしれません。
|
||||
|
||||
sudo make <my_keyboard>:<my_keymap>:avrdude
|
||||
|
||||
|
||||
#### Caterina コマンド
|
||||
|
||||
ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。
|
||||
|
||||
* `:avrdude` - これが通常のオプションで、Caterina デバイスが(新しい COM ポートを検出して)使用可能になるまで待機し、ファームウェアを書き込みます。
|
||||
* `:avrdude-loop` - これは `:avrdude` と同じです。ただし書き込みが終了すると再び Caterina デバイスの書き込み待ちに戻ります。これは何台ものデバイスへの書き込みに便利です。_Control+C を押して、手動でこの繰り返しを終了させる必要があります。_
|
||||
* `:avrdude-split-left` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」EEPROMファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_
|
||||
* `:avrdude-split-right` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROMファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_
|
||||
|
||||
### HalfKay
|
||||
|
||||
PJRC デバイス(Teensy シリーズ)の場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。
|
||||
|
||||
make <my_keyboard>:<my_keymap>:teensy
|
||||
|
||||
たとえば、キーマップの名前が xyverz で、Ergodox または Ergodox EZ のキーマップを作成している場合、次のコマンドを使用します。
|
||||
|
||||
make ergodox_ez:xyverz:teensy
|
||||
|
||||
ファームウェアのコンパイルが完了すると、以下のように出力されます。
|
||||
|
||||
```
|
||||
Linking: .build/ergodox_ez_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK]
|
||||
Checking file size of ergodox_ez_xyverz.hex [OK]
|
||||
* File size is fine - 25584/32256
|
||||
Teensy Loader, Command Line, Version 2.1
|
||||
Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage
|
||||
Waiting for Teensy device...
|
||||
(hint: press the reset button)
|
||||
```
|
||||
|
||||
この時点で、キーボードをリセットします。すると、次のような出力が表示されます。
|
||||
|
||||
```
|
||||
Found HalfKay Bootloader
|
||||
Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage
|
||||
Programming............................................................................................................................................................................
|
||||
...................................................
|
||||
Booting
|
||||
```
|
||||
|
||||
### STM32 (ARM)
|
||||
|
||||
主な ARM ボード (Proton C, Planck Rev 6, Preonic Rev 3 を含む)の場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。
|
||||
|
||||
make <my_keyboard>:<my_keymap>:dfu-util
|
||||
|
||||
たとえば、キーマップの名前が xyverz で、Planck Revision 6 のキーマップを作成している場合、次のコマンドを使用し、(コンパイルが終わる前に)キーボードを再起動してブートローダを起動します:
|
||||
|
||||
make planck/rev6:xyverz:dfu-util
|
||||
|
||||
ファームウェアのコンパイルが完了すると、以下のように出力されます。
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev6_xyverz.elf [OK]
|
||||
Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK]
|
||||
Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK]
|
||||
|
||||
Size after:
|
||||
text data bss dec hex filename
|
||||
0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex
|
||||
|
||||
Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK]
|
||||
dfu-util 0.9
|
||||
|
||||
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
|
||||
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
|
||||
This program is Free Software and has ABSOLUTELY NO WARRANTY
|
||||
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
|
||||
|
||||
Invalid DFU suffix signature
|
||||
A valid DFU suffix will be required in a future dfu-util release!!!
|
||||
Opening DFU capable USB device...
|
||||
ID 0483:df11
|
||||
Run-time device DFU version 011a
|
||||
Claiming USB DFU Interface...
|
||||
Setting Alternate Setting #0 ...
|
||||
Determining device status: state = dfuERROR, status = 10
|
||||
dfuERROR, clearing status
|
||||
Determining device status: state = dfuIDLE, status = 0
|
||||
dfuIDLE, continuing
|
||||
DFU mode device DFU version 011a
|
||||
Device returned transfer size 2048
|
||||
DfuSe interface name: "Internal Flash "
|
||||
Downloading to address = 0x08000000, size = 41824
|
||||
Download [=========================] 100% 41824 bytes
|
||||
Download done.
|
||||
File downloaded successfully
|
||||
Transitioning to dfuMANIFEST state
|
||||
```
|
||||
|
||||
#### STM32 コマンド
|
||||
|
||||
ファームウェアを STM32 デバイスに書き込むために使用できる DFU コマンドがいくつかあります。
|
||||
|
||||
* `:dfu-util` - STM32 デバイスに書き込むためのデフォルトコマンドで、STM32 ブートローダが見つかるまで待機します。
|
||||
* `:dfu-util-split-left` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。 ただし、分割キーボードの「左側の」EEPROM の設定も行われます。
|
||||
* `:dfu-util-split-right` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。 ただし、分割キーボードの「右側の」EEPROM の設定も行われます。
|
||||
* `:st-link-cli` - dfu-util ではなく、ST-LINK の CLI ユーティリティを介してファームウェアを書き込めます。
|
||||
|
||||
### BootloadHID
|
||||
|
||||
Bootmapper Client(BMC)/bootloadHID/ATmega32A ベースのキーボードの場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。
|
||||
|
||||
make <my_keyboard>:<my_keymap>:bootloaderHID
|
||||
|
||||
たとえば、キーマップの名前が xyverz で、jj40 のキーマップを作成している場合、次のコマンドを使用します。
|
||||
|
||||
make jj40:xyverz:bootloaderHID
|
||||
|
||||
ファームウェアのコンパイルが完了すると、以下のように出力されます。
|
||||
|
||||
```
|
||||
Linking: .build/jj40_default.elf [OK]
|
||||
Creating load file for flashing: .build/jj40_default.hex [OK]
|
||||
Copying jj40_default.hex to qmk_firmware folder [OK]
|
||||
Checking file size of jj40_default.hex [OK]
|
||||
* The firmware size is fine - 21920/28672 (6752 bytes free)
|
||||
```
|
||||
|
||||
ここまでくると、ビルドスクリプトは5秒ごとに DFU ブートローダを探します。
|
||||
デバイスが見つかるか、あなたがキャンセルするまで、以下を繰り返します。
|
||||
|
||||
```
|
||||
Error opening HIDBoot device: The specified device was not found
|
||||
Trying again in 5s.
|
||||
```
|
||||
|
||||
これを実行したら、コントローラーをリセットする必要があります。
|
||||
そして下のような出力が表示されます。
|
||||
|
||||
```
|
||||
Page size = 128 (0x80)
|
||||
Device size = 32768 (0x8000); 30720 bytes remaining
|
||||
Uploading 22016 (0x5600) bytes starting at 0 (0x0)
|
||||
0x05580 ... 0x05600
|
||||
```
|
||||
|
||||
## テストしましょう!
|
||||
|
||||
おめでとうございます! カスタムファームウェアがキーボードにプログラムされました!
|
||||
|
||||
使ってみて、すべてがあなたの望むように動作するかどうか確認してください。
|
||||
この初心者ガイドを完全なものにするために [テストとデバッグ](newbs_testing_debugging.md) を書いたので、カスタム機能のトラブルシューティング方法については、こちらをご覧ください。
|
||||
121
docs/ja/newbs_getting_started.md
Normal file
121
docs/ja/newbs_getting_started.md
Normal file
@@ -0,0 +1,121 @@
|
||||
# イントロダクション
|
||||
|
||||
<!---
|
||||
original document: docs/newbs_getting_started.md
|
||||
$ git diff 161d469 HEAD docs/newbs_getting_started.md
|
||||
-->
|
||||
|
||||
キーボードにはプロセッサが入っており、それはコンピュータに入っているものと大して違わないものです。
|
||||
このプロセッサでは、キーボードのボタンの押し下げの検出を担当しキーボードのどのボタンが押されている/離されているかのレポートをコンピュータに送信するソフトウェアが動作しています。
|
||||
QMK は、そのソフトウェアの役割を果たし、ボタンの押下を検出しその情報をホストコンピュータに渡します。
|
||||
カスタムキーマップを作るということは、キーボード上で動くプログラムを作るということなのです。
|
||||
|
||||
QMK は、簡単なことは簡単に、そして、難しいことを可能なことにすることで、あなたの手にたくさんのパワーをもたらします。
|
||||
パワフルなキーマップを作るためにプログラムを作成する方法を知る必要はありません。いくつかのシンプルな文法に従うだけでOKです。
|
||||
|
||||
# はじめに
|
||||
|
||||
キーマップをビルドする前に、いくつかのソフトウェアをインストールしてビルド環境を構築する必要があります。
|
||||
ファームウェアをコンパイルするキーボードの数に関わらず、この作業を一度だけ実行する必要があります。
|
||||
|
||||
もし、GUI で作業をしたい場合、オンラインで作業できる [QMK Configurator](https://config.qmk.fm) を使ってください。
|
||||
使い方は [Building Your First Firmware using the online GUI](newbs_building_firmware_configurator.md) を参照してください。
|
||||
|
||||
## ソフトウェアのダウンロード
|
||||
|
||||
### テキストエディタ
|
||||
|
||||
GUI を使わない場合、プレーンテキストを編集・保存できるエディタが必要です。
|
||||
Windows の場合、メモ帳が使えます。Linux の場合、gedit が使えます。
|
||||
どちらもシンプルですが機能的なテキストエディタです。
|
||||
macOS では、デフォルトのテキストエディットアプリに注意してください。_フォーマット_ メニューから _標準テキストにする_ を選択しない限り、プレーンテキストとして保存されません。
|
||||
|
||||
[Sublime Text](https://www.sublimetext.com/) や [VS Code](https://code.visualstudio.com/) のような専用のテキストエディタをダウンロードしてインストールすることもできます。これらのプログラムはコードを編集するために特別に作成されているため、これはプラットフォームに関係なくベストな方法です。
|
||||
|
||||
?> どのエディタを使えば良いか分からない場合、Laurence Bradford が書いたこの記事 [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) を読んでください。
|
||||
|
||||
### QMK Toolbox
|
||||
|
||||
QMK Toolbox は、Windows と macOS で使える GUI を備えたプログラムで、カスタムキーボードのプログラミングとデバッグの両方ができます。
|
||||
このプログラムは、キーボードに簡単にファームウェアを書き込んだり、出力されるデバッグメッセージを確認する際に、かけがえのないものであることがわかるでしょう。
|
||||
|
||||
[QMK Toolbox の最新版](https://github.com/qmk/qmk_toolbox/releases/latest)
|
||||
|
||||
* Windows 版: `qmk_toolbox.exe` (portable) または `qmk_toolbox_install.exe` (installer)
|
||||
* macOS 版: `QMK.Toolbox.app.zip` (portable) または `QMK.Toolbox.pkg` (installer)
|
||||
|
||||
## 環境構築
|
||||
|
||||
私たちは、QMK を可能な限り簡単に構築できるように努力しています。
|
||||
Linux か Unix 環境を用意するだけで、QMK に残りをインストールさせることができます。
|
||||
|
||||
?> もし、Linux か Unix のコマンドを使ったことがない場合、こちらで基本的な概念や各種コマンドを学んでください。これらの教材で QMK を使うのに必要なことを学ぶことができます。
|
||||
|
||||
[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)<br>
|
||||
[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
|
||||
|
||||
### Windows
|
||||
|
||||
MSYS2 と Git のインストールが必要です。
|
||||
|
||||
* [MSYS2 homepage](http://www.msys2.org) の手順に従って MSYS2 をインストールします。
|
||||
* 開いている MSYS2 の全ターミナル画面を閉じて、新しい MSYS2 MinGW 64-bit のターミナル画面を開きます。
|
||||
* `pacman -S git` を実行して Git をインストールします。
|
||||
|
||||
### macOS
|
||||
|
||||
[Homebrew homepage](https://brew.sh) の手順に従って Homebrew をインストールしてください。
|
||||
|
||||
Homebrew をインストールしたら、以下の _QMK の設定_ に進んでください。そのステップでは、他のパッケージをインストールするスクリプトを実行します。
|
||||
|
||||
### Linux
|
||||
|
||||
Git のインストールが必要です。既にインストールされている可能性は高いですが、そうでない場合、次のコマンドでインストールできます。
|
||||
|
||||
* Debian / Ubuntu / Devuan: `apt-get install git`
|
||||
* Fedora / Red Hat / CentOS: `yum install git`
|
||||
* Arch: `pacman -S git`
|
||||
|
||||
?> 全てのプラットフォームにおいて、Docker を使うことも可能です。[詳細はこちらをクリックしてください](getting_started_build_tools.md#docker)。
|
||||
|
||||
## QMK の設定
|
||||
|
||||
Linux/Unix 環境が準備できたら QMK のダウンロードの準備は完了です。Git を使用して QMK のリポジトリを「クローン」することで QMK をダウンロードします。ターミナルか MSYS2 MinGW ウィンドウを開いて、このガイドの残りの部分では開いたままにします。そのウィンドウ内で、次の2つのコマンドを実行します。
|
||||
|
||||
```shell
|
||||
git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
|
||||
cd qmk_firmware
|
||||
```
|
||||
|
||||
?> 既に [GitHub の使いかた](getting_started_github.md)を知っているなら、clone ではなく fork を勧めます。この一文の意味が分からない場合、このメッセージは無視してかまいません。
|
||||
|
||||
QMK には、必要な残りの設定を手助けするスクリプトが含まれています。
|
||||
セットアップ作業を完了させるため、次のコマンドを実行します。
|
||||
|
||||
util/qmk_install.sh
|
||||
|
||||
## ビルド環境の確認
|
||||
|
||||
これで QMK のビルド環境が用意できましたので、キーボードのファームウェアをビルドできます。
|
||||
キーボードのデフォルトキーマップをビルドすることから始めます。次の形式のコマンドでビルドできるはずです。
|
||||
|
||||
make <keyboard>:default
|
||||
|
||||
例)Clueboard 66% のファームウェアをビルドする
|
||||
|
||||
make clueboard/66/rev3:default
|
||||
|
||||
大量の出力の最後に次のように出力されると完了です。
|
||||
|
||||
```
|
||||
Linking: .build/clueboard_66_rev3_default.elf [OK]
|
||||
Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK]
|
||||
Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK]
|
||||
Checking file size of clueboard_66_rev3_default.hex [OK]
|
||||
* The firmware size is fine - 26356/28672 (2316 bytes free)
|
||||
```
|
||||
|
||||
# キーマップの作成
|
||||
|
||||
これであなた専用のキーマップを作成する準備ができました!
|
||||
次は [Building Your First Firmware](newbs_building_firmware.md) で専用のキーマップを作成します。
|
||||
31
docs/ja/newbs_learn_more_resources.md
Normal file
31
docs/ja/newbs_learn_more_resources.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# 学習リソース
|
||||
|
||||
<!---
|
||||
original document: ed0575fc8:docs/newbs_learn_more_resources.md
|
||||
$ git diff ed0575fc8 HEAD docs/newbs_learn_more_resources.md
|
||||
-->
|
||||
|
||||
これらのリソースは、QMKコミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。
|
||||
|
||||
## Git に関するリース:
|
||||
|
||||
### 英語
|
||||
|
||||
* [Great General Tutorial](https://www.codecademy.com/learn/learn-git)
|
||||
* [Git Game To Learn From Examples](https://learngitbranching.js.org/)
|
||||
* [Git Resources to Learn More About Github](getting_started_github.md)
|
||||
* [Git Resources Aimed Specifically toward QMK](contributing.md)
|
||||
|
||||
### 日本語
|
||||
|
||||
_日本語のリソース情報を募集中です。_
|
||||
|
||||
## コマンドラインに関するリソース:
|
||||
|
||||
### 英語
|
||||
|
||||
* [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
|
||||
|
||||
### 日本語
|
||||
|
||||
_日本語のリソース情報を募集中です。_
|
||||
106
docs/ja/newbs_testing_debugging.md
Normal file
106
docs/ja/newbs_testing_debugging.md
Normal file
@@ -0,0 +1,106 @@
|
||||
# テストとデバッグ
|
||||
|
||||
<!---
|
||||
original document: ed0575fc8:docs/newbs_testing_debugging.md
|
||||
$ git diff ed0575fc8 HEAD docs/newbs_testing_debugging.md
|
||||
-->
|
||||
|
||||
カスタムファームウェアをキーボードへ書き込んだら、テストする準備が整います。運が良ければ全て問題なく動作しているはずですが、もしそうでなければこのドキュメントがどこが悪いのか調べるのに役立ちます。
|
||||
|
||||
## テスト
|
||||
|
||||
通常、キーボードをテストするのは非常に簡単です。全てのキーをひとつずつ押して、期待されるキーが送信されていることを確認します。キーを押したことを見逃さないためのプログラムもあります。
|
||||
|
||||
メモ: これらのプログラムはQMKによって提供・承認されたものではありません。
|
||||
|
||||
* [QMK Configurator](https://config.qmk.fm/#/test/) (Web Based)
|
||||
* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows Only)
|
||||
* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only)
|
||||
* [Keyboard Tester](http://www.keyboardtester.com) (Web Based)
|
||||
* [Keyboard Checker](http://keyboardchecker.com) (Web Based)
|
||||
|
||||
## デバッグ
|
||||
|
||||
`rules.mk`へ`CONSOLE_ENABLE = yes`の設定をするとキーボードはデバッグ情報を出力します。デフォルトの出力は非常に限られたものですが、デバッグモードをオンにすることでデバッグ情報の量を増やすことが出来ます。キーマップの`DEBUG`キーコードを使用するか、デバッグモードを有効にする [Command](feature_command.md) 機能を使用するか、以下のコードをキーマップに追加します。
|
||||
|
||||
```c
|
||||
void keyboard_post_init_user(void) {
|
||||
// Customise these values to desired behaviour
|
||||
debug_enable=true;
|
||||
debug_matrix=true;
|
||||
//debug_keyboard=true;
|
||||
//debug_mouse=true;
|
||||
}
|
||||
```
|
||||
|
||||
### QMK Toolboxを使ったデバッグ
|
||||
|
||||
互換性のある環境では、[QMK Toolbox](https://github.com/qmk/qmk_toolbox)を使うことでキーボードからのデバッグメッセージを表示できます。
|
||||
|
||||
### hid_listenを使ったデバッグ
|
||||
|
||||
ターミナルベースの方法がお好みですか?PJRCが提供する[hid_listen](https://www.pjrc.com/teensy/hid_listen.html)もデバッグメッセージの表示に使用できます。ビルド済みの実行ファイルはWindows, Linux, MacOS用が用意されています。
|
||||
|
||||
<!-- FIXME: Describe the debugging messages here. -->
|
||||
|
||||
## 独自のデバッグメッセージを送信する
|
||||
|
||||
[custom code](custom_quantum_functions.md)内からデバッグメッセージを出力すると便利な場合があります。それはとても簡単です。ファイルの先頭に`print.h`のインクルードを追加します:
|
||||
|
||||
#include <print.h>
|
||||
|
||||
そのあとは、いくつかの異なったprint関数を使用することが出来ます。
|
||||
|
||||
* `print("string")`: シンプルな文字列を出力します
|
||||
* `uprintf("%s string", var)`: フォーマットされた文字列を出力します
|
||||
* `dprint("string")` デバッグモードが有効な場合のみ、シンプルな文字列を出力します
|
||||
* `dprintf("%s string", var)`: デバッグモードが有効な場合のみ、フォーマットされた文字列を出力します
|
||||
|
||||
## デバッグの例
|
||||
|
||||
以下は現実世界での実際のデバッグ手法の例を集めたものです。追加情報は[Debugging/Troubleshooting QMK](faq_debug.md)を参照してください。
|
||||
|
||||
### マトリックス上のどの場所でキー押下が起こったか?
|
||||
|
||||
移植する、PCBの問題を診断する場合、キー入力が正しくスキャンされているかどうかを確認することが役立つ場合があります。この手法でのロギングを有効化するには、`keymap.c`へ以下のコードを追加します。
|
||||
|
||||
```c
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// コンソールが有効化されている場合、マトリックス上の位置とキー押下状態を出力します
|
||||
#ifdef CONSOLE_ENABLE
|
||||
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
出力の例
|
||||
```text
|
||||
Waiting for device:.......
|
||||
Listening:
|
||||
KL: kc: 169, col: 0, row: 0, pressed: 1
|
||||
KL: kc: 169, col: 0, row: 0, pressed: 0
|
||||
KL: kc: 174, col: 1, row: 0, pressed: 1
|
||||
KL: kc: 174, col: 1, row: 0, pressed: 0
|
||||
KL: kc: 172, col: 2, row: 0, pressed: 1
|
||||
KL: kc: 172, col: 2, row: 0, pressed: 0
|
||||
```
|
||||
|
||||
### キースキャンにかかる時間の測定
|
||||
|
||||
パフォーマンスの問題をテストする場合、スイッチマトリックスをスキャンする頻度を知ることが役立ちます。この手法でのロギングを有効化するには`config.h`へ以下のコードを追加します。
|
||||
|
||||
|
||||
```c
|
||||
#define DEBUG_MATRIX_SCAN_RATE
|
||||
```
|
||||
|
||||
出力例
|
||||
```text
|
||||
> matrix scan frequency: 315
|
||||
> matrix scan frequency: 313
|
||||
> matrix scan frequency: 316
|
||||
> matrix scan frequency: 316
|
||||
> matrix scan frequency: 316
|
||||
> matrix scan frequency: 316
|
||||
```
|
||||
@@ -29,6 +29,7 @@ CHANGELOG:
|
||||
0.5 - Converted keymap to LAYOUT standard.
|
||||
0.6 - Swapped ESC and GRV in all layers.
|
||||
0.7 - Brought code up to current standards.
|
||||
0.8 - Added MACLOCK macro.
|
||||
|
||||
TODO:
|
||||
|
||||
@@ -51,6 +52,7 @@ enum atreus52_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK, WOW, DESTINY, LOW
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define ADJUST MO(_ADJUST)
|
||||
#define MACLOCK LGUI(LCTL(KC_Q))
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
@@ -99,14 +101,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE,
|
||||
KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______,
|
||||
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
|
||||
_______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______
|
||||
_______, _______, KC_HOME, KC_END, _______, KC_DEL, MACLOCK, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______
|
||||
),
|
||||
[_RAISE] = LAYOUT (
|
||||
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12,
|
||||
KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS,
|
||||
KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______,
|
||||
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
|
||||
_______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______
|
||||
_______, _______, KC_HOME, KC_END, _______, KC_DEL, MACLOCK, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______
|
||||
),
|
||||
[_ADJUST] = LAYOUT (
|
||||
_______, _______, _______, KC_F13, KC_F14, KC_F15, _______, _______, _______, _______, _______, _______,
|
||||
|
||||
7
keyboards/dz60/keymaps/tarnjotsingh/keymap.c
Normal file
7
keyboards/dz60/keymaps/tarnjotsingh/keymap.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_60_iso(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_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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LALT, KC_RCTL),
|
||||
[1] = LAYOUT_60_iso(KC_GRV, 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, KC_MUTE, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MFFD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS),
|
||||
[2] = LAYOUT_60_iso(KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||
};
|
||||
1
keyboards/dz60/keymaps/tarnjotsingh/layers.json
Normal file
1
keyboards/dz60/keymaps/tarnjotsingh/layers.json
Normal file
@@ -0,0 +1 @@
|
||||
[["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_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_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_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "MO(1)", "KC_RGUI", "KC_LALT", "KC_RCTL"], ["KC_GRV", "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", "KC_MUTE", "KC_VOLU", "KC_MPLY", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_UP", "KC_PSCR", "KC_SLCK", "KC_PAUS", "KC_TRNS", "KC_TRNS", "KC_VOLD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGUP", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_TRNS", "KC_INS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MRWD", "KC_MFFD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGDN", "KC_HOME", "KC_END", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(2)", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_HUI", "RGB_HUD", "RGB_SAI", "RGB_SAD", "RGB_VAI", "RGB_VAD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "BL_DEC", "BL_TOGG", "BL_INC", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"]]
|
||||
24
keyboards/dz60/keymaps/tarnjotsingh/readme.md
Normal file
24
keyboards/dz60/keymaps/tarnjotsingh/readme.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# DZ60 ISO Keymap
|
||||
|
||||
Custom keymap for UK ISO keyboard layouts.
|
||||
This includes 3 different layers.
|
||||
|
||||
- Layer 0:
|
||||
- Standard ISO layout with main modifier key, for accessing layer 1, to the right of the space bar.
|
||||
- Layer 1:
|
||||
- Layer that gives you access to pretty much everything else like the arrow keys.
|
||||
- Layer 2;
|
||||
- Standalone layer only for modifying the lighting on the board. Keys for this purpose are mapped in the locations used by the default dz60 layout.
|
||||
- You can access this layer by holding MO(1) (next to the space bar) followed by holding MO(2) which where the Left Alt key is positioned.
|
||||
|
||||

|
||||
|
||||
Make the kaymap for this keyboard (after setting up your build environment):
|
||||
|
||||
make dz60:tarnjotsingh
|
||||
|
||||
Then flash it by running:
|
||||
|
||||
make dz60:tarnjotsingh: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).
|
||||
@@ -37,6 +37,9 @@
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* Tap dancing params */
|
||||
#define TAPPING_TERM 250
|
||||
|
||||
/* key combination for command */
|
||||
/* DISABLED
|
||||
#define IS_COMMAND() ( \
|
||||
@@ -44,9 +47,6 @@
|
||||
)
|
||||
*/
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
|
||||
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 0
|
||||
|
||||
@@ -7,27 +7,116 @@ enum layers {
|
||||
NORMAL_LAYER = 0,
|
||||
MEDIA_LAYER,
|
||||
TBD_LAYER2,
|
||||
TBD_LAYER3
|
||||
FRENCH_LAYER
|
||||
};
|
||||
|
||||
|
||||
/* Enum for the tap dancing keys */
|
||||
enum tap_codes {
|
||||
A_Q, E_Q, E_U, E_E,
|
||||
A_Y, I_I, O_C, U_U
|
||||
};
|
||||
|
||||
#define FR_A_GRAVE "00E0"
|
||||
#define FR_A_HAT "00E2"
|
||||
|
||||
#define FR_C_CIRCUM "00E7"
|
||||
|
||||
#define FR_E_AIGU "00E9"
|
||||
#define FR_E_GRAVE "00E8"
|
||||
#define FR_E_HAT "00EA"
|
||||
#define FR_E_UMLAUT "00EB"
|
||||
|
||||
#define FR_I_HAT "00EE"
|
||||
#define FR_I_UMLAUT "00EF"
|
||||
|
||||
#define FR_O_HAT "00F4"
|
||||
|
||||
#define FR_U_GRAVE "00F9"
|
||||
#define FR_U_HAT "00FB"
|
||||
#define FR_U_UMLAUT "00FC"
|
||||
|
||||
#define FR_Y_UMLAUT "00FF"
|
||||
|
||||
#define FR_L_QUOTE "00AB"
|
||||
#define FR_R_QUOTE "00BB"
|
||||
|
||||
void send_french_unicode_char(uint8_t count, char *once, char *twice)
|
||||
{
|
||||
if (count <= 1)
|
||||
send_unicode_hex_string(once);
|
||||
else
|
||||
send_unicode_hex_string(twice);
|
||||
}
|
||||
|
||||
void dance_a_q(qk_tap_dance_state_t *state, void *user_data)
|
||||
{
|
||||
send_french_unicode_char(state->count, FR_A_GRAVE, FR_L_QUOTE);
|
||||
}
|
||||
|
||||
void dance_e_q(qk_tap_dance_state_t *state, void *user_data)
|
||||
{
|
||||
send_french_unicode_char(state->count, FR_E_AIGU, FR_R_QUOTE);
|
||||
}
|
||||
|
||||
void dance_e_u(qk_tap_dance_state_t *state, void *user_data)
|
||||
{
|
||||
send_french_unicode_char(state->count, FR_E_GRAVE, FR_U_GRAVE);
|
||||
}
|
||||
|
||||
void dance_e_e(qk_tap_dance_state_t *state, void *user_data)
|
||||
{
|
||||
send_french_unicode_char(state->count, FR_E_HAT, FR_E_UMLAUT);
|
||||
}
|
||||
|
||||
void dance_a_y(qk_tap_dance_state_t *state, void *user_data)
|
||||
{
|
||||
send_french_unicode_char(state->count, FR_A_HAT, FR_Y_UMLAUT);
|
||||
}
|
||||
|
||||
void dance_i_i(qk_tap_dance_state_t *state, void *user_data)
|
||||
{
|
||||
send_french_unicode_char(state->count, FR_I_HAT, FR_I_UMLAUT);
|
||||
}
|
||||
|
||||
void dance_o_c(qk_tap_dance_state_t *state, void *user_data)
|
||||
{
|
||||
send_french_unicode_char(state->count, FR_O_HAT, FR_C_CIRCUM);
|
||||
}
|
||||
|
||||
void dance_u_u(qk_tap_dance_state_t *state, void *user_data)
|
||||
{
|
||||
send_french_unicode_char(state->count, FR_U_HAT, FR_U_UMLAUT);
|
||||
}
|
||||
|
||||
/* Define the tap dance actions for the french characters */
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[A_Q] = ACTION_TAP_DANCE_FN(dance_a_q),
|
||||
[E_Q] = ACTION_TAP_DANCE_FN(dance_e_q),
|
||||
[E_U] = ACTION_TAP_DANCE_FN(dance_e_u),
|
||||
[E_E] = ACTION_TAP_DANCE_FN(dance_e_e),
|
||||
|
||||
[A_Y] = ACTION_TAP_DANCE_FN(dance_a_y),
|
||||
[I_I] = ACTION_TAP_DANCE_FN(dance_i_i),
|
||||
[O_C] = ACTION_TAP_DANCE_FN(dance_o_c),
|
||||
[U_U] = ACTION_TAP_DANCE_FN(dance_u_u)
|
||||
};
|
||||
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[NORMAL_LAYER]=
|
||||
LAYOUT(TO(1), WIN_TAB, KC_HOME, KC_UP, KC_END,
|
||||
WIN_LOCK, KC_MUTE, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
[NORMAL_LAYER] = LAYOUT(TO(1), WIN_TAB, KC_HOME, KC_UP, KC_END,
|
||||
WIN_LOCK, KC_MUTE, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[MEDIA_LAYER]=
|
||||
LAYOUT(TO(2), KC_CALC, KC_MPRV, KC_MNXT, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_MSTP, KC_MPLY, KC_VOLD),
|
||||
[MEDIA_LAYER] = LAYOUT(TO(2), KC_CALC, KC_MPRV, KC_MNXT, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_MSTP, KC_MPLY, KC_VOLD),
|
||||
|
||||
[TBD_LAYER2]=
|
||||
LAYOUT(TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
[TBD_LAYER2] = LAYOUT(TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
[TBD_LAYER3]=
|
||||
LAYOUT(TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||
[FRENCH_LAYER] = LAYOUT(TO(0), TD(A_Q), TD(E_Q), TD(E_U), TD(E_E),
|
||||
KC_TRNS, TD(A_Y), TD(I_I), TD(O_C), TD(U_U))
|
||||
};
|
||||
|
||||
|
||||
@@ -44,6 +133,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
*/
|
||||
|
||||
|
||||
void matrix_init_user(void)
|
||||
{
|
||||
set_unicode_input_mode(UC_WINC); /* See https://jayliu50.github.io/qmk-cheatsheet/ */
|
||||
}
|
||||
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state)
|
||||
{
|
||||
turn_off_leds();
|
||||
@@ -61,7 +156,7 @@ layer_state_t layer_state_set_user(layer_state_t state)
|
||||
turn_on_led(BLUE_LED);
|
||||
break;
|
||||
|
||||
case TBD_LAYER3:
|
||||
case FRENCH_LAYER:
|
||||
turn_on_led(GREEN_LED);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -11,13 +11,17 @@ MCU = atmega32u4
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
BOOTMAGIC_ENABLE = yes # 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
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover -
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
|
||||
AUDIO_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
CONSOLE_ENABLE= no # Console for debug
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover -
|
||||
|
||||
RGBLIGHT_ENABLE = no
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
UNICODE_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
71
keyboards/handwired/symmetry60/config.h
Normal file
71
keyboards/handwired/symmetry60/config.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Copyright 2019 Marhalloweenvt
|
||||
|
||||
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 Marhalloweenvt
|
||||
#define PRODUCT Symmetry60
|
||||
#define DESCRIPTION A Boardwalk-inspired keyboard
|
||||
|
||||
/* 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)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
|
||||
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B6, B5, B4, D7, D6, D4, E6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define RGB_DI_PIN B1
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 14
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
83
keyboards/handwired/symmetry60/info.json
Normal file
83
keyboards/handwired/symmetry60/info.json
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"Keyboard_name": "Symmetry60",
|
||||
"url": "",
|
||||
"maintainer": "marhalloweenvt",
|
||||
"width": 14,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_5x14": {
|
||||
"layout": [
|
||||
{"label":"K00", "x":0, "y":0, "w":1.5},
|
||||
{"label":"K01", "x":1.5, "y":0},
|
||||
{"label":"K02", "x":2.5, "y":0},
|
||||
{"label":"K03", "x":3.5, "y":0},
|
||||
{"label":"K04", "x":4.5, "y":0},
|
||||
{"label":"K05", "x":5.5, "y":0},
|
||||
{"label":"K06", "x":6.5, "y":0},
|
||||
{"label":"K07", "x":7.5, "y":0},
|
||||
{"label":"K08", "x":8.5, "y":0},
|
||||
{"label":"K09", "x":9.5, "y":0},
|
||||
{"label":"K0A", "x":10.5, "y":0},
|
||||
{"label":"K0B", "x":11.5, "y":0},
|
||||
{"label":"K0C", "x":12.5, "y":0},
|
||||
{"label":"K0D", "x":13.5, "y":0, "w":1.5},
|
||||
{"label":"K10", "x":0, "y":1, "w":1.5},
|
||||
{"label":"K11", "x":1.5, "y":1},
|
||||
{"label":"K12", "x":2.5, "y":1},
|
||||
{"label":"K13", "x":3.5, "y":1},
|
||||
{"label":"K14", "x":4.5, "y":1},
|
||||
{"label":"K15", "x":5.5, "y":1},
|
||||
{"label":"K16", "x":6.5, "y":1},
|
||||
{"label":"K17", "x":7.5, "y":1},
|
||||
{"label":"K18", "x":8.5, "y":1},
|
||||
{"label":"K19", "x":9.5, "y":1},
|
||||
{"label":"K1A", "x":10.5, "y":1},
|
||||
{"label":"K1B", "x":11.5, "y":1},
|
||||
{"label":"K1C", "x":12.5, "y":1},
|
||||
{"label":"K1D", "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"K20", "x":0, "y":2, "w":1.5},
|
||||
{"label":"K21", "x":1.5, "y":2},
|
||||
{"label":"K22", "x":2.5, "y":2},
|
||||
{"label":"K23", "x":3.5, "y":2},
|
||||
{"label":"K24", "x":4.5, "y":2},
|
||||
{"label":"K25", "x":5.5, "y":2},
|
||||
{"label":"K26", "x":6.5, "y":2},
|
||||
{"label":"K27", "x":7.5, "y":2},
|
||||
{"label":"K28", "x":8.5, "y":2},
|
||||
{"label":"K29", "x":9.5, "y":2},
|
||||
{"label":"K2A", "x":10.5, "y":2},
|
||||
{"label":"K2B", "x":11.5, "y":2},
|
||||
{"label":"K2C", "x":12.5, "y":2},
|
||||
{"label":"K2D", "x":13.5, "y":2, "w":1.5},
|
||||
{"label":"K30", "x":0, "y":3, "w":1.5},
|
||||
{"label":"K31", "x":1.5, "y":3},
|
||||
{"label":"K32", "x":2.5, "y":3},
|
||||
{"label":"K33", "x":3.5, "y":3},
|
||||
{"label":"K34", "x":4.5, "y":3},
|
||||
{"label":"K35", "x":5.5, "y":3},
|
||||
{"label":"K36", "x":6.5, "y":3},
|
||||
{"label":"K37", "x":7.5, "y":3},
|
||||
{"label":"K38", "x":8.5, "y":3},
|
||||
{"label":"K39", "x":9.5, "y":3},
|
||||
{"label":"K3A", "x":10.5, "y":3},
|
||||
{"label":"K3B", "x":11.5, "y":3},
|
||||
{"label":"K3C", "x":12.5, "y":3},
|
||||
{"label":"K3D", "x":13.5, "y":3, "w":1.5},
|
||||
{"label":"K40", "x":0, "y":4, "w":1.5},
|
||||
{"label":"K41", "x":1.5, "y":4},
|
||||
{"label":"K42", "x":2.5, "y":4},
|
||||
{"label":"K43", "x":3.5, "y":4},
|
||||
{"label":"K44", "x":4.5, "y":4},
|
||||
{"label":"K45", "x":5.5, "y":4},
|
||||
{"label":"K46", "x":6.5, "y":4},
|
||||
{"label":"K47", "x":7.5, "y":4},
|
||||
{"label":"K48", "x":8.5, "y":4},
|
||||
{"label":"K49", "x":9.5, "y":4},
|
||||
{"label":"K4A", "x":10.5, "y":4},
|
||||
{"label":"K4B", "x":11.5, "y":4},
|
||||
{"label":"K4C", "x":12.5, "y":4},
|
||||
{"label":"K4D", "x":13.5, "y":4, "w":1.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
19
keyboards/handwired/symmetry60/keymaps/default/config.h
Normal file
19
keyboards/handwired/symmetry60/keymaps/default/config.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Copyright 2019 marhalloweenvt
|
||||
*
|
||||
* 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
|
||||
26
keyboards/handwired/symmetry60/keymaps/default/keymap.c
Normal file
26
keyboards/handwired/symmetry60/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,26 @@
|
||||
/* Copyright 2019 marhalloweenvt
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_ortho_5x14(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, KC_DEL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL
|
||||
),
|
||||
};
|
||||
1
keyboards/handwired/symmetry60/keymaps/default/readme.md
Normal file
1
keyboards/handwired/symmetry60/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for symmetry60
|
||||
13
keyboards/handwired/symmetry60/readme.md
Normal file
13
keyboards/handwired/symmetry60/readme.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# SYMMETRY60
|
||||
|
||||
A keyboard inspired by Boardwalk
|
||||
|
||||
* Keyboard Maintainer: [marhalloweenvt](https://github.com/marhalloweenvt)
|
||||
* Hardware Supported: Symmetry60 PCB
|
||||
* Hardware Availability: Symmetry60 PCB
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make handwired/symmetry60: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).
|
||||
36
keyboards/handwired/symmetry60/rules.mk
Normal file
36
keyboards/handwired/symmetry60/rules.mk
Normal file
@@ -0,0 +1,36 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
LTO_ENABLE = yes # Use link time optimization
|
||||
|
||||
LAYOUTS = ortho_5x14
|
||||
16
keyboards/handwired/symmetry60/symmetry60.c
Normal file
16
keyboards/handwired/symmetry60/symmetry60.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/* Copyright 2019 marhalloweenvt
|
||||
*
|
||||
* 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 "symmetry60.h"
|
||||
42
keyboards/handwired/symmetry60/symmetry60.h
Normal file
42
keyboards/handwired/symmetry60/symmetry60.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/* Copyright 2019 marhalloweenvt
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT_ortho_5x14( \
|
||||
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, K2C, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, 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, K2C, K2D }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D }, \
|
||||
}
|
||||
|
||||
241
keyboards/hineybush/sm68/config.h
Normal file
241
keyboards/hineybush/sm68/config.h
Normal file
@@ -0,0 +1,241 @@
|
||||
/*
|
||||
Copyright 2019 hineybush
|
||||
|
||||
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 0x04D8
|
||||
#define PRODUCT_ID 0xEC9F
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER hineybush keyboards
|
||||
#define PRODUCT sm68
|
||||
#define DESCRIPTION PCB for switchmod keyboards projects
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#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_ROW_PINS { B2, B1, B0, D4, D1 }
|
||||
#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D3, D2 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
|
||||
#define RGB_DI_PIN D0
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
/*== all animations enable ==*/
|
||||
// #define RGBLIGHT_ANIMATIONS
|
||||
/*== or choose animations ==*/
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
// #define RGBLIGHT_EFFECT_SNAKE
|
||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
// /*== customize breathing effect ==*/
|
||||
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||
// /*==== use exp() and sin() ====*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP H
|
||||
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER B
|
||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||
15
keyboards/hineybush/sm68/info.json
Normal file
15
keyboards/hineybush/sm68/info.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"keyboard_name": "sm68",
|
||||
"url": "",
|
||||
"maintainer": "hineybush",
|
||||
"width": 17.5,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_68_ansi_split_bs_rshift": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Insert", "x":15.5, "y":0}, {"x":16.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.5, "y":1}, {"x":16.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"\u2191", "x":15.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"\u2190", "x":14.5, "y":4}, {"label":"\u2193", "x":15.5, "y":4}, {"label":"\u2192", "x":16.5, "y":4}]
|
||||
},
|
||||
"LAYOUT_68_ansi_split_rshift": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.5, "y":0}, {"x":16.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"x":16.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"\u2191", "x":15.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"\u2190", "x":14.5, "y":4}, {"label":"\u2193", "x":15.5, "y":4}, {"label":"\u2192", "x":16.5, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
||||
19
keyboards/hineybush/sm68/keymaps/default/config.h
Normal file
19
keyboards/hineybush/sm68/keymaps/default/config.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Copyright 2019 hineybush
|
||||
*
|
||||
* 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
|
||||
45
keyboards/hineybush/sm68/keymaps/default/keymap.c
Normal file
45
keyboards/hineybush/sm68/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Copyright 2019 hineybush
|
||||
*
|
||||
* 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 names for use in layer keycodes and the keymap
|
||||
enum layer_names {
|
||||
_BASE,
|
||||
_FN
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_68_ansi_split_rshift(
|
||||
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_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_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_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, MO(1), KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[_FN] = LAYOUT_68_ansi_split_rshift(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
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) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
1
keyboards/hineybush/sm68/keymaps/default/readme.md
Normal file
1
keyboards/hineybush/sm68/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for sm68
|
||||
15
keyboards/hineybush/sm68/readme.md
Normal file
15
keyboards/hineybush/sm68/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# sm68
|
||||
|
||||
Image TBA
|
||||
|
||||
Exact keyboard support TBA by switchmod keyboards
|
||||
|
||||
* Keyboard Maintainer: [hineybush](https://github.com/hineybush)
|
||||
* Hardware Supported: SM68 PCB
|
||||
* Hardware Availability: TBA
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make hineybush/sm68: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).
|
||||
32
keyboards/hineybush/sm68/rules.mk
Normal file
32
keyboards/hineybush/sm68/rules.mk
Normal file
@@ -0,0 +1,32 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = 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 = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
50
keyboards/hineybush/sm68/sm68.c
Normal file
50
keyboards/hineybush/sm68/sm68.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/* Copyright 2019 hineybush
|
||||
*
|
||||
* 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 "sm68.h"
|
||||
|
||||
// Optional override functions below.
|
||||
// You can leave any or all of these undefined.
|
||||
// These are only required if you want to perform custom actions.
|
||||
|
||||
/*
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
*/
|
||||
59
keyboards/hineybush/sm68/sm68.h
Normal file
59
keyboards/hineybush/sm68/sm68.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/* Copyright 2019 hineybush
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
// split backspace
|
||||
#define LAYOUT_68_ansi_split_bs_rshift( \
|
||||
k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k113, k014, k015, \
|
||||
k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, k115, \
|
||||
k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \
|
||||
k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \
|
||||
k400, k401, k402, k404, k408, k409, k410, k413, k414, k415 \
|
||||
) \
|
||||
{ \
|
||||
{ k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \
|
||||
{ k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115 }, \
|
||||
{ k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, KC_NO, KC_NO}, \
|
||||
{ k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, k314, KC_NO}, \
|
||||
{ k400, k401, k402, KC_NO,k404,KC_NO, KC_NO,k408, k409, k410, KC_NO, KC_NO, KC_NO,k413, k414, k415} \
|
||||
}
|
||||
|
||||
// full backspace
|
||||
#define LAYOUT_68_ansi_split_rshift( \
|
||||
k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k014, k015, \
|
||||
k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, k115, \
|
||||
k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \
|
||||
k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \
|
||||
k400, k401, k402, k404, k408, k409, k410, k413, k414, k415 \
|
||||
) \
|
||||
{ \
|
||||
{ k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012,KC_NO, k014, k015 }, \
|
||||
{ k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115 }, \
|
||||
{ k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, KC_NO, KC_NO}, \
|
||||
{ k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, k314, KC_NO}, \
|
||||
{ k400, k401, k402, KC_NO,k404,KC_NO, KC_NO,k408, k409, k410, KC_NO, KC_NO, KC_NO,k413, k414, k415} \
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
// disable backlight after timeout in minutes, 0 = no timeout
|
||||
#undef RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT
|
||||
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 10
|
||||
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 20
|
||||
|
||||
#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0
|
||||
#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1
|
||||
@@ -39,3 +39,5 @@
|
||||
|
||||
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
|
||||
#define RGB_BACKLIGHT_COLOR_2 { .h = 150, .s = 255 }
|
||||
|
||||
#define RGB_MATRIX_KEYPRESSES
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "common/ssd1306.h"
|
||||
#endif
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
@@ -16,10 +12,6 @@ extern rgblight_config_t rgblight_config;
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// 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 layer_number {
|
||||
_DVORAK = 0,
|
||||
_DESTINY,
|
||||
@@ -38,13 +30,14 @@ enum custom_keycodes {
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
BACKLIT,
|
||||
RGBRST
|
||||
RGBRST,
|
||||
RGB_MENU
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_SAMPLEMACRO,
|
||||
};
|
||||
// Aliases to make the keymap clearer.
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define ADJUST MO(_ADJUST)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_DVORAK] = LAYOUT( \
|
||||
@@ -53,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_RCTL, KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, XXXXXXX, XXXXXXX, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \
|
||||
KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \
|
||||
KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \
|
||||
KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \
|
||||
|
||||
),
|
||||
|
||||
@@ -63,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_RCTL, KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, XXXXXXX, XXXXXXX, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \
|
||||
KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \
|
||||
KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \
|
||||
KC_BSPC, KC_DEL, KC_ENT, KC_SPC \
|
||||
|
||||
),
|
||||
|
||||
@@ -73,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||
KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \
|
||||
KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \
|
||||
KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \
|
||||
),
|
||||
|
||||
[_COLEMAK] = LAYOUT( \
|
||||
@@ -82,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_RCTL, KC_A, KC_R, KC_S, KC_T, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, XXXXXXX, XXXXXXX, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||
KC_GRV, KC_LGUI, KC_LEFT, KC_RGHT, LOWER, KC_LCTL, KC_LALT, KC_RALT, KC_RCTL, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, \
|
||||
KC_BSPC, KC_RGUI, KC_ENT, KC_SPC \
|
||||
KC_BSPC, KC_LGUI, KC_ENT, KC_SPC \
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT( \
|
||||
@@ -103,228 +96,266 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_DEL, _______, _______, KC_INS \
|
||||
),
|
||||
|
||||
/* ADJUST
|
||||
* ,------------------------------------------------. ,------------------------------------------------.
|
||||
* | F11 | F1 | F2 | F3 | F4 | F5 | RESET| | | F6 | F7 | F8 | F9 | F10 | F12 |
|
||||
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||
* | | |QWERTY|COLEMK|DVORAK|DESTNY| | | | | PrSc | ScLk | NmLk | | |
|
||||
* |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
|
||||
* | | | Mute | Vol- | Vol+ | | | | |RGBTOG|RGBMOD| HUI | SAI | VAI | |
|
||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
* | | | Prev | Play | Next | | | | | |RGBRMD| HUD | SAD | VAD | |
|
||||
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
* | | | | Home | End | | | | | | PgUp | PgDn | | | |
|
||||
* `------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
|
||||
* | Del | | | | Ins |
|
||||
* `-------------' `-------------'
|
||||
*/
|
||||
|
||||
[_ADJUST] = LAYOUT( \
|
||||
_______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_NLCK, _______, _______, \
|
||||
KC_CAPS, _______, QWERTY, COLEMAK, DVORAK, DESTINY, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, \
|
||||
_______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, \
|
||||
_______, _______, _______, RGB_SPI, RGB_SPD, _______, XXXXXXX, XXXXXXX, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_DEL, _______, _______, KC_INS \
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
|
||||
// define variables for reactive RGB
|
||||
bool TOG_STATUS = false;
|
||||
int RGB_current_mode;
|
||||
|
||||
// Setting ADJ layer RGB back to default
|
||||
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(RGB_current_mode);
|
||||
#endif
|
||||
layer_on(layer3);
|
||||
} else {
|
||||
layer_off(layer3);
|
||||
}
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
if (record->event.pressed) {
|
||||
switch (keycode) {
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
case DESTINY:
|
||||
set_single_persistent_default_layer(_DESTINY);
|
||||
return false;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
|
||||
/*
|
||||
Commenting this out since I removed the layer, but I want this in here for reference.
|
||||
|
||||
case FN:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
//uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(15);
|
||||
#endif
|
||||
}
|
||||
layer_on(_FN);
|
||||
} else {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
|
||||
#endif
|
||||
layer_off(_FN);
|
||||
TOG_STATUS = false;
|
||||
}
|
||||
case COLEMAK:
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
return false;
|
||||
break;
|
||||
*/
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
//led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
|
||||
case RGBRST:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
#elif defined(RGB_MATRIX_ENABLE)
|
||||
eeconfig_update_rgb_matrix_default();
|
||||
#endif
|
||||
return false;
|
||||
#if defined(RGB_MATRIX_ENABLE) && defined(KEYBOARD_rgbkb_sol_rev2)
|
||||
case RGB_TOG:
|
||||
if (record->event.pressed) {
|
||||
rgb_matrix_increase_flags();
|
||||
}
|
||||
return false;
|
||||
#endif
|
||||
case RGB_MENU:
|
||||
#ifdef RGB_OLED_MENU
|
||||
if (record->event.pressed) {
|
||||
if (get_mods() & MOD_MASK_SHIFT) {
|
||||
rgb_encoder_state = (rgb_encoder_state - 1);
|
||||
if (rgb_encoder_state > 5) {
|
||||
rgb_encoder_state = 5;
|
||||
}
|
||||
} else {
|
||||
rgb_encoder_state = (rgb_encoder_state + 1) % 6;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// For RGBRST Keycode
|
||||
#if defined(RGB_MATRIX_ENABLE)
|
||||
void rgb_matrix_increase_flags(void)
|
||||
{
|
||||
switch (rgb_matrix_get_flags()) {
|
||||
case LED_FLAG_ALL: {
|
||||
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER);
|
||||
rgb_matrix_set_color_all(0, 0, 0);
|
||||
}
|
||||
break;
|
||||
case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: {
|
||||
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
|
||||
rgb_matrix_set_color_all(0, 0, 0);
|
||||
}
|
||||
break;
|
||||
case LED_FLAG_UNDERGLOW: {
|
||||
rgb_matrix_set_flags(LED_FLAG_NONE);
|
||||
rgb_matrix_disable_noeeprom();
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
rgb_matrix_set_flags(LED_FLAG_ALL);
|
||||
rgb_matrix_enable_noeeprom();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
void rgb_matrix_decrease_flags(void)
|
||||
{
|
||||
switch (rgb_matrix_get_flags()) {
|
||||
case LED_FLAG_ALL: {
|
||||
rgb_matrix_set_flags(LED_FLAG_NONE);
|
||||
rgb_matrix_disable_noeeprom();
|
||||
}
|
||||
break;
|
||||
case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: {
|
||||
rgb_matrix_set_flags(LED_FLAG_ALL);
|
||||
rgb_matrix_set_color_all(0, 0, 0);
|
||||
}
|
||||
break;
|
||||
case LED_FLAG_UNDERGLOW: {
|
||||
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER);
|
||||
rgb_matrix_set_color_all(0, 0, 0);
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
|
||||
rgb_matrix_enable_noeeprom();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RGB_OLED_MENU
|
||||
uint8_t rgb_encoder_state = 4;
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
typedef void (*rgb_matrix_f)(void);
|
||||
|
||||
// hook point for 'led_test' keymap
|
||||
// 'default' keymap's led_test_init() is empty function, do nothing
|
||||
// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35);
|
||||
__attribute__ ((weak))
|
||||
void led_test_init(void) {}
|
||||
const rgb_matrix_f rgb_matrix_functions[6][2] = {
|
||||
{ rgb_matrix_increase_hue, rgb_matrix_decrease_hue },
|
||||
{ rgb_matrix_increase_sat, rgb_matrix_decrease_sat },
|
||||
{ rgb_matrix_increase_val, rgb_matrix_decrease_val },
|
||||
{ rgb_matrix_increase_speed, rgb_matrix_decrease_speed },
|
||||
{ rgb_matrix_step, rgb_matrix_step_reverse },
|
||||
{ rgb_matrix_increase_flags, rgb_matrix_decrease_flags }
|
||||
};
|
||||
#endif
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
led_test_init();
|
||||
iota_gfx_task(); // this is what updates the display continuously
|
||||
}
|
||||
#ifdef ENCODER_ENABLE
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
static pin_t encoders_pad_a[] = ENCODERS_PAD_A;
|
||||
#define NUMBER_OF_ENCODERS (sizeof(encoders_pad_a)/sizeof(pin_t))
|
||||
|
||||
const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = {
|
||||
[_QWERTY] = ENCODER_LAYOUT( \
|
||||
KC_VOLU, KC_VOLD,
|
||||
KC_VOLU, KC_VOLD
|
||||
),
|
||||
[_COLEMAK] = ENCODER_LAYOUT( \
|
||||
_______, _______,
|
||||
_______, _______
|
||||
),
|
||||
[_FN] = ENCODER_LAYOUT( \
|
||||
_______, _______,
|
||||
_______, _______
|
||||
),
|
||||
[_ADJ] = ENCODER_LAYOUT( \
|
||||
_______, _______,
|
||||
_______, _______
|
||||
)
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (!is_keyboard_master())
|
||||
return;
|
||||
|
||||
#ifdef RGB_OLED_MENU
|
||||
if (index == RGB_OLED_MENU) {
|
||||
(*rgb_matrix_functions[rgb_encoder_state][clockwise])();
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
uint8_t layer = biton32(layer_state);
|
||||
uint16_t keycode = encoders[layer][index][clockwise];
|
||||
while (keycode == KC_TRANSPARENT && layer > 0)
|
||||
{
|
||||
layer--;
|
||||
if ((layer_state & (1 << layer)) != 0)
|
||||
keycode = encoders[layer][index][clockwise];
|
||||
}
|
||||
if (keycode != KC_TRANSPARENT)
|
||||
tap_code16(keycode);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//assign the right code to your layers for OLED display
|
||||
#define L_BASE 0
|
||||
#define L_FN (1<<_FN)
|
||||
#define L_ADJ (1<<_ADJ)
|
||||
// OLED Driver Logic
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (is_keyboard_master())
|
||||
return OLED_ROTATION_270;
|
||||
return rotation;
|
||||
}
|
||||
|
||||
static void render_logo(struct CharacterMatrix *matrix) {
|
||||
|
||||
static char logo[]={
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM sol_logo[] = {
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
|
||||
0};
|
||||
matrix_write(matrix, logo);
|
||||
//matrix_write_P(&matrix, PSTR(" Split keyboard kit"));
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0
|
||||
};
|
||||
oled_write_P(sol_logo, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void render_status(struct CharacterMatrix *matrix) {
|
||||
|
||||
static void render_status(void) {
|
||||
// Render to mode icon
|
||||
static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||
if(keymap_config.swap_lalt_lgui==false){
|
||||
matrix_write(matrix, logo[0][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write(matrix, logo[0][1]);
|
||||
}else{
|
||||
matrix_write(matrix, logo[1][0]);
|
||||
matrix_write_P(matrix, PSTR("\n"));
|
||||
matrix_write(matrix, logo[1][1]);
|
||||
}
|
||||
static const char PROGMEM sol_icon[] = {
|
||||
0x9b,0x9c,0x9d,0x9e,0x9f,
|
||||
0xbb,0xbc,0xbd,0xbe,0xbf,
|
||||
0xdb,0xdc,0xdd,0xde,0xdf,0
|
||||
};
|
||||
oled_write_P(sol_icon, false);
|
||||
|
||||
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
|
||||
char buf[40];
|
||||
snprintf(buf,sizeof(buf), "Undef-%ld", layer_state);
|
||||
matrix_write_P(matrix, PSTR("\nLayer: "));
|
||||
switch (layer_state) {
|
||||
case L_BASE:
|
||||
matrix_write_P(matrix, PSTR("Default"));
|
||||
break;
|
||||
/* case L_FN:
|
||||
matrix_write_P(matrix, PSTR("FN"));
|
||||
break; */
|
||||
case L_ADJ:
|
||||
/* case L_ADJ_TRI: */
|
||||
matrix_write_P(matrix, PSTR("ADJ"));
|
||||
break;
|
||||
default:
|
||||
matrix_write(matrix, buf);
|
||||
}
|
||||
// Define layers here
|
||||
oled_write_P(PSTR(" Layer-----"), false);
|
||||
uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state);
|
||||
switch (layer) {
|
||||
case _DVORAK:
|
||||
oled_write_P(PSTR("DVRAK"), false);
|
||||
break;
|
||||
case _DESTINY:
|
||||
oled_write_P(PSTR("DSTNY"), false);
|
||||
break;
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("QWRTY"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR("COLMK"), false);
|
||||
break;
|
||||
case _LOWER:
|
||||
oled_write_P(PSTR("LOWER"), false);
|
||||
break;
|
||||
case _RAISE:
|
||||
oled_write_P(PSTR("RAISE"), false);
|
||||
break;
|
||||
case _ADJUST:
|
||||
oled_write_P(PSTR("ADJST"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("UNDEF"), false);
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
char led[40];
|
||||
snprintf(led, sizeof(led), "\n%s %s %s",
|
||||
(IS_HOST_LED_ON(USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ",
|
||||
(IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) ? "CAPS" : " ",
|
||||
(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) ? "SCLK" : " ");
|
||||
matrix_write(matrix, led);
|
||||
uint8_t led_state = host_keyboard_leds();
|
||||
oled_write_P(PSTR("-----"), false);
|
||||
oled_write_P(IS_LED_ON(led_state, USB_LED_NUM_LOCK) ? PSTR("NUMLK") : PSTR(" "), false);
|
||||
oled_write_P(IS_LED_ON(led_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLK") : PSTR(" "), false);
|
||||
oled_write_P(IS_LED_ON(led_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false);
|
||||
|
||||
#ifdef RGB_OLED_MENU
|
||||
static char buffer[31] = { 0 };
|
||||
snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d e%3d ", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode, rgb_matrix_get_flags());
|
||||
buffer[4 + rgb_encoder_state * 5] = '<';
|
||||
|
||||
oled_write_P(PSTR("-----"), false);
|
||||
oled_write(buffer, false);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
|
||||
#if DEBUG_TO_SCREEN
|
||||
if (debug_enable) {
|
||||
return;
|
||||
void oled_task_user(void) {
|
||||
if (is_keyboard_master()) {
|
||||
render_status();
|
||||
} else {
|
||||
render_logo();
|
||||
oled_scroll_left();
|
||||
}
|
||||
#endif
|
||||
|
||||
matrix_clear(&matrix);
|
||||
if(is_master){
|
||||
render_status(&matrix);
|
||||
}else{
|
||||
render_logo(&matrix);
|
||||
}
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -20,8 +20,11 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
ENCODER_ENABLE_CUSTOM = no # Enable rotary encoder
|
||||
AUDIO_ENABLE = no
|
||||
|
||||
OLED_ENABLE = yes # OLED_ENABLE
|
||||
OLED_ENABLE = no # OLED_ENABLE
|
||||
IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone)
|
||||
DEFAULT_FOLDER = rgbkb/sol/rev1
|
||||
ENCODER_ENABLE = no
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
|
||||
# Do not edit past here
|
||||
|
||||
|
||||
19
keyboards/shiro/keymaps/default_mac/config.h
Normal file
19
keyboards/shiro/keymaps/default_mac/config.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Copyright 2019 T.Shinohara
|
||||
*
|
||||
* 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
|
||||
50
keyboards/shiro/keymaps/default_mac/keymap.c
Normal file
50
keyboards/shiro/keymaps/default_mac/keymap.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/* Copyright 2019 T.Shinohara
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layer_number {
|
||||
_NUMBER = 0,
|
||||
_CURSOL,
|
||||
_MOUSE
|
||||
};
|
||||
|
||||
#define NUMBER TO(_NUMBER)
|
||||
#define CURSOL TO(_CURSOL)
|
||||
#define MOUSE TO(_MOUSE)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_NUMBER] = LAYOUT(
|
||||
NUMBER, CURSOL, MOUSE,
|
||||
KC_P7, KC_P8, KC_P9,
|
||||
KC_P4, KC_P5, KC_P6,
|
||||
KC_P1, KC_P2, KC_P3,
|
||||
KC_P0, KC_BSPC, KC_ENT
|
||||
),
|
||||
[_CURSOL] = LAYOUT(
|
||||
NUMBER, CURSOL, MOUSE,
|
||||
KC_HOME, KC_UP, KC_PGUP,
|
||||
KC_LEFT, KC_ESC, KC_RIGHT,
|
||||
KC_END, KC_DOWN, KC_PGDN,
|
||||
KC_DEL, KC_BSPC, KC_ENT
|
||||
),
|
||||
[_MOUSE] = LAYOUT(
|
||||
NUMBER, CURSOL, MOUSE,
|
||||
LGUI(KC_X), LGUI(KC_C), LGUI(KC_V),
|
||||
LGUI(KC_Z), LGUI(KC_F), KC_AGIN,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_DEL, KC_BSPC, KC_ENT
|
||||
),
|
||||
};
|
||||
1
keyboards/shiro/keymaps/default_mac/readme.md
Normal file
1
keyboards/shiro/keymaps/default_mac/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for Shiro
|
||||
@@ -2,6 +2,7 @@
|
||||
"""
|
||||
import os
|
||||
import subprocess
|
||||
from shutil import which
|
||||
|
||||
from milc import cli
|
||||
|
||||
@@ -11,10 +12,18 @@ from milc import cli
|
||||
def cformat(cli):
|
||||
"""Format C code according to QMK's style.
|
||||
"""
|
||||
# Determine which version of clang-format to use
|
||||
clang_format = ['clang-format', '-i']
|
||||
for clang_version in [10, 9, 8, 7]:
|
||||
binary = 'clang-format-%d' % clang_version
|
||||
if which(binary):
|
||||
clang_format[0] = binary
|
||||
break
|
||||
|
||||
# Find the list of files to format
|
||||
if not cli.args.files:
|
||||
if cli.args.files:
|
||||
cli.args.files = [os.path.join(os.environ['ORIG_CWD'], file) for file in cli.args.files]
|
||||
else:
|
||||
for dir in ['drivers', 'quantum', 'tests', 'tmk_core']:
|
||||
for dirpath, dirnames, filenames in os.walk(dir):
|
||||
if 'tmk_core/protocol/usb_hid' in dirpath:
|
||||
|
||||
@@ -12,7 +12,7 @@ def print_config(section, key):
|
||||
cli.echo('%s.%s{fg_cyan}={fg_reset}%s', section, key, cli.config[section][key])
|
||||
|
||||
|
||||
@cli.argument('-ro', '--read-only', action='store_true', help='Operate in read-only mode.')
|
||||
@cli.argument('-ro', '--read-only', arg_only=True, action='store_true', help='Operate in read-only mode.')
|
||||
@cli.argument('configs', nargs='*', arg_only=True, help='Configuration options to read or write.')
|
||||
@cli.subcommand("Read and write configuration settings.")
|
||||
def config(cli):
|
||||
|
||||
@@ -24,8 +24,7 @@ def doctor(cli):
|
||||
cli.log.info('QMK Doctor is checking your environment.')
|
||||
|
||||
# Make sure the basic CLI tools we need are available and can be executed.
|
||||
binaries = ['dfu-programmer', 'avrdude', 'dfu-util', 'avr-gcc', 'arm-none-eabi-gcc']
|
||||
binaries += glob('bin/qmk-*')
|
||||
binaries = ['dfu-programmer', 'avrdude', 'dfu-util', 'avr-gcc', 'arm-none-eabi-gcc', 'bin/qmk']
|
||||
ok = True
|
||||
|
||||
for binary in binaries:
|
||||
@@ -34,10 +33,10 @@ def doctor(cli):
|
||||
cli.log.error("{fg_red}QMK can't find %s in your path.", binary)
|
||||
ok = False
|
||||
else:
|
||||
try:
|
||||
subprocess.run([binary, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5, check=True)
|
||||
check = subprocess.run([binary, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5)
|
||||
if check.returncode in [0, 1]:
|
||||
cli.log.info('Found {fg_cyan}%s', binary)
|
||||
except subprocess.CalledProcessError:
|
||||
else:
|
||||
cli.log.error("{fg_red}Can't run `%s --version`", binary)
|
||||
ok = False
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import glob
|
||||
|
||||
from milc import cli
|
||||
|
||||
|
||||
@cli.subcommand("List the keyboards currently defined within QMK")
|
||||
def list_keyboards(cli):
|
||||
"""List the keyboards currently defined within QMK
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class NoSuchKeyboardError(Exception):
|
||||
"""Raised when we can't find a keyboard/keymap directory.
|
||||
"""
|
||||
|
||||
def __init__(self, message):
|
||||
self.message = message
|
||||
|
||||
@@ -3,7 +3,6 @@ class AttrDict(dict):
|
||||
|
||||
This should only be used to mock objects for unit testing. Please do not use this outside of qmk.tests.
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(AttrDict, self).__init__(*args, **kwargs)
|
||||
self.__dict__ = self
|
||||
|
||||
@@ -7,7 +7,7 @@ def check_subcommand(command, *args):
|
||||
|
||||
|
||||
def test_cformat():
|
||||
assert check_subcommand('cformat', 'tmk_core/common/backlight.c').returncode == 0
|
||||
assert check_subcommand('cformat', 'tmk_core/common/keyboard.c').returncode == 0
|
||||
|
||||
|
||||
def test_compile():
|
||||
|
||||
@@ -10,4 +10,4 @@ def test_keymap_onekey_pytest():
|
||||
|
||||
def test_normpath():
|
||||
path = qmk.path.normpath('lib/python')
|
||||
assert path == os.environ['ORIG_CWD'] + '/lib/python'
|
||||
assert path == os.path.join(os.environ['ORIG_CWD'], 'lib/python')
|
||||
|
||||
@@ -189,7 +189,6 @@ void rgblight_init(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
debug_enable = 1; // Debug ON!
|
||||
dprintf("rgblight_init called.\n");
|
||||
dprintf("rgblight_init start!\n");
|
||||
if (!eeconfig_is_enabled()) {
|
||||
|
||||
@@ -190,9 +190,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -44,6 +44,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define NO_UART 1
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||
|
||||
@@ -379,7 +379,6 @@ static void set_led_transfer_cb(USBDriver *usbp) {
|
||||
/* Callback for SETUP request on the endpoint 0 (control) */
|
||||
static bool usb_request_hook_cb(USBDriver *usbp) {
|
||||
const USBDescriptor *dp;
|
||||
int has_report_id;
|
||||
|
||||
/* usbp->setup fields:
|
||||
* 0: bmRequestType (bitmask)
|
||||
@@ -432,26 +431,17 @@ static bool usb_request_hook_cb(USBDriver *usbp) {
|
||||
switch (usbp->setup[1]) { /* bRequest */
|
||||
case HID_SET_REPORT:
|
||||
switch (usbp->setup[4]) { /* LSB(wIndex) (check MSB==0 and wLength==1?) */
|
||||
case KEYBOARD_INTERFACE:
|
||||
#if defined(SHARED_EP_ENABLE) && !defined(KEYBOARD_SHARED_EP)
|
||||
case SHARED_INTERFACE:
|
||||
usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_led_transfer_cb);
|
||||
return TRUE;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case KEYBOARD_INTERFACE:
|
||||
/* keyboard_led_stats = <read byte from next OUT report>
|
||||
* keyboard_led_stats needs be word (or dword), otherwise we get an exception on F0 */
|
||||
has_report_id = 0;
|
||||
#if defined(SHARED_EP_ENABLE)
|
||||
if (usbp->setup[4] == SHARED_INTERFACE) {
|
||||
has_report_id = 1;
|
||||
}
|
||||
#endif
|
||||
if (usbp->setup[4] == KEYBOARD_INTERFACE && !keyboard_protocol) {
|
||||
has_report_id = 0;
|
||||
}
|
||||
if (has_report_id) {
|
||||
usbSetupTransfer(usbp, set_report_buf, sizeof(set_report_buf), set_led_transfer_cb);
|
||||
} else {
|
||||
usbSetupTransfer(usbp, (uint8_t *)&keyboard_led_stats, 1, NULL);
|
||||
}
|
||||
usbSetupTransfer(usbp, (uint8_t *)&keyboard_led_stats, 1, NULL);
|
||||
return TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user