forked from Github/qmk_firmware
Compare commits
62 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
95c742ec27 | ||
![]() |
d91987ab9a | ||
![]() |
db540e2832 | ||
![]() |
a0b10593df | ||
![]() |
65f4b94cda | ||
![]() |
70a37b9cf5 | ||
![]() |
208fbce9a7 | ||
![]() |
21976f47d8 | ||
![]() |
054021e875 | ||
![]() |
f5c2cd2eb7 | ||
![]() |
0e30266711 | ||
![]() |
656a8327f4 | ||
![]() |
1fed91f272 | ||
![]() |
7fe491bb54 | ||
![]() |
7675e80f5c | ||
![]() |
2b960b8bd7 | ||
![]() |
955047dd7d | ||
![]() |
0a5997b0af | ||
![]() |
0adf03c754 | ||
![]() |
2cebac6f2f | ||
![]() |
a50c0049f6 | ||
![]() |
e620a7beb2 | ||
![]() |
d699fd1fb4 | ||
![]() |
e38331d94c | ||
![]() |
e85ec9a09a | ||
![]() |
562b853a8f | ||
![]() |
69abe5b405 | ||
![]() |
a9cb3835ca | ||
![]() |
e1f1e1582e | ||
![]() |
65f803a1de | ||
![]() |
706f1b433c | ||
![]() |
841a2721bc | ||
![]() |
d48e3053b9 | ||
![]() |
d7a4b14bc6 | ||
![]() |
74d3223fb5 | ||
![]() |
3f0292d726 | ||
![]() |
3f96b88e73 | ||
![]() |
5e812cc4be | ||
![]() |
8c8a320e92 | ||
![]() |
43b21cffe0 | ||
![]() |
58c31f5632 | ||
![]() |
1778858e24 | ||
![]() |
19006c9753 | ||
![]() |
2e08c72e95 | ||
![]() |
57f408cff5 | ||
![]() |
c4d778a302 | ||
![]() |
82dcb17338 | ||
![]() |
a8c230743a | ||
![]() |
3c84157d83 | ||
![]() |
4989af356e | ||
![]() |
a2fa12d631 | ||
![]() |
412c6bf447 | ||
![]() |
9aa953ecb4 | ||
![]() |
9fddb1b5fa | ||
![]() |
07a817d3e5 | ||
![]() |
56beaf7d3f | ||
![]() |
3f11f41ec7 | ||
![]() |
4e02253aaf | ||
![]() |
2773082d9d | ||
![]() |
19b70b2737 | ||
![]() |
61b64bb82a | ||
![]() |
f11437aef3 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -73,3 +73,6 @@ __pycache__
|
||||
|
||||
# prerequisites for updating ChibiOS
|
||||
/util/fmpp*
|
||||
|
||||
# Allow to exist but don't include it in the repo
|
||||
user_song_list.h
|
||||
|
@@ -319,7 +319,7 @@ This runs code every time that the layers get changed. This can be useful for l
|
||||
|
||||
### Example `layer_state_set_*` Implementation
|
||||
|
||||
This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example
|
||||
This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example.
|
||||
|
||||
```c
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
@@ -343,6 +343,11 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return state;
|
||||
}
|
||||
```
|
||||
|
||||
Use the `IS_LAYER_ON_STATE(state, layer)` and `IS_LAYER_OFF_STATE(state, layer)` macros to check the status of a particular layer.
|
||||
|
||||
Outside of `layer_state_set_*` functions, you can use the `IS_LAYER_ON(layer)` and `IS_LAYER_OFF(layer)` macros to check global layer state.
|
||||
|
||||
### `layer_state_set_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `layer_state_t layer_state_set_kb(layer_state_t state)`
|
||||
|
@@ -23,7 +23,7 @@ Zadig will automatically detect the bootloader device. You may sometimes need to
|
||||
|
||||
!> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case!
|
||||
|
||||
If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list. For flashing a USBaspLoader device via command line with msys2, the `libusbk` driver is recommended, otherwise `libusb-win32` will work fine if you are using QMK Toolbox for flashing.
|
||||
If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list. USBAspLoader devices must use the `libusbK` driver.
|
||||
|
||||

|
||||
|
||||
|
@@ -74,10 +74,9 @@ There are a number of functions (and variables) related to how you can use or ma
|
||||
| [`update_tri_layer(x, y, z)`](ref_functions.md#update_tri_layerx-y-z) | Checks if layers `x` and `y` are both on, and sets `z` based on that (on if both on, otherwise off). |
|
||||
| [`update_tri_layer_state(state, x, y, z)`](ref_functions.md#update_tri_layer_statestate-x-y-z) | Does the same as `update_tri_layer(x, y, z)`, but from `layer_state_set_*` functions. |
|
||||
|
||||
In addition to the functions that you can call, there are a number of callback functions that get called every time the layer changes. This passes the layer state to the function, where it can be read or modified.
|
||||
|
||||
In additional to the functions that you can call, there are a number of callback functions that get called every time the layer changes. This passed the layer state to the function, which can be read or modified.
|
||||
|
||||
|Callbacks |Description |
|
||||
|Callback |Description |
|
||||
|-----------------------------------------------------|----------------------------------------------------------------------------------------|
|
||||
| `layer_state_set_kb(layer_state_t state)` | Callback for layer functions, for keyboard. |
|
||||
| `layer_state_set_user(layer_state_t state)` | Callback for layer functions, for users. |
|
||||
@@ -86,9 +85,9 @@ In additional to the functions that you can call, there are a number of callback
|
||||
|
||||
?> For additional details on how you can use these callbacks, check out the [Layer Change Code](custom_quantum_functions.md#layer-change-code) document.
|
||||
|
||||
|Check functions |Description |
|
||||
|-------------------------------------------|------------------------------------------------------------------------------|
|
||||
| `layer_state_cmp(cmp_layer_state, layer)` | This checks the `cmp_layer_state` to see if the specific `layer` is enabled. This is meant for use with the layer callbacks. |
|
||||
| `layer_state_is(layer)` | This checks the layer state to see if the specific `layer` is enabled. (calls `layer_state_cmp` for the global layer state). |
|
||||
It is also possible to check the state of a particular layer using the following functions and macros.
|
||||
|
||||
!> There is `IS_LAYER_ON(layer)` as well, however the `layer_state_cmp` function has some additional handling to ensure that on layer 0 that it returns the correct value. Otherwise, if you check to see if layer 0 is on, you may get an incorrect value returned.
|
||||
|Function |Description |Aliases
|
||||
|---------------------------------|-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|
|
||||
| `layer_state_is(layer)` | Checks if the specified `layer` is enabled globally. | `IS_LAYER_ON(layer)`, `IS_LAYER_OFF(layer)` |
|
||||
| `layer_state_cmp(state, layer)` | Checks `state` to see if the specified `layer` is enabled. Intended for use in layer callbacks. | `IS_LAYER_ON_STATE(state, layer)`, `IS_LAYER_OFF_STATE(state, layer)` |
|
||||
|
@@ -39,10 +39,11 @@ In your keymap you can use the following keycodes to map key presses to mouse ac
|
||||
|
||||
## Configuring mouse keys
|
||||
|
||||
Mouse keys supports two different modes to move the cursor:
|
||||
Mouse keys supports three different modes to move the cursor:
|
||||
|
||||
* **Accelerated (default):** Holding movement keys accelerates the cursor until it reaches its maximum speed.
|
||||
* **Constant:** Holding movement keys moves the cursor at constant speeds.
|
||||
* **Combined:** Holding movement keys accelerates the cursor until it reaches its maximum speed, but holding acceleration and movement keys simultaneously moves the cursor at constant speeds.
|
||||
|
||||
The same principle applies to scrolling.
|
||||
|
||||
@@ -120,3 +121,22 @@ Use the following settings if you want to adjust cursor movement or scrolling:
|
||||
|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`KC_ACL1`) |
|
||||
|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`KC_ACL2`) |
|
||||
|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`KC_ACL2`) |
|
||||
|
||||
### Combined mode
|
||||
|
||||
This mode functions like **Accelerated** mode, however, you can hold `KC_ACL0`, `KC_ACL1` and `KC_ACL2`
|
||||
to momentarily (while held) set the cursor and scroll speeds to constant speeds. When no acceleration
|
||||
keys are held, this mode is identical to **Accelerated** mode, and can be modified using all of the
|
||||
relevant settings.
|
||||
|
||||
* **KC_ACL0:** This acceleration sets your cursor to the slowest possible speed. This is useful for very
|
||||
small and detailed movements of the cursor.
|
||||
* **KC_ACL1:** This acceleration sets your cursor to half the maximum (user defined) speed.
|
||||
* **KC_ACL2:** This acceleration sets your cursor to the maximum (computer defined) speed. This is
|
||||
useful for moving the cursor large distances without much accuracy.
|
||||
|
||||
To use constant speed mode, you must at least define `MK_COMBINED` in your keymap’s `config.h` file:
|
||||
|
||||
```c
|
||||
#define MK_COMBINED
|
||||
```
|
||||
|
@@ -141,7 +141,9 @@ To do this manually:
|
||||
|
||||
?> It's possible to use other bootloaders here in the same way, but __you need a bootloader__, otherwise you'll have to use ISP again to write new firmware to your keyboard.
|
||||
|
||||
To do this the easy way, you can flash the board using the `:production` target when compiling. This compiles the firmware, then compiles the QMK DFU bootloader, and then creates a combined image. Once this is done, you'll see three files:
|
||||
#### Create QMK DFU Bootloader and Production images
|
||||
|
||||
You can create the firmware, the QMK DFU Bootloader and the production firmware images for the board using the `:production` target when compiling. Once this is done, you'll see three files:
|
||||
* `<keyboard>_<keymap>.hex`
|
||||
* `<keyboard>_<keymap>_bootloader.hex`
|
||||
* `<keyboard>_<keymap>_production.hex`
|
||||
@@ -236,12 +238,12 @@ For Caterina on the `atmega32u4`, these are the fuse settings that you want:
|
||||
| Fuse | Setting|
|
||||
|----------|--------|
|
||||
| Low | `0xFF` |
|
||||
| High | `0xD9` |
|
||||
| Extended | `0xC3` |
|
||||
| High | `0xD8` |
|
||||
| Extended | `0xCB` |
|
||||
|
||||
To set this add `-U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xC3:m` to your command. So the final command should look something like:
|
||||
To set this add `-U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m` to your command. So the final command should look something like:
|
||||
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xC3:m
|
||||
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m
|
||||
|
||||
|
||||
If you are using a different controller or want different configuration, you can use [this AVR Fuse Calculator](http://www.engbedded.com/fusecalc/) to find a better value for you.
|
||||
|
@@ -6,6 +6,7 @@
|
||||
* [テストとデバッグ](ja/newbs_testing_debugging.md)
|
||||
* [手助けを得る/サポート](ja/support.md)
|
||||
* [他のリソース](ja/newbs_learn_more_resources.md)
|
||||
* [シラバス](ja/syllabus.md)
|
||||
|
||||
* FAQ
|
||||
* [一般的な FAQ](ja/faq_general.md)
|
||||
@@ -33,7 +34,9 @@
|
||||
* [機能のカスタマイズ](ja/custom_quantum_functions.md)
|
||||
* [Zadig を使ったドライバのインストール](ja/driver_installation_zadig.md)
|
||||
* [キーマップの概要](ja/keymap.md)
|
||||
* [Vagrant のガイド](ja/getting_started_vagrant.md)
|
||||
* 開発環境
|
||||
* [Docker のガイド](ja/getting_started_docker.md)
|
||||
* [Vagrant のガイド](ja/getting_started_vagrant.md)
|
||||
* 書き込み
|
||||
* [書き込み](ja/flashing.md)
|
||||
* [ATmega32A の書き込み (ps2avrgb)](ja/flashing_bootloadhid.md)
|
||||
@@ -52,6 +55,7 @@
|
||||
* 単純なキーコード
|
||||
* [完全なリスト](ja/keycodes.md)
|
||||
* [基本的なキーコード](ja/keycodes_basic.md)
|
||||
* [言語固有のキーコード](ja/reference_keymap_extras.md)
|
||||
* [修飾キー](ja/feature_advanced_keycodes.md)
|
||||
* [Quantum キーコード](ja/quantum_keycodes.md)
|
||||
|
||||
@@ -72,9 +76,10 @@
|
||||
* [デバウンス API](ja/feature_debounce_type.md)
|
||||
* [キーロック](ja/feature_key_lock.md)
|
||||
* [レイヤー](ja/feature_layers.md)
|
||||
* [One Shot Keys](ja/one_shot_keys.md)
|
||||
* [ワンショットキー](ja/one_shot_keys.md)
|
||||
* [ポインティング デバイス](ja/feature_pointing_device.md)
|
||||
* [Swap Hands](ja/feature_swap_hands.md)
|
||||
* [ロー HID](ja/feature_rawhid.md)
|
||||
* [スワップハンド](ja/feature_swap_hands.md)
|
||||
* [タップダンス](ja/feature_tap_dance.md)
|
||||
* [タップホールド設定](ja/tap_hold.md)
|
||||
* [ターミナル](ja/feature_terminal.md)
|
||||
@@ -101,7 +106,7 @@
|
||||
* [Proton C 規約](ja/proton_c_conversion.md)
|
||||
* [PS/2 マウス](ja/feature_ps2_mouse.md)
|
||||
* [分割キーボード](ja/feature_split_keyboard.md)
|
||||
* [Stenography](ja/feature_stenography.md)
|
||||
* [速記](ja/feature_stenography.md)
|
||||
* [感熱式プリンタ](ja/feature_thermal_printer.md)
|
||||
* [Velocikey](ja/feature_velocikey.md)
|
||||
|
||||
@@ -110,6 +115,7 @@
|
||||
* [概要](ja/breaking_changes.md)
|
||||
* [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md)
|
||||
* 履歴
|
||||
* [2020年5月30日](ja/ChangeLog/20200530.md)
|
||||
* [2020年2月29日](ja/ChangeLog/20200229.md)
|
||||
* [2019年8月30日](ja/ChangeLog/20190830.md)
|
||||
|
||||
@@ -124,6 +130,7 @@
|
||||
* [SPI ドライバ](ja/spi_driver.md)
|
||||
* [WS2812 ドライバ](ja/ws2812_driver.md)
|
||||
* [EEPROM ドライバ](ja/eeprom_driver.md)
|
||||
* [シリアル ドライバ](ja/serial_driver.md)
|
||||
* [GPIO コントロール](ja/internals_gpio_control.md)
|
||||
* [キーボード ガイドライン](ja/hardware_keyboard_guidelines.md)
|
||||
|
||||
@@ -136,6 +143,11 @@
|
||||
* [開発環境](ja/api_development_environment.md)
|
||||
* [アーキテクチャの概要](ja/api_development_overview.md)
|
||||
|
||||
* ハードウェアプラットフォーム開発
|
||||
* Arm/ChibiOS
|
||||
* [MCU の選択](ja/platformdev_selecting_arm_mcu.md)
|
||||
* [早期初期化](ja/platformdev_chibios_earlyinit.md)
|
||||
|
||||
* QMK Reference
|
||||
* [QMK への貢献](ja/contributing.md)
|
||||
* [QMK ドキュメントの翻訳](ja/translating.md)
|
||||
@@ -155,9 +167,9 @@
|
||||
|
||||
* QMK の内部詳細(作成中)
|
||||
* [定義](ja/internals_defines.md)
|
||||
* [Input Callback Reg](ja/internals_input_callback_reg.md)
|
||||
* [入力コールバック登録](ja/internals_input_callback_reg.md)
|
||||
* [Midi デバイス](ja/internals_midi_device.md)
|
||||
* [Midi デバイスのセットアップ手順](ja/internals_midi_device_setup_process.md)
|
||||
* [Midi ユーティリティ](ja/internals_midi_util.md)
|
||||
* [Send Functions](ja/internals_send_functions.md)
|
||||
* [Midi 送信関数](ja/internals_send_functions.md)
|
||||
* [Sysex Tools](ja/internals_sysex_tools.md)
|
||||
|
223
docs/ja/cli_development.md
Normal file
223
docs/ja/cli_development.md
Normal file
@@ -0,0 +1,223 @@
|
||||
# QMK CLI 開発
|
||||
|
||||
<!---
|
||||
original document: 0.9.19:docs/cli_development.md
|
||||
git diff 0.9.19 HEAD -- docs/cli_development.md | cat
|
||||
-->
|
||||
|
||||
このドキュメントは、新しい `qmk` サブコマンドを書きたい開発者に役立つ情報が含まれています。
|
||||
|
||||
# 概要
|
||||
|
||||
QMK CLI は git で有名になったサブコマンドパターンを使って動作します。メインの `qmk` スクリプトは単に環境をセットアップし、実行する正しいエントリポイントを選択するためにあります。各サブコマンドは、何らかのアクションを実行しシェルのリターンコード、または None を返すエントリーポイント (`@cli.subcommand()` で修飾されます)を備えた自己完結型のモジュールです。
|
||||
|
||||
## 開発者モード:
|
||||
|
||||
キーボードを保守、あるいは QMK に貢献したい場合は、CLI の「開発者」モードを有効にすることができます:
|
||||
|
||||
`qmk config user.developer=True`
|
||||
|
||||
これにより利用可能な全てのサブコマンドが表示されます。
|
||||
**注意:** 追加で必要なものをインストールする必要があります:
|
||||
```bash
|
||||
python3 -m pip install -r requirements-dev.txt
|
||||
```
|
||||
|
||||
# サブコマンド
|
||||
|
||||
[MILC](https://github.com/clueboard/milc) は、`qmk` が引数の解析、設定、ログ、およびほかの多くの機能を処理するために使用する CLI フレームワークです。グルーコードを書くために時間を無駄にすることなく、ツールの作成に集中できます。
|
||||
|
||||
ローカル CLI 内のサブコマンドは、常に `qmk_firmware/lib/python/qmk/cli` で見つかります。
|
||||
|
||||
サブコマンドの例を見てみましょう。これは `lib/python/qmk/cli/hello.py` です:
|
||||
|
||||
```python
|
||||
"""QMK Python Hello World
|
||||
|
||||
This is an example QMK CLI script.
|
||||
"""
|
||||
from milc import cli
|
||||
|
||||
|
||||
@cli.argument('-n', '--name', default='World', help='Name to greet.')
|
||||
@cli.subcommand('QMK Hello World.')
|
||||
def hello(cli):
|
||||
"""Log a friendly greeting.
|
||||
"""
|
||||
cli.log.info('Hello, %s!', cli.config.hello.name)
|
||||
```
|
||||
|
||||
最初に `milc` から `cli` をインポートします。これが、ユーザとやり取りをし、スクリプトの挙動を制御する方法です。`@cli.argument()` を使って、コマンドラインフラグ `--name` を定義します。これは、ユーザが設定できる `hello.name` (そして対応する `user.name`) という名前の設定変数も作成し、引数を指定する必要が無くなります。`cli.subcommand()` デコレータは、この関数をサブコマンドとして指定します。サブコマンドの名前は関数の名前から取られます。
|
||||
|
||||
関数の中に入ると、典型的な "Hello, World!" プログラムが見つかります。`cli.log` を使って、基礎となる [ロガーオブジェクト](https://docs.python.org/3.6/library/logging.html#logger-objects) にアクセスし、その挙動はユーザが制御できます。またユーザが指定した名前の値に `cli.config.hello.name` でアクセスします。`cli.config.hello.name` の値は、ユーザが指定した `--name` 引数を調べることで決定されます。指定されていない場合、`qmk.ini` 設定ファイルの中の値が使われ、どちらも指定されていない場合は `cli.argument()` デコレータで指定されたデフォルトが代用されます。
|
||||
|
||||
# ユーザとの対話処理
|
||||
|
||||
MILC と QMK CLI にはユーザとやり取りするための幾つかの便利なツールがあります。これらの標準ツールを使うと、テキストに色を付けて対話し易くし、ユーザはその情報をいつどのように表示および保存するかを制御することができます。
|
||||
|
||||
## テキストの表示
|
||||
|
||||
サブコマンド内でテキストを出力するための2つの主な方法があります- `cli.log` と `cli.echo()`。それらは似た方法で動作しますが、ほとんどの一般的な目的の出力には `cli.log.info()` を使うことをお勧めします。
|
||||
|
||||
特別なトークンを使用してテキストを色付けし、プログラムの出力を理解しやすくすることができます。以下の[テキストの色付け](#colorizing-text)を見てください。
|
||||
|
||||
これらの両方の方法は python の [printf 形式の文字列書式化](https://docs.python.org/3.6/library/stdtypes.html#old-string-formatting) を使った組み込みの文字列書式化をサポートします。テキスト文字列内で`%s` と `%d` のようなトークンを使い、引数で値を渡すことができます。例として、上記の Hello、World プログラムを見てください。
|
||||
|
||||
書式演算子 (`%`) を直接使わないでください、常に引数で値を渡します。
|
||||
|
||||
### ログ (`cli.log`)
|
||||
|
||||
`cli.log` オブジェクトは[ロガーオブジェクト](https://docs.python.org/3.6/library/logging.html#logger-objects)へのアクセスを与えます。ログ出力を設定し、ユーザに各ログレベルの素敵な絵文字(またはターミナルが unicode をサポートしない場合はログレベル名)を表示します。このようにして、ユーザは何か問題が発生した時に最も重要なメッセージを一目で確認することができます。
|
||||
|
||||
デフォルトのログレベルは `INFO` です。ユーザが `qmk -v <subcommand>` を実行すると、デフォルトのログレベルは `DEBUG` に設定されます。
|
||||
|
||||
| 関数 | 絵文字 |
|
||||
|----------|-------|
|
||||
| cli.log.critical | `{bg_red}{fg_white}¬_¬{style_reset_all}` |
|
||||
| cli.log.error | `{fg_red}☒{style_reset_all}` |
|
||||
| cli.log.warning | `{fg_yellow}⚠{style_reset_all}` |
|
||||
| cli.log.info | `{fg_blue}Ψ{style_reset_all}` |
|
||||
| cli.log.debug | `{fg_cyan}☐{style_reset_all}` |
|
||||
| cli.log.notset | `{style_reset_all}¯\\_(o_o)_/¯` |
|
||||
|
||||
### 出力 (`cli.echo`)
|
||||
|
||||
場合によっては単にログシステムの外部でテキストを出力する必要があります。これは、固定データを出力したり、ログに記録してはいけない何かを書きだす場合に適しています。ほとんどの場合、`cli.echo` よりも `cli.log.info()` を選ぶべきです。
|
||||
|
||||
### テキストの色付け
|
||||
|
||||
テキスト内に色トークンを含めることで、テキストの出力を色付けすることができます。情報を伝えるためではなく、強調するために色を使います。ユーザは色を無効にできることを覚えておいてください。色を無効にした場合でもサブコマンドは引き続き使えるようにしてください。
|
||||
|
||||
背景色を設定するのは、あなたがやっていることに不可欠ではない限り、通常は避けるべきです。ユーザは、ターミナルの色に関しては多くの好みを持つため、あなたは黒と白のどちらの背景に対してもうまく機能する色を選択する必要があることを覚えておいてください。
|
||||
|
||||
'fg' という接頭辞の付いた色は、前景(テキスト)色に影響します。'bg' という接頭辞の付いた色は、背景色に影響します。
|
||||
|
||||
| 色 | 背景 | 拡張背景 | 前景 | 拡張前景 |
|
||||
|-------|------------|---------------------|------------|--------------------|
|
||||
| 黒 | {bg_black} | {bg_lightblack_ex} | {fg_black} | {fg_lightblack_ex} |
|
||||
| 青 | {bg_blue} | {bg_lightblue_ex} | {fg_blue} | {fg_lightblue_ex} |
|
||||
| シアン | {bg_cyan} | {bg_lightcyan_ex} | {fg_cyan} | {fg_lightcyan_ex} |
|
||||
| 緑 | {bg_green} | {bg_lightgreen_ex} | {fg_green} | {fg_lightgreen_ex} |
|
||||
| マゼンタ | {bg_magenta} | {bg_lightmagenta_ex} | {fg_magenta} | {fg_lightmagenta_ex} |
|
||||
| 赤 | {bg_red} | {bg_lightred_ex} | {fg_red} | {fg_lightred_ex} |
|
||||
| 白 | {bg_white} | {bg_lightwhite_ex} | {fg_white} | {fg_lightwhite_ex} |
|
||||
| 黄 | {bg_yellow} | {bg_lightyellow_ex} | {fg_yellow} | {fg_lightyellow_ex} |
|
||||
|
||||
ANSI 出力の挙動を変更するために使うことができる制御シーケンスもあります。
|
||||
|
||||
| 制御シーケンス | 説明 |
|
||||
|-------------------|-------------|
|
||||
| {style_bright} | テキストを明るくする |
|
||||
| {style_dim} | テキストを暗くする |
|
||||
| {style_normal} | テキストを通常にする (`{style_bright}` または `{style_dim}` のどちらでもない) |
|
||||
| {style_reset_all} | 全てのテキストの属性をデフォルトに再設定する(これは自動的に全ての文字列の最後に自動的に追加されます。) |
|
||||
| {bg_reset} | 背景色をユーザのデフォルトに再設定します。 |
|
||||
| {fg_reset} | 背景色をユーザのデフォルトに再設定します。 |
|
||||
|
||||
# 引数と設定
|
||||
|
||||
QMK は引数の解析と設定の詳細をあなたの代わりに処理します。新しい引数を追加すると、サブコマンドの名前と引数の長い名前に基づいて設定ツリーに自動的に組み込まれます。属性形式のアクセス (`cli.config.<subcommand>.<argument>`) あるいは辞書形式のアクセス (`cli.config['<subcommand>']['<argument>']`) を使って、`cli.config` 内のこの設定にアクセスすることができます。
|
||||
|
||||
内部では、QMK は [設定ファイルのパーサ](https://docs.python.org/3/library/configparser.html) を使って設定を格納します。これにより、人間が編集可能な方法で設定を表す簡単で分かり易い方法を提供します。この設定へのアクセスをラップして、設定ファイルのパーサーが通常持たない幾つかの機能を提供しています。
|
||||
|
||||
## 設定値の読み込み
|
||||
|
||||
通常期待される全ての方法で `cli.config` とやり取りすることができます。例えば、`qmk compile` コマンドは `cli.config.compile.keyboard` からキーボード名を取得します。値がコマンドライン、環境変数あるいは設定ファイルからきたものであるかどうかを知る必要はありません。
|
||||
|
||||
繰り返しもサポートされます:
|
||||
|
||||
```
|
||||
for section in cli.config:
|
||||
for key in cli.config[section]:
|
||||
cli.log.info('%s.%s: %s', section, key, cli.config[section][key])
|
||||
```
|
||||
|
||||
## 設定値の設定
|
||||
|
||||
通常の方法で設定値を設定することができます。
|
||||
|
||||
辞書形式:
|
||||
|
||||
```
|
||||
cli.config['<section>']['<key>'] = <value>
|
||||
```
|
||||
|
||||
属性形式:
|
||||
|
||||
```
|
||||
cli.config.<section>.<key> = <value>
|
||||
```
|
||||
|
||||
## 設定値の削除
|
||||
|
||||
通常の方法で設定値を削除することができます。
|
||||
|
||||
辞書形式:
|
||||
|
||||
```
|
||||
del(cli.config['<section>']['<key>'])
|
||||
```
|
||||
|
||||
属性形式:
|
||||
|
||||
```
|
||||
del(cli.config.<section>.<key>)
|
||||
```
|
||||
|
||||
## 設定ファイルの書き方
|
||||
|
||||
設定は変更しても書き出されません。ほとんどのコマンドでこれをする必要はありません。ユーザに `qmk config` を使って設定を慎重に変更させることをお勧めします。
|
||||
|
||||
設定を書き出すために `cli.save_config()` を使うことができます。
|
||||
|
||||
## 設定からの引数の除外
|
||||
|
||||
一部の引数は設定ファイルに反映すべきではありません。これらは引数を作成する時に `arg_only=True` を追加することで除外することができます。
|
||||
|
||||
例:
|
||||
|
||||
```
|
||||
@cli.argument('-o', '--output', arg_only=True, help='File to write to')
|
||||
@cli.argument('filename', arg_only=True, help='Configurator JSON file')
|
||||
@cli.subcommand('Create a keymap.c from a QMK Configurator export.')
|
||||
def json_keymap(cli):
|
||||
pass
|
||||
```
|
||||
|
||||
`cli.args` を使ってのみこれらの引数にアクセスすることができます。例えば:
|
||||
|
||||
```
|
||||
cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.output)
|
||||
```
|
||||
|
||||
# テスト、リントおよびフォーマット
|
||||
|
||||
nose2、flake8 および yapf を使ってコードをテスト、リントおよびフォーマットします。これらのテストを実行するために `pytest` と `pyformat` サブコマンドを使うことができます。
|
||||
|
||||
### テストとリント
|
||||
|
||||
qmk pytest
|
||||
|
||||
### フォーマット
|
||||
|
||||
qmk pyformat
|
||||
|
||||
## フォーマットの詳細
|
||||
|
||||
[yapf](https://github.com/google/yapf) を使ってコードを自動的にフォーマットします。フォーマットの設定は `setup.cfg` の `[yapf]` セクションにあります。
|
||||
|
||||
?> ヒント- 多くのエディタは yapf をプラグインとして使って、入力したコードを自動的にフォーマットすることができます。
|
||||
|
||||
## テストの詳細
|
||||
|
||||
テストは `lib/python/qmk/tests/` にあります。このディレクトリに単体テストと統合テストの両方があります。コードの単体テストと統合テストの両方を書いてほしいですが、一方のみ書く場合は統合テストを優先してください。
|
||||
|
||||
PR にテストの包括的なセットが含まれない場合は、次のようなコメントをコードに追加して、他の人が手助けできるようにしてください:
|
||||
|
||||
# TODO(unassigned/<your_github_username>): Write <unit|integration> tests
|
||||
|
||||
[nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) を使ってテストを実行します。テスト関数でできることの詳細については、nose2 のドキュメントを参照してください。
|
||||
|
||||
## リントの詳細
|
||||
|
||||
flake8 を使ってコードをリントします。PR を開く前に、コードは flake8 をパスしなければなりません。これは `qmk pytest` を実行するときにチェックされ、PR を登録したときに CI によってチェックされます。
|
@@ -1,8 +1,8 @@
|
||||
# QMK の設定
|
||||
|
||||
<!---
|
||||
original document: 0.8.62:docs/config_options.md
|
||||
git diff 0.8.62 HEAD -- docs/config_options.md | cat
|
||||
original document: 0.9.43:docs/config_options.md
|
||||
git diff 0.9.43 HEAD -- docs/config_options.md | cat
|
||||
-->
|
||||
|
||||
QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。
|
||||
@@ -118,9 +118,9 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
||||
* `#define NO_ACTION_ONESHOT`
|
||||
* ワンショットモディファイアを無効にします
|
||||
* `#define NO_ACTION_MACRO`
|
||||
* 古い形式のマクロ処理を無効にします: MACRO() & action_get_macro
|
||||
* `MACRO()`、`action_get_macro()` _(非推奨)_ を使う古い形式のマクロ処理を無効にします
|
||||
* `#define NO_ACTION_FUNCTION`
|
||||
* fn_actions 配列(非推奨)からの action_function() の呼び出しを無効にします
|
||||
* `fn_actions`、`action_function()` _(非推奨)_ を使う古い形式の関数処理を無効にします
|
||||
|
||||
## 有効にできる機能
|
||||
|
||||
@@ -187,7 +187,14 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
||||
* `#define RGBLIGHT_ANIMATIONS`
|
||||
* RGB アニメーションを実行します
|
||||
* `#define RGBLIGHT_LAYERS`
|
||||
* オンとオフを切り替えることができる [ライトレイヤー](ja/feature_rgblight.md) を定義できます。現在のキーボードレイヤーまたは Caps Lock 状態を表示するのに最適です。
|
||||
* オンとオフを切り替えることができる [ライトレイヤー](ja/feature_rgblight.md?id=lighting-layers) を定義できます。現在のキーボードレイヤーまたは Caps Lock 状態を表示するのに最適です。
|
||||
* `#define RGBLIGHT_MAX_LAYERS`
|
||||
* デフォルトは8です。もしさらに [ライトレイヤー](ja/feature_rgblight.md?id=lighting-layers) が必要であれば、32まで拡張できます。
|
||||
* メモ: 最大値を大きくするとファームウェアサイズが大きくなり、分割キーボードで同期が遅くなります。
|
||||
* `#define RGBLIGHT_LAYER_BLINK`
|
||||
* 指定されたミリ秒の間、ライトレイヤーを [点滅](ja/feature_rgblight.md?id=lighting-layer-blink) する機能を追加します(例えば、アクションを確認するため)。
|
||||
* `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF`
|
||||
* 定義されている場合、RGB ライトがオフになっている場合でも [ライトレイヤー](ja/feature_rgblight?id=overriding-rgb-lighting-onoff-status) が表示されます。
|
||||
* `#define RGBLED_NUM 12`
|
||||
* LED の数
|
||||
* `#define RGBLIGHT_SPLIT`
|
||||
@@ -239,7 +246,10 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
||||
* `#define SPLIT_HAND_PIN B7`
|
||||
* high/low ピンを使って左右を決定します。low = 右手、high = 左手。`B7` を使っているピンに置き換えます。これはオプションで、`SPLIT_HAND_PIN` が未定義のままである場合、EE_HANDS メソッドまたは標準の Let's Splitが使っている MASTER_LEFT / MASTER_RIGHT 定義をまだ使うことができます。
|
||||
|
||||
* `#define EE_HANDS` (`SPLIT_HAND_PIN` が定義されていない場合のみ動作します)
|
||||
* `#define SPLIT_HAND_MATRIX_GRID <out_pin>,<in_pin>`
|
||||
* 左右はキーマトリックスのキースイッチが存在しない交点を使って決定されます。通常、この交点が短絡している(ローレベル)のときに左側と見なされます。もし `#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT` が定義されている場合は、ローレベルの時に右側と決定されます。
|
||||
|
||||
* `#define EE_HANDS` (`SPLIT_HAND_PIN` と `SPLIT_HAND_MATRIX_GRID` が定義されていない場合のみ動作します)
|
||||
* `eeprom-lefthand.eep`/`eeprom-righthand.eep` がそれぞれの半分に書き込まれた後で、EEPROM 内に格納されている左右の設定の値を読み込みます。
|
||||
|
||||
* `#define MASTER_RIGHT`
|
||||
@@ -313,7 +323,8 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
||||
* `LAYOUTS`
|
||||
* このキーボードがサポートする[レイアウト](ja/feature_layouts.md)のリスト
|
||||
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
||||
* キーボードをコンパイルする時に、Link Time Optimization (`LTO`) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。ただし、`LTO` が有効な場合、古いマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。
|
||||
* キーボードをコンパイルする時に、Link Time Optimization (LTO) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。
|
||||
ただし、LTO が有効な場合、古い TMK のマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。(メモ: これは QMK の [マクロ](ja/feature_macros.md) と [レイヤー](ja/feature_layers.md) には影響を与えません。)
|
||||
* `LTO_ENABLE`
|
||||
* LINK_TIME_OPTIMIZATION_ENABLE と同じ意味です。`LINK_TIME_OPTIMIZATION_ENABLE` の代わりに `LTO_ENABLE` を使うことができます。
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# キーボードの挙動をカスタマイズする方法
|
||||
|
||||
<!---
|
||||
original document: 0.8.62:docs/custom_quantum_functions.md
|
||||
git diff 0.8.62 HEAD -- docs/custom_quantum_functions.md | cat
|
||||
original document: 0.9.43:docs/custom_quantum_functions.md
|
||||
git diff 0.9.43 HEAD -- docs/custom_quantum_functions.md | cat
|
||||
-->
|
||||
|
||||
多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。
|
||||
@@ -346,6 +346,11 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return state;
|
||||
}
|
||||
```
|
||||
|
||||
特定のレイヤーの状態を確認するには、 `IS_LAYER_ON_STATE(state, layer)` と `IS_LAYER_OFF_STATE(state, layer)` マクロを使います。
|
||||
|
||||
`layer_state_set_*` 関数の外では、グローバルなレイヤー状態を確認するために `IS_LAYER_ON(layer)` と `IS_LAYER_OFF(layer)` マクロを使えます。
|
||||
|
||||
### `layer_state_set_*` 関数のドキュメント
|
||||
|
||||
* キーボード/リビジョン: `layer_state_t layer_state_set_kb(layer_state_t state)`
|
||||
@@ -488,56 +493,3 @@ void eeconfig_init_user(void) { // EEPROM がリセットされます!
|
||||
* キーマップ: `void eeconfig_init_user(void)`、`uint32_t eeconfig_read_user(void)` および `void eeconfig_update_user(uint32_t val)`
|
||||
|
||||
`val` は EEPROM に書き込みたいデータの値です。`eeconfig_read_*` 関数は EEPROM から32ビット(DWORD) 値を返します。
|
||||
|
||||
# カスタムタッピング期間
|
||||
|
||||
デフォルトでは、タッピング期間と(`IGNORE_MOD_TAP_INTERRUPT` のような)関連オプションはグローバルに設定されていて、キーでは設定することができません。ほとんどのユーザにとって、これは全然問題ありません。しかし、場合によっては、`LT` キーとは異なるタイムアウトによって、デュアルファンクションキーが大幅に改善されます。なぜなら、一部のキーは他のキーよりも押し続けやすいためです。それぞれにカスタムキーコードを使う代わりに、キーごとに設定可能なタイムアウトの挙動を設定できます。
|
||||
|
||||
キーごとのタイムアウトの挙動を制御するための2つの設定可能なオプションがあります:
|
||||
|
||||
- `TAPPING_TERM_PER_KEY`
|
||||
- `IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
|
||||
|
||||
必要な機能ごとに、`config.h` に `#define` 行を追加する必要があります。
|
||||
|
||||
```
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
|
||||
```
|
||||
|
||||
|
||||
## `get_tapping_term` の実装例
|
||||
|
||||
キーコードに基づいて `TAPPING_TERM` を変更するには、次のようなものを `keymap.c` ファイルに追加します:
|
||||
|
||||
```c
|
||||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case SFT_T(KC_SPC):
|
||||
return TAPPING_TERM + 1250;
|
||||
case LT(1, KC_GRV):
|
||||
return 130;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `get_ignore_mod_tap_interrupt` の実装例
|
||||
|
||||
キーコードに基づいて `IGNORE_MOD_TAP_INTERRUPT` の値を変更するには、次のようなものを `keymap.c` ファイルに追加します:
|
||||
|
||||
```c
|
||||
bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case SFT_T(KC_SPC):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `get_tapping_term` / `get_ignore_mod_tap_interrupt` 関数のドキュメント
|
||||
|
||||
ここにある他の多くの関数とは異なり、quantum あるいはキーボードレベルの関数を持つ必要はありません (または理由さえありません)。ここではユーザレベルの関数だけが有用なため、そのようにマークする必要はありません。
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# Zadig を使ったブートローダドライバのインストール
|
||||
|
||||
<!---
|
||||
original document: 0.9.0:docs/driver_installation_zadig.md
|
||||
git diff 0.9.0 HEAD -- docs/driver_installation_zadig.md | cat
|
||||
original document: 0.9.43:docs/driver_installation_zadig.md
|
||||
git diff 0.9.43 HEAD -- docs/driver_installation_zadig.md | cat
|
||||
-->
|
||||
|
||||
QMK はホストにたいして通常の HID キーボードデバイスとして振る舞うため特別なドライバは必要ありません。しかし、Windows でのキーボードへの書き込みは、多くの場合、キーボードをリセットした時に現れるブートローダデバイスで*行います*。
|
||||
@@ -28,7 +28,7 @@ Zadig は自動的にブートローダデバイスを検知します。**Option
|
||||
|
||||
!> Zadig が `HidUsb` ドライバを使用する1つ以上のデバイスを表示する場合、キーボードはおそらくブートローダモードではありません。矢印はオレンジ色になり、システムドライバの変更を確認するように求められます。この場合、続行**しないでください**!
|
||||
|
||||
矢印が緑色で表示されたら、ドライバを選択し、**Install Driver** をクリックします。`libusb-win32` ドライバは通常 AVR で動作し、`WinUSB`は ARM で動作しますが、それでもキーボードに書き込みできない場合は、リストから異なるドライバをインストールしてみてください。msys2 を使ってコマンドライン経由で USBaspLoader デバイスに書き込むには、`libusbk` ドライバがお勧めです。そうではなく書き込みに QMK Toolbox を使っている場合は `libusb-win32` がうまく動作します。
|
||||
矢印が緑色で表示されたら、ドライバを選択し、**Install Driver** をクリックします。`libusb-win32` ドライバは通常 AVR で動作し、`WinUSB`は ARM で動作しますが、それでもキーボードに書き込みできない場合は、リストから異なるドライバをインストールしてみてください。USBAspLoader デバイスは `libusbK` ドライバを使わなければなりません。
|
||||
|
||||

|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# よくあるビルドの質問
|
||||
|
||||
<!---
|
||||
original document: 0.9.10:docs/faq_build.md
|
||||
git diff 0.9.10 HEAD -- docs/faq_build.md | cat
|
||||
original document: 0.9.43:docs/faq_build.md
|
||||
git diff 0.9.43 HEAD -- docs/faq_build.md | cat
|
||||
-->
|
||||
|
||||
このページは QMK のビルドに関する質問を説明します。まだビルドをしていない場合は、[ビルド環境のセットアップ](ja/getting_started_build_tools.md) および [Make 手順](ja/getting_started_make_guide.md)ガイドを読むべきです。
|
||||
@@ -57,7 +57,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uacc
|
||||
|
||||
**注意:** 古い(1.12以前の) ModemManager では、フィルタリングは厳密なモードではない場合にのみ動作し、以下のコマンドはその設定を更新することができます。
|
||||
```console
|
||||
sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service
|
||||
printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart ModemManager
|
||||
```
|
||||
|
47
docs/ja/feature_debounce_type.md
Normal file
47
docs/ja/feature_debounce_type.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# デバウンスアルゴリズム
|
||||
|
||||
<!---
|
||||
original document: 0.9.19:docs/feature_debounce_type.md
|
||||
git diff 0.9.19 HEAD -- docs/feature_debounce_type.md | cat
|
||||
-->
|
||||
|
||||
QMK はデバウンス API を介して複数のデバウンスアルゴリズムをサポートします。
|
||||
|
||||
どのデバウンスメソッドが呼ばれるかのロジックは下記のとおりです。rules.mk で設定された様々な定義をチェックします。
|
||||
|
||||
```
|
||||
DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
|
||||
DEBOUNCE_TYPE?= sym_g
|
||||
ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
|
||||
QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
|
||||
endif
|
||||
```
|
||||
|
||||
# デバウンスの選択
|
||||
|
||||
| DEBOUNCE_TYPE | 説明 | 他に必要なもの |
|
||||
| ------------- | --------------------------------------------------- | ----------------------------- |
|
||||
| 未定義 | デフォルトのアルゴリズム、現在のところ sym_g を使います | 無し |
|
||||
| custom | 独自のデバウンスコードを使います | ```SRC += debounce.c``` で独自の debounce.c を追加し、必要な関数を実装します |
|
||||
| anything_else | quantum/debounce/* から他のアルゴリズムを使います | 無し |
|
||||
|
||||
**分割キーボードについて**:
|
||||
デバウンスコードは分割キーボードと互換性があります。
|
||||
|
||||
# 独自のデバウンスコードの使用
|
||||
* ```DEBOUNCE_TYPE = custom``` を設定します。
|
||||
* ```SRC += debounce.c``` を追加します。
|
||||
* 独自の ```debounce.c``` を追加します。例については、```quantum/debounce``` にある現在の実装をみてください。
|
||||
* 毎回のマトリクススキャンの結果はその度デバウンスによって処理されます。
|
||||
* MATRIX_ROWS ではなく num_rows を使って、分割キーボードが正しくサポートされるようにします。
|
||||
|
||||
# インクルードされているデバウンスメソッド間での切り替え
|
||||
独自の debounce.c をインクルードすることで独自のコードを使うか、またはインクルードされている他のコードに切り替えることができます。
|
||||
含まれるデバウンスメソッドは以下の通りです:
|
||||
* eager_pr - 行ごとにデバウンスします。状態が変化すると、応答は即座に行われ、その後その行は ```DEBOUNCE``` ミリ秒の間入力されません。
|
||||
```NUM_KEYS``` の 8ビットカウンタの更新に高い計算コストがかかる、もしくは低スキャンレートのキーボード用で、各指は通常一度に1行しか叩かないようになっています。これは ErgoDox モデルに適しています; マトリックスは90度回転しているため、その「行」は実際には「列」であり、通常の使用では各指は一度に1つの「行」にしか当たりません。
|
||||
* eager_pk - キーごとにデバウンスします。状態が変化すると、応答は即座に行われ、その後そのキーは ```DEBOUNCE``` ミリ秒の間入力されません。
|
||||
* sym_g - キーボードごとにデバウンスします。状態が変化すると、グローバルタイマが設定されます。```DEBOUNCE``` ミリ秒の間何も変化がなければ、全ての入力の変更がプッシュされます。
|
||||
* sym_pk - キーごとにデバウンスします。状態が変化すると、キーごとのタイマーが設定されます。```DEBOUNCE``` ミリ秒の間そのキーに変化がなければ、キーの状態の変更がプッシュされます。
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# DIP スイッチ
|
||||
|
||||
<!---
|
||||
original document: 0.8.94:docs/feature_dip_switch.md
|
||||
git diff 0.8.94 HEAD -- docs/feature_dip_switch.md | cat
|
||||
original document: 0.9.43:docs/feature_dip_switch.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_dip_switch.md | cat
|
||||
-->
|
||||
|
||||
DIP スイッチは、以下を `rules.mk` に追加することでサポートされます:
|
||||
@@ -12,9 +12,17 @@ DIP スイッチは、以下を `rules.mk` に追加することでサポート
|
||||
さらに、以下を `config.h` に追加します:
|
||||
|
||||
```c
|
||||
// Connects each switch in the dip switch to the GPIO pin of the MCU
|
||||
#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
|
||||
```
|
||||
|
||||
あるいは
|
||||
|
||||
```c
|
||||
// Connect each switch in the DIP switch to an unused intersections in the key matrix.
|
||||
#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {2,6} } // List of row and col pairs
|
||||
```
|
||||
|
||||
## コールバック
|
||||
|
||||
コールバック関数を `<keyboard>.c` に記述することができます:
|
||||
@@ -92,4 +100,10 @@ void dip_switch_update_mask_user(uint32_t state) {
|
||||
|
||||
## ハードウェア
|
||||
|
||||
### DIP スイッチの各スイッチを MCU の GPIO ピンに接続する
|
||||
|
||||
DIP スイッチの片側は MCU のピンへ直接配線し、もう一方の側はグラウンドに配線する必要があります。機能的に同じであるため、どちら側がどちらに接続されているかは問題にはならないはずです。
|
||||
|
||||
### DIP スイッチの各スイッチをキーマトリクスの未使用の交点に接続する
|
||||
|
||||
キースイッチと同じように、ダイオードと DIP スイッチが ROW 線と COL 線に接続します。
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# 動的マクロ: ランタイムでのマクロの記録および再生
|
||||
|
||||
<!---
|
||||
original document: 0.8.123:docs/feature_dynamic_macros.md
|
||||
git diff 0.8.123 HEAD -- docs/feature_dynamic_macros.md | cat
|
||||
original document: 0.9.43:docs/feature_dynamic_macros.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_dynamic_macros.md | cat
|
||||
-->
|
||||
|
||||
QMK はその場で作られた一時的なマクロをサポートします。これらを動的マクロと呼びます。それらはユーザがキーボードから定義し、キーボードのプラグを抜くか再起動すると失われます。
|
||||
@@ -23,7 +23,7 @@ QMK はその場で作られた一時的なマクロをサポートします。
|
||||
|
||||
マクロの記録を開始するには、`DYN_REC_START1` または `DYN_REC_START2` のどちらかを押します。
|
||||
|
||||
記録を終了するには、`DYN_REC_STOP` レイヤーボタンを押します。
|
||||
記録を終了するには、`DYN_REC_STOP` レイヤーボタンを押します。`DYN_REC_START1` または `DYN_REC_START2` をもう一度押すことでも記録を終了することができます。
|
||||
|
||||
マクロを再生するには、`DYN_MACRO_PLAY1` あるいは `DYN_MACRO_PLAY2` のどちらかを押します。
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# エンコーダ
|
||||
|
||||
<!---
|
||||
original document: 0.8.123:docs/feature_encoders.md
|
||||
git diff 0.8.123 HEAD -- docs/feature_encoders.md | cat
|
||||
original document: 0.9.43:docs/feature_encoders.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_encoders.md | cat
|
||||
-->
|
||||
|
||||
以下を `rules.mk` に追加することで基本的なエンコーダがサポートされます:
|
||||
@@ -31,7 +31,7 @@ ENCODER_ENABLE = yes
|
||||
#define ENCODER_DIRECTION_FLIP
|
||||
```
|
||||
|
||||
さらに、解像度を同じファイルで指定することができます (デフォルトかつお勧めは4):
|
||||
さらに、エンコーダが各戻り止め(デテント)間に登録するパルス数を定義する解像度は、次のように定義できます:
|
||||
|
||||
```c
|
||||
#define ENCODER_RESOLUTION 4
|
||||
|
@@ -1,11 +1,11 @@
|
||||
# HD44780 LCD ディスプレイ
|
||||
|
||||
<!---
|
||||
original document: 0.8.123:docs/feature_hd44780.md
|
||||
git diff 0.8.123 HEAD -- docs/feature_hd44780.md | cat
|
||||
original document: 0.9.43:docs/feature_hd44780.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_hd44780.md | cat
|
||||
-->
|
||||
|
||||
これは Peter Fleury の LCD ライブラリの統合です。このページは基本について説明します。[詳細なドキュメントについてはこのページをご覧ください](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) (訳注)原文のリンク先のページは、サービスの終了に伴って削除されています。移行先は (http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) と思われます。
|
||||
これは Peter Fleury の LCD ライブラリの統合です。このページは基本について説明します。[詳細なドキュメントについてはこのページをご覧ください](http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||
|
||||
HD44780 ディスプレイのサポートを有効にするには、キーボードの `rules.mk` の `HD44780_ENABLE` フラグを yes に設定します。
|
||||
|
||||
@@ -59,4 +59,4 @@ LCD_DISP_ON_CURSOR_BLINK : ディスプレイオン、点滅カーソル
|
||||
|
||||
ディスプレイに何かを表示するには、最初に `lcd_gotoxy(column, line)` を呼びます。最初の行の先頭に移動するには、`lcd_gotoxy(0, 0)` を呼び出し、その後 `lcd_puts("example string")` を使って文字列を出力します。
|
||||
|
||||
ディスプレイを制御することができる、より多くのメソッドがあります。[詳細なドキュメントについてはリンクされたページをご覧ください](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) (訳注)原文のリンク先のページは、サービスの終了に伴って削除されています。移行先は (http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) と思われます。
|
||||
ディスプレイを制御することができる、より多くのメソッドがあります。[詳細なドキュメントについてはリンクされたページをご覧ください](http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# レイヤー :id=layers
|
||||
|
||||
<!---
|
||||
original document: 0.9.20:docs/feature_layers.md
|
||||
git diff 0.9.20 HEAD -- docs/feature_layers.md | cat
|
||||
original document: 0.9.43:docs/feature_layers.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_layers.md | cat
|
||||
-->
|
||||
|
||||
QMK ファームウェアの最も強力で良く使われている機能の一つは、レイヤーを使う機能です。ほとんどの人にとって、これはラップトップやタブレットキーボードにあるのと同じように、様々なキーを可能にするファンクションキーに相当します。
|
||||
@@ -58,42 +58,42 @@ QMK を使い始めたばかりの場合は、全てを単純にしたいでし
|
||||
|
||||
レイヤーの使用あるいは操作に関係する多くの関数(と変数)があります。
|
||||
|
||||
| 関数 | 説明 |
|
||||
|----------------------------------------------|---------------------------------------------------------------------------------------------------------|
|
||||
| `layer_state_set(layer_mask)` | 直接レイヤーの状態を設定する (推奨。何をしているのか分かっていない場合は使わないでください)。 |
|
||||
| `layer_clear()` | 全てのレイヤーを消去する (全てをオフにします)。 |
|
||||
| `layer_move(layer)` | 指定されたレイヤーをオンにし、それ以外をオフにする。 |
|
||||
| `layer_on(layer)` | 指定されたレイヤーをオンにし、それ以外を既存の状態のままにする。 |
|
||||
| `layer_off(layer)` | 指定されたレイヤーをオフにし、それ以外を既存の状態のままにする。 |
|
||||
| `layer_invert(layer)` | 指定されたレイヤーの状態を反転/トグルする。 |
|
||||
| `layer_or(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で一致するビットに基づいてレイヤーをオンにする。 |
|
||||
| `layer_and(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で有効なビットに基づいてレイヤーをオンにする。 |
|
||||
| `layer_xor(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で一致しないビットに基づいてレイヤーをオンにする。 |
|
||||
| `layer_debug(layer_mask)` | デバッガのコンソールに現在のビットマスクと最も高いレイヤーを出力する。 |
|
||||
| `default_layer_set(layer_mask)` | 直接デフォルトレイヤーの状態を設定する (推奨。何をしているのか分かっていない場合は使わないでください)。 |
|
||||
| `default_layer_or(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致するビットに基づいてレイヤーをオンにする。 |
|
||||
| `default_layer_and(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致する有効なビットに基づいてレイヤーをオンにする。 |
|
||||
| `default_layer_xor(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致しないビットに基づいてレイヤーをオンにする。 |
|
||||
| `default_layer_debug(layer_mask)` | デバッガのコンソールに現在のビットマスクと最も高いアクティブなレイヤーを出力する。 |
|
||||
| [`set_single_persistent_default_layer(layer)`](ja/ref_functions.md#setting-the-persistent-default-layer) | デフォルトレイヤーを設定し、それを永続化メモリ (EEPROM) に書き込む。 |
|
||||
| [`update_tri_layer(x, y, z)`](ja/ref_functions.md#update_tri_layerx-y-z) | レイヤー `x` と `y` の両方がオンであるかを調べ、それに基づいて `z` を設定する(両方がオンの場合オン、そうでなければオフ)。 |
|
||||
| [`update_tri_layer_state(state, x, y, z)`](ja/ref_functions.md#update_tri_layer_statestate-x-y-z) | `update_tri_layer(x, y, z)` と同じことをするが、`layer_state_set_*` 関数から呼ばれる。 |
|
||||
| 関数 | 説明 |
|
||||
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `layer_state_set(layer_mask)` | 直接レイヤーの状態を設定する (推奨。何をしているのか分かっていない場合は使わないでください)。 |
|
||||
| `layer_clear()` | 全てのレイヤーを消去する (全てをオフにします)。 |
|
||||
| `layer_move(layer)` | 指定されたレイヤーをオンにし、それ以外をオフにする。 |
|
||||
| `layer_on(layer)` | 指定されたレイヤーをオンにし、それ以外を既存の状態のままにする。 |
|
||||
| `layer_off(layer)` | 指定されたレイヤーをオフにし、それ以外を既存の状態のままにする。 |
|
||||
| `layer_invert(layer)` | 指定されたレイヤーの状態を反転/トグルする。 |
|
||||
| `layer_or(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で一致するビットに基づいてレイヤーをオンにする。 |
|
||||
| `layer_and(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で有効なビットに基づいてレイヤーをオンにする。 |
|
||||
| `layer_xor(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で一致しないビットに基づいてレイヤーをオンにする。 |
|
||||
| `layer_debug(layer_mask)` | デバッガのコンソールに現在のビットマスクと最も高いレイヤーを出力する。 |
|
||||
| `default_layer_set(layer_mask)` | 直接デフォルトレイヤーの状態を設定する (推奨。何をしているのか分かっていない場合は使わないでください)。 |
|
||||
| `default_layer_or(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致するビットに基づいてレイヤーをオンにする。 |
|
||||
| `default_layer_and(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致する有効なビットに基づいてレイヤーをオンにする。 |
|
||||
| `default_layer_xor(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致しないビットに基づいてレイヤーをオンにする。 |
|
||||
| `default_layer_debug(layer_mask)` | デバッガのコンソールに現在のビットマスクと最も高いアクティブなレイヤーを出力する。 |
|
||||
| [`set_single_persistent_default_layer(layer)`](ja/ref_functions.md#setting-the-persistent-default-layer) | デフォルトレイヤーを設定し、それを永続化メモリ (EEPROM) に書き込む。 |
|
||||
| [`update_tri_layer(x, y, z)`](ja/ref_functions.md#update_tri_layerx-y-z) | レイヤー `x` と `y` の両方がオンであるかを調べ、それに基づいて `z` を設定する(両方がオンの場合オン、そうでなければオフ)。 |
|
||||
| [`update_tri_layer_state(state, x, y, z)`](ja/ref_functions.md#update_tri_layer_statestate-x-y-z) | `update_tri_layer(x, y, z)` と同じことをするが、`layer_state_set_*` 関数から呼ばれる。 |
|
||||
|
||||
|
||||
呼び出すことができる関数に加えて、レイヤーが変更されるたびに呼び出されるコールバック関数が幾つかあります。これはレイヤー状態を関数に渡し、読み取りや変更することができます。
|
||||
|
||||
| コールバック | 説明 |
|
||||
|-----------------------------------------------------|----------------------------------------------------------------------------------------|
|
||||
| `layer_state_set_kb(layer_state_t state)` | キーボードレベルのレイヤー関数のためのコールバック。 |
|
||||
| `layer_state_set_user(layer_state_t state)` | ユーザレベルのレイヤー関数のためのコールバック。 |
|
||||
| `default_layer_state_set_kb(layer_state_t state)` | キーボードレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 |
|
||||
| `default_layer_state_set_user(layer_state_t state)` | ユーザレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 |
|
||||
| コールバック | 説明 |
|
||||
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
||||
| `layer_state_set_kb(layer_state_t state)` | キーボードレベルのレイヤー関数のためのコールバック。 |
|
||||
| `layer_state_set_user(layer_state_t state)` | ユーザレベルのレイヤー関数のためのコールバック。 |
|
||||
| `default_layer_state_set_kb(layer_state_t state)` | キーボードレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 |
|
||||
| `default_layer_state_set_user(layer_state_t state)` | ユーザレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 |
|
||||
|
||||
?> これらのコールバックを使うための追加の情報については、[レイヤー変換コード](ja/custom_quantum_functions.md#layer-change-code)のドキュメントを調べてください。
|
||||
|
||||
| チェック関数 | 説明 |
|
||||
|-------------------------------------------|------------------------------------------------------------------------------|
|
||||
| `layer_state_cmp(cmp_layer_state, layer)` | これは `cmp_layer_state` を調べて、指定された `layer` が有効かどうかを確認します。これは、レイヤーコールバックで使うためのものです。 |
|
||||
| `layer_state_is(layer)` | これはレイヤーの状態を調べて、指定された `layer` が有効かどうかを確認します。(グローバルレイヤー状態については、`layer_state_cmp` を呼びます)。 |
|
||||
次の関数やマクロを使って、特定のレイヤーの状態を確認することもできます。
|
||||
|
||||
!> `IS_LAYER_ON(layer)` もありますが、`layer_state_cmp` 関数には、レイヤー0で正しい値を返すようにするために追加の処理があります。さもないと、レイヤー0がオンになっているかどうかを確認する時に誤った値が返されることがあります。
|
||||
| 関数 | 説明 | 別名 |
|
||||
| ------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `layer_state_is(layer)` | 指定された `layer` がグローバルに有効かどうかを確認する。 | `IS_LAYER_ON(layer)`, `IS_LAYER_OFF(layer)` |
|
||||
| `layer_state_cmp(state, layer)` | `state` を確認して指定された `layer` が有効かどうかを確認する。レイヤーのコールバックで使うことを目的とする。 | `IS_LAYER_ON_STATE(state, layer)`, `IS_LAYER_OFF_STATE(state, layer)` |
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# ポインティングデバイス :id=pointing-device
|
||||
|
||||
<!---
|
||||
original document: 0.8.182:docs/feature_pointing_device.md
|
||||
git diff 0.8.182 HEAD -- docs/feature_pointing_device.md | cat
|
||||
original document: 0.9.43:docs/feature_pointing_device.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_pointing_device.md | cat
|
||||
-->
|
||||
|
||||
ポインティングデバイスは汎用的な機能の総称です: システムポインタを移動します。マウスキーのような他のオプションも確かにありますが、これは簡単に変更可能で軽量であることを目指しています。機能を制御するためにカスタムキーを実装したり、他の周辺機器から情報を収集してここに直接挿入したりできます - QMK に処理を任せてください。
|
||||
@@ -26,7 +26,11 @@ report_mouse_t (ここでは "mouseReport") が以下のプロパティを持つ
|
||||
* `mouseReport.h` - これは、水平スクロール(+ 右へ、- 左へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。
|
||||
* `mouseReport.buttons` - これは uint8_t で、上位の5ビットを使っています。これらのビットはマウスボタンの状態を表します - ビット 3 はマウスボタン 5、ビット 7 はマウスボタン 1 です。
|
||||
|
||||
マウスレポートが送信されると、x、y、v、h のいずれの値も 0 に設定されます (これは "pointing_device_send()" で行われます。この挙動を回避するためにオーバーライドすることができます)。このように、ボタンの状態は持続しますが、動きは1度だけ起こります。さらにカスタマイズするために、`pointing_device_init` と `pointing_device_task` のどちらもオーバーライドすることができます。
|
||||
マウスレポートに必要な変更を行ったら、それを送信する必要があります:
|
||||
|
||||
* `pointing_device_send()` - マウスレポートをホストに送信し、レポートをゼロにします。
|
||||
|
||||
マウスレポートが送信されると、x、y、v、h のいずれの値も 0 に設定されます (これは `pointing_device_send()` で行われます。この挙動を回避するためにオーバーライドすることができます)。このように、ボタンの状態は持続しますが、動きは1度だけ起こります。さらにカスタマイズするために、`pointing_device_init` と `pointing_device_task` のどちらもオーバーライドすることができます。
|
||||
|
||||
以下の例では、カスタムキーを使ってマウスをクリックし垂直および水平方向に127単位スクロールし、リリースされた時にそれを全て元に戻します - なぜならこれは完全に便利な機能だからです。いいですか、以下はひとつの例です:
|
||||
|
||||
@@ -43,6 +47,7 @@ case MS_SPECIAL:
|
||||
currentReport.buttons &= ~MOUSE_BTN1;
|
||||
}
|
||||
pointing_device_set_report(currentReport);
|
||||
pointing_device_send();
|
||||
break;
|
||||
```
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# 分割キーボード
|
||||
|
||||
<!---
|
||||
original document:0.9.5:docs/feature_split_keyboard.md
|
||||
git diff 0.9.5 HEAD -- docs/feature_split_keyboard.md | cat
|
||||
original document:0.9.43:docs/feature_split_keyboard.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_split_keyboard.md | cat
|
||||
-->
|
||||
|
||||
QMK ファームウェアリポジトリの多くのキーボードは、"分割"キーボードです。それらは2つのコントローラを使います — 1つは USB に接続し、もう1つは TRRS または同様のケーブルを介してシリアルまたは I<sup>2</sup>C 接続で接続します。
|
||||
@@ -95,6 +95,24 @@ SPLIT_TRANSPORT = custom
|
||||
|
||||
これは指定されたピンを読み込みます。high の場合、コントローラはそれを左側だと仮定し、low の場合、それは右側であると仮定します。
|
||||
|
||||
#### マトリックスピンによる左右の設定
|
||||
|
||||
左右を決定するためにコントローラのキーマトリックスピンを読むようにファームウェアを設定することができます。これを行うには、以下を `config.h` ファイルに追加します:
|
||||
|
||||
```c
|
||||
#define SPLIT_HAND_MATRIX_GRID D0, F1
|
||||
```
|
||||
|
||||
最初のピンは出力ピンで、2つ目は入力ピンです。
|
||||
|
||||
キーマトリックスに未使用の交点があるキーボードがあります。この設定は、左右の決定にこれらの未使用の交点の1つを使用します。
|
||||
|
||||
通常、ダイオードが交点に接続されている場合、左側と判断されます。次の定義を追加すると、右側と判断されます。
|
||||
|
||||
```c
|
||||
#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
|
||||
```
|
||||
|
||||
#### EEPROM による左右の設定
|
||||
|
||||
このメソッドは永続ストレージ(`EEPROM`)のフラグを設定することで、キーボードの左右を設定します。これはコントローラが最初に起動する時にチェックされ、キーボードのどちら側であるかとキーボードのレイアウトの向きを決定します。
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# ユーザスペース: キーマップ間でのコードの共有
|
||||
|
||||
<!---
|
||||
original document: 0.9.0:docs/feature_userspace.md
|
||||
git diff 0.9.0 HEAD -- docs/feature_userspace.md | cat
|
||||
original document: 0.9.43:docs/feature_userspace.md
|
||||
git diff 0.9.43 HEAD -- docs/feature_userspace.md | cat
|
||||
-->
|
||||
|
||||
似たキーマップを複数のキーボードで使う場合、それらの間でコードを共有できるという利点が得られることがあります。`users/`に以下の構造でキーマップ(理想的には GitHub のユーザ名、`<name>`)と同じ名前の独自のフォルダを作成します:
|
||||
@@ -116,7 +116,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## 例
|
||||
|
||||
簡単な例については、[`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna) を調べてください。
|
||||
簡単な例については、[`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/_example) を調べてください。
|
||||
より複雑な例については、[`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna) のユーザスペースを調べてください。
|
||||
|
||||
|
||||
|
75
docs/ja/flashing_bootloadhid.md
Normal file
75
docs/ja/flashing_bootloadhid.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# BootloadHID の書き込み手順とブートローダの情報
|
||||
|
||||
<!---
|
||||
original document: 0.9.32:docs/flashing_bootloadhid.md
|
||||
git diff 0.9.32 HEAD -- docs/flashing_bootloadhid.md | cat
|
||||
-->
|
||||
|
||||
ps2avr(GB) キーボードは ATmega32A マイクロコントローラを使い、異なるブートローダを使います。それは通常の QMK の方法を使って書き込むことができません。
|
||||
|
||||
一般的な書き込みシーケンス:
|
||||
|
||||
1. 以下のいずれかの方法を使ってブートローダに入ります:
|
||||
* `RESET` キーコードをタップします (全てのデバイスでは動作しないかもしれません)
|
||||
* ソルトキーを押し続けながらキーボードを接続します (通常はキーボードの readme に書かれています)
|
||||
2. OS がデバイスを検知するのを待ちます。
|
||||
3. .hex ファイルを書き込みます
|
||||
4. デバイスをアプリケーションモードにリセットします(自動的に実行されるかもしれません)
|
||||
|
||||
## bootloadHID の書き込みターゲット
|
||||
|
||||
?> [こちら](ja/newbs_getting_started.md)で詳しく説明されている QMK インストールスクリプトを使うと、必要な bootloadHID ツールが自動的にインストールされます。
|
||||
|
||||
コマンドライン経由で書き込むには、以下のコマンドを実行してターゲット `:bootloadHID` を使います:
|
||||
|
||||
make <keyboard>:<keymap>:bootloadHID
|
||||
|
||||
## GUI 書き込み
|
||||
|
||||
### Windows
|
||||
1. [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) をダウンロードします。
|
||||
2. キーボードをリセットします。
|
||||
3. 設定された VendorID が `16c0` で、ProductID が `05df` であることを確認します
|
||||
4. `Find Device` ボタンを押し、キーボードが見つかることを確認します。
|
||||
5. `Open .hex File` ボタンを押し、作成した `.hex` ファイルを見つけます。
|
||||
6. `Flash Device` ボタンを押し、処理が完了するまで待ちます。
|
||||
|
||||
## コマンドライン書き込み
|
||||
|
||||
1. キーボードをリセットします。
|
||||
2. `bootloadHID -r` に続けて `.hex` ファイルへのパスを入力し、キーボードに書き込みます。
|
||||
|
||||
### Windows 手動インストール
|
||||
MSYS2の場合:
|
||||
1. https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz から BootloadHID ファームウェアパッケージをダウンロードします。
|
||||
2. 互換性のあるツール、例えば 7-Zip を使って内容を抽出します。
|
||||
3. 解凍された書庫から MSYS2 インストール先、通常 `C:\msys64\usr\bin` に `commandline/bootloadHID.exe` をコピーして、MSYS パスに追加します。
|
||||
|
||||
ネイティブの Windows 書き込みの場合、MSYS2 環境の外部で `bootloadHID.exe` を使うことができます。
|
||||
|
||||
### Linux 手動インストール
|
||||
1. libusb development の依存関係をインストールします:
|
||||
```bash
|
||||
# これは OS に依存します - Debian については以下で動作します
|
||||
sudo apt-get install libusb-dev
|
||||
```
|
||||
2. BootloadHID ファームウェアパッケージをダウンロードします:
|
||||
```
|
||||
wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp
|
||||
```
|
||||
3. bootloadHID 実行可能ファイルをビルドします:
|
||||
```
|
||||
cd /tmp/bootloadHID.2012-12-08/commandline/
|
||||
make
|
||||
sudo cp bootloadHID /usr/local/bin
|
||||
```
|
||||
|
||||
### MacOS 手動インストール
|
||||
1. 以下を入力して Homebrew をインストールします:
|
||||
```
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
```
|
||||
2. 以下のパッケージをインストールします:
|
||||
```
|
||||
brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
|
||||
```
|
52
docs/ja/getting_started_docker.md
Normal file
52
docs/ja/getting_started_docker.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Docker クイックスタート
|
||||
|
||||
<!---
|
||||
original document: 0.9.32:docs/getting_started_docker.md
|
||||
git diff 0.9.32 HEAD -- docs/getting_started_docker.md | cat
|
||||
-->
|
||||
|
||||
このプロジェクトは、プライマリオペレーティングシステムに大きな変更を加えることなくキーボードの新しいファームウェアを非常に簡単に構築することができる Docker ワークフローを含みます。これは、あなたがプロジェクトをクローンしビルドを実行した時に、他の人とまったく同じ環境と QMK ビルド基盤を持つことも保証します。これにより、人々はあなたが遭遇した問題の解決をより簡単に行えるようになります。
|
||||
|
||||
## 必要事項
|
||||
|
||||
主な前提条件は動作する `docker` がインストールされていることです。
|
||||
* [Docker CE](https://docs.docker.com/install/#supported-platforms)
|
||||
|
||||
## 使い方
|
||||
|
||||
(サブモジュールを含む) QMK のレポジトリのローカルコピーを取得する:
|
||||
|
||||
```bash
|
||||
git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
|
||||
cd qmk_firmware
|
||||
```
|
||||
|
||||
キーマップをビルドするために以下のコマンドを実行します:
|
||||
```bash
|
||||
util/docker_build.sh <keyboard>:<keymap>
|
||||
# 例えば: util/docker_build.sh planck/rev6:default
|
||||
```
|
||||
|
||||
これは目的のキーボード/キーマップをコンパイルし、結果として書き込み用に `.hex` あるいは `.bin` ファイルを QMK ディレクトリの中に残します。`:keymap` が省略された場合は全てのキーマップが使われます。パラメータの形式は、`make` を使ってビルドする時と同じであることに注意してください。
|
||||
|
||||
`target` を指定して Docker から直接キーボードをビルドし、_かつ_書き込むためのサポートもあります。
|
||||
|
||||
```bash
|
||||
util/docker_build.sh keyboard:keymap:target
|
||||
# 例えば: util/docker_build.sh planck/rev6:default:flash
|
||||
```
|
||||
|
||||
スクリプトをパラメータ無しで開始することもできます。この場合、1つずつビルドパラメータを入力するように求められます。これが使いやすいと思うかもしれません:
|
||||
|
||||
```bash
|
||||
util/docker_build.sh
|
||||
# パラメータを入力として読み込みます (空白にすると全てのキーボード/キーマップ)
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
### なぜ Windows/macOS 上で書き込めないのですか?
|
||||
|
||||
Windows と macOS では、実行するために [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) が必要です。これはセットアップが面倒なので、お勧めではありません: 代わりに [QMK Toolbox](https://github.com/qmk/qmk_toolbox) を使ってください。
|
||||
|
||||
!> Docker for Windows は[Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) を有効にする必要があります。これは、Windows 7、Windows 8 および **Windows 10 Home** のような Hyper-V を搭載していない Windows のバージョンでは機能しないことを意味します。
|
@@ -1,8 +1,8 @@
|
||||
# QMK で GitHub を使う方法
|
||||
|
||||
<!---
|
||||
original document: 0.8.82:docs/getting_started_github.md
|
||||
git diff 0.8.82 HEAD -- docs/getting_started_github.md | cat
|
||||
original document: 0.9.43:docs/getting_started_github.md
|
||||
git diff 0.9.43 HEAD -- docs/getting_started_github.md | cat
|
||||
-->
|
||||
|
||||
GitHub は慣れていない人には少し注意が必要です - このガイドは、QMK におけるフォーク、クローン、プルリクエストのサブミットの各ステップについて説明します。
|
||||
@@ -11,11 +11,11 @@ GitHub は慣れていない人には少し注意が必要です - このガイ
|
||||
|
||||
[QMK GitHub ページ](https://github.com/qmk/qmk_firmware)を開くと、右上に "Fork" というボタンが見えます:
|
||||
|
||||

|
||||

|
||||
|
||||
あなたが組織の一員である場合は、どのアカウントにフォークするかを選択する必要があります。ほとんどの場合、あなたの個人のアカウントにフォークしたいでしょう。フォークが完了したら(しばらく時間が掛かる場合があります)、"Clone or Download" ボタンをクリックします:
|
||||
|
||||

|
||||

|
||||
|
||||
必ず "HTTPS" を選択し、リンクを選択してコピーします:
|
||||
|
||||
|
@@ -32,7 +32,9 @@
|
||||
static uint8_t i2c_address;
|
||||
|
||||
static const I2CConfig i2cconfig = {
|
||||
#ifdef USE_I2CV1
|
||||
#if defined(USE_I2CV1_CONTRIB)
|
||||
I2C1_CLOCK_SPEED,
|
||||
#elif defined(USE_I2CV1)
|
||||
I2C1_OPMODE,
|
||||
I2C1_CLOCK_SPEED,
|
||||
I2C1_DUTY_CYCLE,
|
||||
@@ -62,8 +64,8 @@ __attribute__((weak)) void i2c_init(void) {
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
#if defined(USE_GPIOV1)
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE);
|
||||
#else
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
|
@@ -81,7 +81,14 @@
|
||||
# define I2C_DRIVER I2CD1
|
||||
#endif
|
||||
|
||||
#ifndef USE_GPIOV1
|
||||
#ifdef USE_GPIOV1
|
||||
# ifndef I2C1_SCL_PAL_MODE
|
||||
# define I2C1_SCL_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
|
||||
# endif
|
||||
# ifndef I2C1_SDA_PAL_MODE
|
||||
# define I2C1_SDA_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
|
||||
# endif
|
||||
#else
|
||||
// The default PAL alternate modes are used to signal that the pins are used for I2C
|
||||
# ifndef I2C1_SCL_PAL_MODE
|
||||
# define I2C1_SCL_PAL_MODE 4
|
||||
|
@@ -82,14 +82,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define I2C_CMD 0x00
|
||||
#define I2C_DATA 0x40
|
||||
#if defined(__AVR__)
|
||||
// already defined on ARM
|
||||
# define I2C_TIMEOUT 100
|
||||
# define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT)
|
||||
# define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT)
|
||||
#else // defined(__AVR__)
|
||||
# define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT)
|
||||
# define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT)
|
||||
#endif // defined(__AVR__)
|
||||
#define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT)
|
||||
#define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, I2C_TIMEOUT)
|
||||
#define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT)
|
||||
#define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, OLED_I2C_TIMEOUT)
|
||||
|
||||
#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
|
||||
|
||||
|
@@ -150,6 +150,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(OLED_I2C_TIMEOUT)
|
||||
# define OLED_I2C_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
// OLED Rotation enum values are flags
|
||||
typedef enum {
|
||||
OLED_ROTATION_0 = 0,
|
||||
|
16
keyboards/adelheid/adelheid.c
Normal file
16
keyboards/adelheid/adelheid.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/* Copyright 2020 floookay
|
||||
*
|
||||
* 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 "adelheid.h"
|
45
keyboards/adelheid/adelheid.h
Normal file
45
keyboards/adelheid/adelheid.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Copyright 2020 floookay
|
||||
*
|
||||
* 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( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \
|
||||
\
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k2E, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k3E, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k4E, \
|
||||
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, \
|
||||
k50, k52, k54, k55, k57, k59, k5C, k5D, k5E \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, k3E }, \
|
||||
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, KC_NO, k4D, k4E }, \
|
||||
{ k50, KC_NO, k52, KC_NO, k54, k55, KC_NO, k57, KC_NO, k59, KC_NO, KC_NO, k5C, k5D, k5E } \
|
||||
}
|
208
keyboards/adelheid/config.h
Normal file
208
keyboards/adelheid/config.h
Normal file
@@ -0,0 +1,208 @@
|
||||
/*
|
||||
Copyright 2020 floookay
|
||||
|
||||
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 0xF100
|
||||
#define PRODUCT_ID 0xAD78
|
||||
#define DEVICE_VER 0x0002
|
||||
#define MANUFACTURER floookay
|
||||
#define PRODUCT adelheid
|
||||
#define DESCRIPTION 75% alice-like keyboard based on the arisu
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 7
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
/*
|
||||
* 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, F4, D1, D2, D3, D5, F7 }
|
||||
#define MATRIX_COL_PINS { F0, F1, E6, C7, F6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN C6
|
||||
// #define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
// #define RGB_DI_PIN E2
|
||||
// #ifdef RGB_DI_PIN
|
||||
// #define RGBLED_NUM 16
|
||||
// #define RGBLIGHT_HUE_STEP 8
|
||||
// #define RGBLIGHT_SAT_STEP 8
|
||||
// #define RGBLIGHT_VAL_STEP 8
|
||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
// /*== all animations enable ==*/
|
||||
// #define RGBLIGHT_ANIMATIONS
|
||||
// /*== or choose animations ==*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHING
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
// #define RGBLIGHT_EFFECT_SNAKE
|
||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||
// #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
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP H
|
||||
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER B
|
||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* 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
|
100
keyboards/adelheid/info.json
Normal file
100
keyboards/adelheid/info.json
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"keyboard_name": "Adelheid",
|
||||
"url": "https://github.com/floookay/adelheid",
|
||||
"maintainer": "floookay",
|
||||
"width": 19.5,
|
||||
"height": 6.5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{ "label": "k00", "x": 0, "y": 0 },
|
||||
{ "label": "k01", "x": 1.25, "y": 0 },
|
||||
{ "label": "k02", "x": 2.25, "y": 0 },
|
||||
{ "label": "k03", "x": 3.5, "y": 0 },
|
||||
{ "label": "k04", "x": 4.5, "y": 0 },
|
||||
{ "label": "k05", "x": 5.75, "y": 0 },
|
||||
{ "label": "k06", "x": 6.75, "y": 0 },
|
||||
{ "label": "k07", "x": 9.75, "y": 0 },
|
||||
{ "label": "k08", "x": 10.75, "y": 0 },
|
||||
{ "label": "k09", "x": 12, "y": 0 },
|
||||
{ "label": "k0A", "x": 13, "y": 0 },
|
||||
{ "label": "k0B", "x": 14.25, "y": 0 },
|
||||
{ "label": "k0C", "x": 15.25, "y": 0 },
|
||||
{ "label": "k0D", "x": 16.5, "y": 0 },
|
||||
{ "label": "k0E", "x": 17.75, "y": 0 },
|
||||
|
||||
{ "label": "k10", "x": 0.75, "y": 1.25 },
|
||||
{ "label": "k11", "x": 1.75, "y": 1.25 },
|
||||
{ "label": "k12", "x": 2.75, "y": 1.25 },
|
||||
{ "label": "k13", "x": 4, "y": 1.25 },
|
||||
{ "label": "k14", "x": 5, "y": 1.25 },
|
||||
{ "label": "k15", "x": 6, "y": 1.25 },
|
||||
{ "label": "k16", "x": 7, "y": 1.25 },
|
||||
{ "label": "k17", "x": 9.5, "y": 1.25 },
|
||||
{ "label": "k18", "x": 10.5, "y": 1.25 },
|
||||
{ "label": "k19", "x": 11.5, "y": 1.25 },
|
||||
{ "label": "k1A", "x": 12.5, "y": 1.25 },
|
||||
{ "label": "k1B", "x": 13.75, "y": 1.25 },
|
||||
{ "label": "k1C", "x": 14.75, "y": 1.25 },
|
||||
{ "label": "k1D", "x": 15.75, "y": 1.25 },
|
||||
{ "label": "k1E", "x": 16.75, "y": 1.25 },
|
||||
{ "label": "k2E", "x": 18, "y": 1 },
|
||||
|
||||
{ "label": "k20", "x": 0.5, "y": 2.25, "w": 1.5 },
|
||||
{ "label": "k21", "x": 2, "y": 2.25 },
|
||||
{ "label": "k22", "x": 3.5, "y": 2.25 },
|
||||
{ "label": "k23", "x": 4.5, "y": 2.25 },
|
||||
{ "label": "k24", "x": 5.5, "y": 2.25 },
|
||||
{ "label": "k25", "x": 6.5, "y": 2.25 },
|
||||
{ "label": "k26", "x": 9, "y": 2.25 },
|
||||
{ "label": "k27", "x": 10, "y": 2.25 },
|
||||
{ "label": "k28", "x": 11, "y": 2.25 },
|
||||
{ "label": "k29", "x": 12, "y": 2.25 },
|
||||
{ "label": "k2A", "x": 13, "y": 2.25 },
|
||||
{ "label": "k2B", "x": 14.5, "y": 2.25 },
|
||||
{ "label": "k2C", "x": 15.5, "y": 2.25 },
|
||||
{ "label": "k2D", "x": 16.5, "y": 2.25, "w": 1.5 },
|
||||
{ "label": "k3E", "x": 18.25, "y": 2 },
|
||||
|
||||
{ "label": "k30", "x": 0.25, "y": 3.25, "w": 1.75 },
|
||||
{ "label": "k31", "x": 2, "y": 3.25 },
|
||||
{ "label": "k32", "x": 3.75, "y": 3.25 },
|
||||
{ "label": "k33", "x": 4.75, "y": 3.25 },
|
||||
{ "label": "k34", "x": 5.75, "y": 3.25 },
|
||||
{ "label": "k35", "x": 6.75, "y": 3.25 },
|
||||
{ "label": "k36", "x": 9.25, "y": 3.25 },
|
||||
{ "label": "k37", "x": 10.25, "y": 3.25 },
|
||||
{ "label": "k38", "x": 11.25, "y": 3.25 },
|
||||
{ "label": "k39", "x": 12.25, "y": 3.25 },
|
||||
{ "label": "k3A", "x": 14, "y": 3.25 },
|
||||
{ "label": "k3B", "x": 15, "y": 3.25 },
|
||||
{ "label": "k3C", "x": 16, "y": 3.25, "w": 2.25 },
|
||||
{ "label": "k4E", "x": 18.5, "y": 3 },
|
||||
|
||||
{ "label": "k40", "x": 0, "y": 4.25, "w": 2.25 },
|
||||
{ "label": "k41", "x": 2.25, "y": 4.25 },
|
||||
{ "label": "k42", "x": 4.25, "y": 4.25 },
|
||||
{ "label": "k43", "x": 5.25, "y": 4.25 },
|
||||
{ "label": "k44", "x": 6.25, "y": 4.25 },
|
||||
{ "label": "k45", "x": 7.25, "y": 4.25 },
|
||||
{ "label": "k46", "x": 9.5, "y": 4.25 },
|
||||
{ "label": "k47", "x": 10.5, "y": 4.25 },
|
||||
{ "label": "k48", "x": 11.5, "y": 4.25 },
|
||||
{ "label": "k49", "x": 12.5, "y": 4.25 },
|
||||
{ "label": "k4A", "x": 14.5, "y": 4.25 },
|
||||
{ "label": "k4B", "x": 15.5, "y": 4.25, "w": 1.75 },
|
||||
{ "label": "k4D", "x": 17.5, "y": 4.5 },
|
||||
|
||||
{ "label": "k50", "x": 0, "y": 5.25, "w": 1.5 },
|
||||
{ "label": "k52", "x": 4.25, "y": 5.25, "w": 1.5 },
|
||||
{ "label": "k54", "x": 5.75, "y": 5.25, "w": 2 },
|
||||
{ "label": "k55", "x": 7.75, "y": 5.25 },
|
||||
{ "label": "k57", "x": 9, "y": 5.25, "w": 2.75 },
|
||||
{ "label": "k59", "x": 11.75, "y": 5.25, "w": 1.5 },
|
||||
{ "label": "k5C", "x": 16.5, "y": 5.5 },
|
||||
{ "label": "k5D", "x": 17.5, "y": 5.5 },
|
||||
{ "label": "k5E", "x": 18.5, "y": 5.5 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
45
keyboards/adelheid/keymaps/default/keymap.c
Normal file
45
keyboards/adelheid/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Copyright 2020 floookay
|
||||
*
|
||||
* 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 adelheid_layers {
|
||||
_BASE,
|
||||
_SECONDARY
|
||||
};
|
||||
|
||||
#define MO_SEC MO(_SECONDARY)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PGUP,
|
||||
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_HOME,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_END,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||
KC_LCTL, KC_LALT, KC_SPC, MO_SEC, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_SECONDARY] = LAYOUT(
|
||||
KC_SLEP, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PSCR, KC_VOLU,
|
||||
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_INS, BL_STEP,
|
||||
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_DEL, KC_MUTE,
|
||||
KC_LGUI, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, KC_VOLD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY,
|
||||
_______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MNXT
|
||||
)
|
||||
};
|
9
keyboards/adelheid/keymaps/default/readme.md
Normal file
9
keyboards/adelheid/keymaps/default/readme.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Default keymap for the Adelheid
|
||||
|
||||
- ANSI QWERTY
|
||||
- split backspace
|
||||
- ctrl instead of caps lock
|
||||
- lgui on fn+caps
|
||||
|
||||

|
||||
View in [Keyboard-Layout-Editor](http://www.keyboard-layout-editor.com/#/gists/4262535adb5ac81a913edbebc4de8226).
|
76
keyboards/adelheid/keymaps/floookay/keymap.c
Normal file
76
keyboards/adelheid/keymaps/floookay/keymap.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/* Copyright 2020 floookay
|
||||
*
|
||||
* 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 adelheid_layers {
|
||||
_BASE,
|
||||
_SECONDARY
|
||||
};
|
||||
|
||||
// tap dance declarations
|
||||
enum {
|
||||
_TD_CTGU = 0,
|
||||
_TD_PGUP = 1,
|
||||
_TD_PGDN = 2,
|
||||
_TD_HOME = 3,
|
||||
_TD_END = 4,
|
||||
_TD_RSHC = 5,
|
||||
_TD_PSCR = 6
|
||||
};
|
||||
|
||||
#define MO_SEC MO(_SECONDARY)
|
||||
#define TD_CTGU TD(_TD_CTGU)
|
||||
#define TD_PGUP TD(_TD_PGUP)
|
||||
#define TD_PGDN TD(_TD_PGDN)
|
||||
#define TD_HOME TD(_TD_HOME)
|
||||
#define TD_END TD(_TD_END)
|
||||
#define TD_RSHC TD(_TD_RSHC)
|
||||
#define TD_PSCR TD(_TD_PSCR)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, TD_PGUP,
|
||||
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, TD_HOME,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, TD_END,
|
||||
TD_CTGU, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, TD_PGDN,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||
KC_LCTL, KC_LALT, KC_SPC, MO_SEC, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_SECONDARY] = LAYOUT(
|
||||
KC_SLEP, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, TD_PSCR, KC_VOLU,
|
||||
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_INS, BL_STEP,
|
||||
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_DEL, KC_MUTE,
|
||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, KC_VOLD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TD_RSHC, KC_MPLY,
|
||||
_______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MNXT
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
// Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// Tap once for first parameter, twice for second
|
||||
[_TD_CTGU] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_LGUI),
|
||||
[_TD_PGUP] = ACTION_TAP_DANCE_DOUBLE(KC_PGUP, LCTL(KC_PGUP)),
|
||||
[_TD_PGDN] = ACTION_TAP_DANCE_DOUBLE(KC_PGDN, LCTL(KC_PGDN)),
|
||||
[_TD_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, LCTL(KC_HOME)),
|
||||
[_TD_END] = ACTION_TAP_DANCE_DOUBLE(KC_END, LCTL(KC_END)),
|
||||
[_TD_RSHC] = ACTION_TAP_DANCE_DOUBLE(KC_RSFT, KC_CAPS),
|
||||
[_TD_PSCR] = ACTION_TAP_DANCE_DOUBLE(KC_PSCR, LSFT(LGUI(KC_S))) // screenshot tool tap dance
|
||||
};
|
9
keyboards/adelheid/keymaps/floookay/readme.md
Normal file
9
keyboards/adelheid/keymaps/floookay/readme.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# The default keymap for the Adelheid
|
||||
|
||||
- ANSI QWERTY
|
||||
- split backspace
|
||||
- ctrl on caps lock with super on tap dance
|
||||
- caps lock on fn + right shift tap dance
|
||||
|
||||

|
||||
View in [Keyboard-Layout-Editor](http://www.keyboard-layout-editor.com/#/gists/4262535adb5ac81a913edbebc4de8226).
|
1
keyboards/adelheid/keymaps/floookay/rules.mk
Normal file
1
keyboards/adelheid/keymaps/floookay/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
TAP_DANCE_ENABLE = yes
|
15
keyboards/adelheid/readme.md
Normal file
15
keyboards/adelheid/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 𝔄𝔡𝔢𝔩𝔥𝔢𝔦𝔡
|
||||
|
||||

|
||||
|
||||
The Adelheid is a 75% Alice-like keyboard. It's a fork of the [Arisu](https://github.com/FateNozomi/arisu-pcb) by FateNozomi and is open-source as well.
|
||||
|
||||
* Keyboard Maintainer: [floookay](https://github.com/floookay)
|
||||
* Hardware Supported: Adelheid PCB [Rev2.0]
|
||||
* Hardware Availability: [PCB-, case- & wrist rest files](https://github.com/floookay/adelheid)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make adelheid: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).
|
22
keyboards/adelheid/rules.mk
Normal file
22
keyboards/adelheid/rules.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
198
keyboards/craftwalk/config.h
Normal file
198
keyboards/craftwalk/config.h
Normal file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
Copyright 2020 sotoba
|
||||
|
||||
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 0x2E8F
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER sotoba
|
||||
#define PRODUCT craftwalk
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 3
|
||||
#define MATRIX_COLS 7
|
||||
|
||||
/*
|
||||
* 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 { F6, B3, B5 }
|
||||
#define MATRIX_COL_PINS { B1, F7, F5, F4, B2, E6, B4 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define RGB_DI_PIN D3
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 19
|
||||
#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
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
17
keyboards/craftwalk/craftwalk.c
Normal file
17
keyboards/craftwalk/craftwalk.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Copyright 2020 sotoba
|
||||
*
|
||||
* 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 "craftwalk.h"
|
38
keyboards/craftwalk/craftwalk.h
Normal file
38
keyboards/craftwalk/craftwalk.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/* Copyright 2020 sotoba
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This is a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, k23, k24, k25, k26 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_NO, k00, k01, k02, KC_NO, KC_NO, KC_NO }, \
|
||||
{ k10, k11, k12, k13, KC_NO, KC_NO, KC_NO }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26 } \
|
||||
}
|
27
keyboards/craftwalk/info.json
Normal file
27
keyboards/craftwalk/info.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"keyboard_name": "craftwalk",
|
||||
"url": "https://github.com/sotoba/craftwalk",
|
||||
"maintainer": "sotoba",
|
||||
"width": 7.25,
|
||||
"height": 4.5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"Q", "x":1.25, "y":0.25},
|
||||
{"label":"W", "x":2.25, "y":0},
|
||||
{"label":"E", "x":3.25, "y":0.25},
|
||||
{"label":"Ctrl", "x":0, "y":1},
|
||||
{"label":"A", "x":1.25, "y":1.25},
|
||||
{"label":"S", "x":2.25, "y":1},
|
||||
{"label":"D", "x":3.25, "y":1.25},
|
||||
{"label":"Shift", "x":0, "y":2},
|
||||
{"label":"Adjust", "x":1.25, "y":2.25},
|
||||
{"label":"Mouse", "x":2.25, "y":2},
|
||||
{"label":"Mouse", "x":3.25, "y":2.25},
|
||||
{"label":"F", "x":4.25, "y":2},
|
||||
{"label":"Num", "x":5.25, "y":3, "h":1.5},
|
||||
{"label":"Space", "x":6.25, "y":3, "h":1.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
47
keyboards/craftwalk/keymaps/default/keymap.c
Normal file
47
keyboards/craftwalk/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Copyright 2020 sotoba
|
||||
*
|
||||
* 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,
|
||||
_NUM,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
#define KC_NUM MO(_NUM)
|
||||
#define KC_ADJ MO(_ADJUST)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Base */
|
||||
[_BASE] = LAYOUT(
|
||||
KC_Q, KC_W, KC_E,
|
||||
KC_LCTL, KC_A, KC_S, KC_D,
|
||||
KC_LSFT, KC_ADJ, KC_WH_U, KC_WH_D, KC_F, KC_NUM, KC_SPC
|
||||
),
|
||||
/* Number */
|
||||
[_NUM] = LAYOUT(
|
||||
KC_1, KC_2, KC_3,
|
||||
KC_TRNS, KC_4, KC_5, KC_6,
|
||||
KC_TRNS, KC_7, KC_8, KC_9, KC_F3, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Adjust */
|
||||
[_ADJUST] = LAYOUT(
|
||||
RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
RESET, RGB_HUD, RGB_SAD, RGB_VAD,
|
||||
RGB_M_T, KC_TRNS, RGB_MOD, RGB_RMOD,RGB_TOG, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
1
keyboards/craftwalk/keymaps/default/readme.md
Normal file
1
keyboards/craftwalk/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for craftwalk
|
15
keyboards/craftwalk/readme.md
Normal file
15
keyboards/craftwalk/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# craftWalk
|
||||
|
||||
<img src="https://github.com/sotoba/craftwalk/blob/images/craftwalk_main.jpg" width="640">
|
||||
|
||||
A macro pad for (mine)crafters.
|
||||
|
||||
* Keyboard Maintainer: [sotoba](https://github.com/sotoba)
|
||||
* Hardware Supported: The craftWalk PCBs, Pro Micro supported
|
||||
* Hardware Availability: [BOOTH: stupa-devices](https://stupa-devices.booth.pm/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make craftwalk: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).
|
22
keyboards/craftwalk/rules.mk
Normal file
22
keyboards/craftwalk/rules.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee */
|
||||
[LAYER_ADJUST] = LAYOUT(
|
||||
_______, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______,
|
||||
_______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______,
|
||||
_______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPI, _______,
|
||||
_______, _______, _______, KC_MUTE, _______, _______, RGB_HUI, RGB_SAD, RGB_SAI, RGB_HUD, RGB_SPD, _______,
|
||||
_______, _______, _______, RGB_TOG, _______, _______
|
||||
|
@@ -113,7 +113,7 @@ be a better place to put them.
|
||||
|
||||
## Adjust layer
|
||||
|
||||

|
||||

|
||||
|
||||
([KLE](http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee))
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||

|
||||
|
||||
A customizable 60% keyboard.
|
||||
A customizable 80% keyboard.
|
||||
|
||||
* Keyboard Maintainer: [aHolland909](https://github.com/aholland909)
|
||||
* Hardware Supported: CU80
|
||||
|
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define VENDOR_ID 0x4453 // DS for Doyu Studios
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Shopkey by Doyu Studio
|
||||
|
@@ -1,11 +1,4 @@
|
||||
#include "do60.h"
|
||||
#include "led.h"
|
||||
|
||||
//extern inline void do60_caps_led_on(void);
|
||||
//extern inline void do60_bl_led_on(void);
|
||||
|
||||
//extern inline void do60_caps_led_off(void);
|
||||
//extern inline void do60_bl_led_off(void);
|
||||
|
||||
extern inline void setdefaultrgb(void);
|
||||
|
||||
@@ -18,33 +11,17 @@ void matrix_init_kb(void) {
|
||||
setdefaultrgb();
|
||||
};
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// Looping keyboard code goes here
|
||||
// This runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
};
|
||||
|
||||
void led_init_ports(void) {
|
||||
// Set caps lock LED pin as output
|
||||
DDRB |= (1 << 2);
|
||||
setPinOutput(B2);
|
||||
// Default to off
|
||||
PORTB |= (1 << 2);
|
||||
writePinHigh(B2);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
//if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// do60_caps_led_on();
|
||||
//} else {
|
||||
// do60_caps_led_off();
|
||||
//}
|
||||
bool led_update_kb(led_t led_state) {
|
||||
if(led_update_user(led_state)) {
|
||||
writePin(B2, !led_state.caps_lock);
|
||||
}
|
||||
|
||||
//led_set_user(usb_led);
|
||||
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// Turn capslock on
|
||||
PORTB &= ~(1<<2);
|
||||
} else {
|
||||
// Turn capslock off
|
||||
PORTB |= (1<<2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -1,8 +1,6 @@
|
||||
#ifndef DO60_H
|
||||
#define DO60_H
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
#include "led.h"
|
||||
|
||||
/* DO60 LEDs
|
||||
* GPIO pads
|
||||
@@ -94,4 +92,3 @@ inline void setdefaultrgb(void){ rgblight_sethsv(100,100,100); }
|
||||
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
|
||||
{ K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, K47, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \
|
||||
}
|
||||
#endif
|
||||
|
@@ -19,8 +19,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END),
|
||||
|
||||
};
|
||||
|
||||
// Loop
|
||||
void matrix_scan_user(void) {
|
||||
// Empty
|
||||
};
|
||||
|
35
keyboards/do60/keymaps/via/keymap.c
Normal file
35
keyboards/do60/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,35 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// 0: Base Layer
|
||||
[0] = LAYOUT_all(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
|
||||
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_SLSH, KC_UP, KC_SLSH, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_BSPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
// 1: Function Layer
|
||||
[1] = LAYOUT_all(
|
||||
RESET, 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_NO, KC_NO, \
|
||||
KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_TOGG,BL_ON, BL_INC, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \
|
||||
KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, BL_STEP,BL_OFF, BL_DEC, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \
|
||||
KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP, KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO , KC_PGUP, KC_INS, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END),
|
||||
|
||||
[2] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
|
||||
|
||||
[3] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
|
||||
|
||||
};
|
5
keyboards/do60/keymaps/via/readme.md
Normal file
5
keyboards/do60/keymaps/via/readme.md
Normal file
@@ -0,0 +1,5 @@
|
||||

|
||||
|
||||
All of the keys which CAN have a function should be assigned one.
|
||||
|
||||
The keys with KC_NO cannot be assigned a value
|
2
keyboards/do60/keymaps/via/rules.mk
Normal file
2
keyboards/do60/keymaps/via/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
@@ -92,7 +92,6 @@ led_config_t g_led_config = {
|
||||
1, 1, 1, 1, 1, 4, 1, 1, 1
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
@@ -110,3 +109,4 @@ void rgb_matrix_indicators_user(void) {
|
||||
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -90,7 +90,6 @@ led_config_t g_led_config = {
|
||||
1, 1, 1, 1, 4, 1, 1, 1
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
@@ -108,3 +107,4 @@ void rgb_matrix_indicators_user(void) {
|
||||
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -91,7 +91,6 @@ led_config_t g_led_config = {
|
||||
1, 1, 1, 4, 1, 1, 1
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
@@ -109,3 +108,4 @@ void rgb_matrix_indicators_user(void) {
|
||||
rgb_matrix_set_color(41, 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -97,7 +97,6 @@ led_config_t g_led_config = {
|
||||
1, 1, 1, 4, 1, 1, 1, 1, 1, 1
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
@@ -115,3 +114,4 @@ void rgb_matrix_indicators_user(void) {
|
||||
rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -21,9 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x3060
|
||||
#define PRODUCT_ID 0x3435
|
||||
#define DEVICE_VER 0x0001
|
||||
|
||||
#define MANUFACTURER tshort
|
||||
#define DESCRIPTION A split keyboard for the cheap makers
|
||||
|
||||
|
@@ -21,10 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x3060
|
||||
#define PRODUCT_ID 0x3436
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER tshort
|
||||
#define DESCRIPTION A split keyboard for the cheap makers
|
||||
|
||||
/* key matrix size */
|
||||
|
@@ -20,7 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
|
||||
#define PRODUCT_ID 0x3536
|
||||
#define DEVICE_VER 0x0001
|
||||
#define PRODUCT Dactyl-Manuform (5x6)
|
||||
|
||||
/* key matrix size */
|
||||
|
@@ -6,8 +6,8 @@
|
||||
#ifdef USE_I2C
|
||||
#include <stddef.h>
|
||||
#ifdef __AVR__
|
||||
#include <avR/io.h>
|
||||
#include <avR/inteRRupt.h>
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@@ -20,8 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
|
||||
#define PRODUCT Dactyl-Manuform (Ergodox)
|
||||
#define PRODUCT_ID 0x3537
|
||||
#define DEVICE_VER 0x0001
|
||||
#define PRODUCT Dactyl-Manuform (5x7)
|
||||
|
||||
/* key matrix size */
|
||||
// Rows are doubled-up
|
||||
|
27
keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h
Normal file
27
keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#define USE_SERIAL
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
//#define EE_HANDS
|
||||
// Rows are doubled-up
|
123
keyboards/handwired/dactyl_manuform/5x7/keymaps/via/keymap.c
Normal file
123
keyboards/handwired/dactyl_manuform/5x7/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,123 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _FN 1
|
||||
#define _NUMPAD 2
|
||||
#define _BLANK 3
|
||||
|
||||
// Some basic macros
|
||||
#define TASK LCTL(LSFT(KC_ESC))
|
||||
#define TAB_R LCTL(KC_TAB)
|
||||
#define TAB_L LCTL(LSFT(KC_TAB))
|
||||
#define TAB_RO LCTL(LSFT(KC_T))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT_5x7(
|
||||
// left hand
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, TAB_RO,
|
||||
OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B,
|
||||
KC_CAPS, KC_LGUI, TAB_L, TAB_R,
|
||||
TT(_FN), KC_SPC,
|
||||
KC_END, KC_HOME,
|
||||
KC_PSCR, TASK,
|
||||
// right hand
|
||||
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV,
|
||||
KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
TG(_NUMPAD), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT),
|
||||
KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,
|
||||
KC_BSPC, KC_ENT,
|
||||
KC_PGUP, KC_PGDN,
|
||||
KC_LCTL, KC_LALT),
|
||||
|
||||
[_FN] = LAYOUT_5x7(
|
||||
// left hand
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
_______, _______, _______, KC_UP, _______, _______, _______,
|
||||
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RESET,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
// right hand
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
KC_DEL, _______,
|
||||
_______, _______,
|
||||
_______, _______),
|
||||
|
||||
[_NUMPAD] = LAYOUT_5x7(
|
||||
// left hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
// right hand
|
||||
_______, _______, KC_NLCK, _______, KC_PMNS, KC_PPLS, _______,
|
||||
_______, _______, KC_P7, KC_P8, KC_P9, _______, _______,
|
||||
_______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______,
|
||||
_______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______,
|
||||
KC_P0, KC_PDOT, _______, _______,
|
||||
_______, KC_PENT,
|
||||
_______, _______,
|
||||
_______, _______),
|
||||
|
||||
|
||||
[_NUMPAD] = LAYOUT_5x7(
|
||||
// left hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
// right hand
|
||||
_______, _______, KC_NLCK, _______, KC_PMNS, KC_PPLS, _______,
|
||||
_______, _______, KC_P7, KC_P8, KC_P9, _______, _______,
|
||||
_______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______,
|
||||
_______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______,
|
||||
KC_P0, KC_PDOT, _______, _______,
|
||||
_______, KC_PENT,
|
||||
_______, _______,
|
||||
_______, _______),
|
||||
|
||||
[_BLANK] = LAYOUT_5x7(
|
||||
// left hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______,
|
||||
_______, _______),
|
||||
|
||||
|
||||
};
|
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
@@ -20,7 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
|
||||
#define PRODUCT_ID 0x3636
|
||||
#define DEVICE_VER 0x0001
|
||||
#define PRODUCT Dactyl-Manuform (6x6)
|
||||
|
||||
/* key matrix size */
|
||||
|
@@ -21,9 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x3060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define VENDOR_ID 0x444D
|
||||
#define MANUFACTURER tshort
|
||||
// defined in subfolder
|
||||
#define DESCRIPTION A split keyboard for the cheap makers
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define PRODUCT_ID 0x3632
|
||||
#define DEVICE_VER 0x0001
|
||||
#define PRODUCT DMOTE (62-key)
|
||||
#define MATRIX_ROWS 12
|
||||
#define MATRIX_COLS 6
|
||||
|
60
keyboards/handwired/ferris/config.h
Normal file
60
keyboards/handwired/ferris/config.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
Copyright 2020 Pierre Chevalier <pierrechevalier83@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xC2AB
|
||||
#define PRODUCT_ID 0x0000
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Pierre
|
||||
#define PRODUCT Ferris the keeb
|
||||
#define DESCRIPTION A minimalistic 34 - keys split keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 10
|
||||
|
||||
#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
|
||||
#define MATRIX_COLS_PER_SIDE (MATRIX_COLS / 2)
|
||||
|
||||
#define UNUSED_MCU 14
|
||||
#define UNUSED_MCP 7
|
||||
|
||||
// wiring
|
||||
#define MATRIX_ROW_PINS_MCU \
|
||||
{ B3, B2, B1, F0 }
|
||||
#define MATRIX_COL_PINS_MCU \
|
||||
{ D6, D7, B4, B5, B6 }
|
||||
#define UNUSED_PINS_MCU \
|
||||
{ B0, B7, C6, C7, D2, D3, D4, D5, E6, F1, F4, F5, F6, F7 }
|
||||
#define MATRIX_ROW_PINS_MCP \
|
||||
{ B0, B1, B2, B3 }
|
||||
#define MATRIX_COL_PINS_MCP \
|
||||
{ A0, A1, A2, A3, A4 }
|
||||
#define UNUSED_PINS_MCP \
|
||||
{ B4, B5, B6, B7, A5, A6, A7 }
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
17
keyboards/handwired/ferris/ferris.c
Normal file
17
keyboards/handwired/ferris/ferris.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020 Pierre Chevalier <pierrechevalier83@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "ferris.h"
|
43
keyboards/handwired/ferris/ferris.h
Normal file
43
keyboards/handwired/ferris/ferris.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
Copyright 2020 Pierre Chevalier <pierrechevalier83@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
|
||||
/* left hand right hand */
|
||||
#define LAYOUT(\
|
||||
K0_0, K0_1, K0_2, K0_3, K0_4, K0_5, K0_6, K0_7, K0_8, K0_9,\
|
||||
K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9,\
|
||||
K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9,\
|
||||
K3_3, K3_4, K3_5, K3_6)\
|
||||
/* matrix positions */\
|
||||
{\
|
||||
{K0_0, K0_1, K0_2, K0_3, K0_4},\
|
||||
{K1_0, K1_1, K1_2, K1_3, K1_4},\
|
||||
{K2_0, K2_1, K2_2, K2_3, K2_4},\
|
||||
{KC_NO, KC_NO, KC_NO, K3_3, K3_4},\
|
||||
\
|
||||
{K0_5, K0_6, K0_7, K0_8, K0_9},\
|
||||
{K1_5, K1_6, K1_7, K1_8, K1_9},\
|
||||
{K2_5, K2_6, K2_7, K2_8, K2_9},\
|
||||
{K3_5, K3_6, KC_NO, KC_NO, KC_NO}\
|
||||
}
|
||||
|
||||
// clang-format on
|
54
keyboards/handwired/ferris/info.json
Normal file
54
keyboards/handwired/ferris/info.json
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"keyboard_name": "Ferris",
|
||||
"url": "https://github.com/pierrechevalier83/ferris/",
|
||||
"maintainer": "@pierrec83",
|
||||
"width": 12,
|
||||
"height": 4.75,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x": 0, "y": 0.93},
|
||||
{"x": 1, "y": 0.31},
|
||||
{"x": 2, "y": 0},
|
||||
{"x": 3, "y": 0.28},
|
||||
{"x": 4, "y": 0.42},
|
||||
|
||||
{"x": 7, "y": 0.42},
|
||||
{"x": 8, "y": 0.28},
|
||||
{"x": 9, "y": 0},
|
||||
{"x": 10, "y": 0.31},
|
||||
{"x": 11, "y": 0.93},
|
||||
|
||||
{"x": 0, "y": 1.93},
|
||||
{"x": 1, "y": 1.31},
|
||||
{"x": 2, "y": 1},
|
||||
{"x": 3, "y": 1.28},
|
||||
{"x": 4, "y": 1.42},
|
||||
|
||||
{"x": 7, "y": 1.42},
|
||||
{"x": 8, "y": 1.28},
|
||||
{"x": 9, "y": 1},
|
||||
{"x": 10, "y": 1.31},
|
||||
{"x": 11, "y": 1.93},
|
||||
|
||||
{"x": 0, "y": 2.93},
|
||||
{"x": 1, "y": 2.31},
|
||||
{"x": 2, "y": 2},
|
||||
{"x": 3, "y": 2.28},
|
||||
{"x": 4, "y": 2.42},
|
||||
|
||||
{"x": 7, "y": 2.42},
|
||||
{"x": 8, "y": 2.28},
|
||||
{"x": 9, "y": 2},
|
||||
{"x": 10, "y": 2.31},
|
||||
{"x": 11, "y": 2.93},
|
||||
|
||||
{"x": 3.5, "y": 3.75},
|
||||
{"x": 4.5, "y": 4},
|
||||
|
||||
{"x": 6.5, "y": 4},
|
||||
{"x": 7.5, "y": 3.75}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
39
keyboards/handwired/ferris/keymaps/default/config.h
Normal file
39
keyboards/handwired/ferris/keymaps/default/config.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright 2020 Pierre Chevalier <pierrechevalier83@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
// Set the mouse settings to a comfortable speed/accuracy trade-off,
|
||||
// assuming a screen refresh rate of 60 Htz or higher
|
||||
// The default is 50. This makes the mouse ~3 times faster and more accurate
|
||||
#define MOUSEKEY_INTERVAL 16
|
||||
// The default is 20. Since we made the mouse about 3 times faster with the previous setting,
|
||||
// give it more time to accelerate to max speed to retain precise control over short distances.
|
||||
#define MOUSEKEY_TIME_TO_MAX 40
|
||||
// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive
|
||||
#define MOUSEKEY_DELAY 100
|
||||
// It makes sense to use the same delay for the mouseweel
|
||||
#define MOUSEKEY_WHEEL_DELAY 100
|
||||
// The default is 100
|
||||
#define MOUSEKEY_WHEEL_INTERVAL 50
|
||||
// The default is 40
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 100
|
||||
|
||||
// Pick good defaults for enabling homerow modifiers
|
||||
#define TAPPING_TERM 200
|
||||
#define PERMISSIVE_HOLD
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#define TAPPING_FORCE_HOLD
|
39
keyboards/handwired/ferris/keymaps/default/keymap.c
Normal file
39
keyboards/handwired/ferris/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright 2020 Pierre Chevalier <pierrechevalier83@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Blank template at the bottom
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Qwerty
|
||||
*
|
||||
* ,-----------------------------. ,-----------------------------.
|
||||
* | Q | W | E | R | T | | Y | U | I | O | P |
|
||||
* |-----+-----+-----+-----+-----| |-----------------------------|
|
||||
* | A | S | D | F | G | | H | J | K | L | ; |
|
||||
* |-----+-----+-----+-----+-----+ |-----------------------------|
|
||||
* | Z | X | C | V | B | | N | M | < | > | ? |
|
||||
* `-----+-----+-----+-----+-----+--. ,-+-----------------------------'
|
||||
* | BSPC | SPC | | SPC | ENT |
|
||||
* '------------' '-----------'
|
||||
*/
|
||||
[0] = LAYOUT(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||
KC_BSPC, KC_SPC, KC_SPC, KC_ENT)
|
||||
};
|
282
keyboards/handwired/ferris/matrix.c
Normal file
282
keyboards/handwired/ferris/matrix.c
Normal file
@@ -0,0 +1,282 @@
|
||||
/*
|
||||
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
|
||||
2020 Pierre Chevalier <pierrechevalier83@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code was heavily inspired by the ergodox_ez keymap, and modernized
|
||||
* to take advantage of the quantum.h microcontroller agnostics gpio control
|
||||
* abstractions and use the macros defined in config.h for the wiring as opposed
|
||||
* to repeating that information all over the place.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "i2c_master.h"
|
||||
|
||||
extern i2c_status_t mcp23017_status;
|
||||
#define I2C_TIMEOUT 1000
|
||||
|
||||
// For a better understanding of the i2c protocol, this is a good read:
|
||||
// https://www.robot-electronics.co.uk/i2c-tutorial
|
||||
|
||||
// I2C address:
|
||||
// See the datasheet, section 3.3.1 on addressing I2C devices and figure 3-6 for an
|
||||
// illustration
|
||||
// http://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf
|
||||
// All address pins of the mcp23017 are connected to the ground on the ferris
|
||||
// | 0 | 1 | 0 | 0 | A2 | A1 | A0 |
|
||||
// | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
||||
#define I2C_ADDR 0b0100000
|
||||
#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE)
|
||||
#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ)
|
||||
|
||||
// Register addresses
|
||||
// See https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library/blob/master/Adafruit_MCP23017.h
|
||||
#define IODIRA 0x00 // i/o direction register
|
||||
#define IODIRB 0x01
|
||||
#define GPPUA 0x0C // GPIO pull-up resistor register
|
||||
#define GPPUB 0x0D
|
||||
#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
|
||||
#define GPIOB 0x13
|
||||
#define OLATA 0x14 // output latch register
|
||||
#define OLATB 0x15
|
||||
|
||||
bool i2c_initialized = 0;
|
||||
i2c_status_t mcp23017_status = I2C_ADDR;
|
||||
|
||||
uint8_t init_mcp23017(void) {
|
||||
print("starting init");
|
||||
mcp23017_status = I2C_ADDR;
|
||||
|
||||
// I2C subsystem
|
||||
if (i2c_initialized == 0) {
|
||||
i2c_init(); // on pins D(1,0)
|
||||
i2c_initialized = true;
|
||||
wait_ms(I2C_TIMEOUT);
|
||||
}
|
||||
|
||||
// set pin direction
|
||||
// - unused : input : 1
|
||||
// - input : input : 1
|
||||
// - driving : output : 0
|
||||
mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
mcp23017_status = i2c_write(IODIRA, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
// This means: we will read all the bits on GPIOA
|
||||
mcp23017_status = i2c_write(0b11111111, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
// This means: we will write to the pins 0-4 on GPIOB (in select_rows)
|
||||
mcp23017_status = i2c_write(0b11110000, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
i2c_stop();
|
||||
|
||||
// set pull-up
|
||||
// - unused : on : 1
|
||||
// - input : on : 1
|
||||
// - driving : off : 0
|
||||
mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
mcp23017_status = i2c_write(GPPUA, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
// This means: we will read all the bits on GPIOA
|
||||
mcp23017_status = i2c_write(0b11111111, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
// This means: we will write to the pins 0-4 on GPIOB (in select_rows)
|
||||
mcp23017_status = i2c_write(0b11110000, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
|
||||
out:
|
||||
i2c_stop();
|
||||
return mcp23017_status;
|
||||
}
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
||||
|
||||
static matrix_row_t read_cols(uint8_t row);
|
||||
static void init_cols(void);
|
||||
static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
|
||||
static uint8_t mcp23017_reset_loop;
|
||||
|
||||
void matrix_init_custom(void) {
|
||||
// initialize row and col
|
||||
|
||||
mcp23017_status = init_mcp23017();
|
||||
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_power_up(void) {
|
||||
mcp23017_status = init_mcp23017();
|
||||
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Reads and stores a row, returning
|
||||
// whether a change occurred.
|
||||
static inline bool store_matrix_row(matrix_row_t current_matrix[], uint8_t index) {
|
||||
matrix_row_t temp = read_cols(index);
|
||||
if (current_matrix[index] != temp) {
|
||||
current_matrix[index] = temp;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||
if (mcp23017_status) { // if there was an error
|
||||
if (++mcp23017_reset_loop == 0) {
|
||||
// if (++mcp23017_reset_loop >= 1300) {
|
||||
// since mcp23017_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
|
||||
// this will be approx bit more frequent than once per second
|
||||
dprint("trying to reset mcp23017\n");
|
||||
mcp23017_status = init_mcp23017();
|
||||
if (mcp23017_status) {
|
||||
dprint("right side not responding\n");
|
||||
} else {
|
||||
dprint("right side attached\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool changed = false;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
||||
// select rows from left and right hands
|
||||
uint8_t left_index = i;
|
||||
uint8_t right_index = i + MATRIX_ROWS_PER_SIDE;
|
||||
select_row(left_index);
|
||||
select_row(right_index);
|
||||
|
||||
// we don't need a 30us delay anymore, because selecting a
|
||||
// left-hand row requires more than 30us for i2c.
|
||||
|
||||
changed |= store_matrix_row(current_matrix, left_index);
|
||||
changed |= store_matrix_row(current_matrix, right_index);
|
||||
|
||||
unselect_rows();
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
static void init_cols(void) {
|
||||
// init on mcp23017
|
||||
// not needed, already done as part of init_mcp23017()
|
||||
|
||||
// init on mcu
|
||||
pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_MCU;
|
||||
for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) {
|
||||
pin_t pin = matrix_col_pins_mcu[pin_index];
|
||||
setPinInput(pin);
|
||||
writePinHigh(pin);
|
||||
}
|
||||
}
|
||||
|
||||
static matrix_row_t read_cols(uint8_t row) {
|
||||
if (row < MATRIX_ROWS_PER_SIDE) {
|
||||
pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_MCU;
|
||||
matrix_row_t current_row_value = 0;
|
||||
// For each col...
|
||||
for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) {
|
||||
// Select the col pin to read (active low)
|
||||
uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]);
|
||||
|
||||
// Populate the matrix row with the state of the col pin
|
||||
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
|
||||
}
|
||||
return current_row_value;
|
||||
} else {
|
||||
if (mcp23017_status) { // if there was an error
|
||||
return 0;
|
||||
} else {
|
||||
uint8_t data = 0;
|
||||
mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
mcp23017_status = i2c_write(GPIOA, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
mcp23017_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
mcp23017_status = i2c_read_nack(I2C_TIMEOUT);
|
||||
if (mcp23017_status < 0) goto out;
|
||||
// We read all the pins on GPIOA.
|
||||
// The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero.
|
||||
// The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys.
|
||||
// Since the pins connected to eact columns are sequential, and counting from zero up (col 5 -> GPIOA0, col 6 -> GPIOA1 and so on), the only transformation needed is a bitwise not to swap all zeroes and ones.
|
||||
data = ~((uint8_t)mcp23017_status);
|
||||
mcp23017_status = I2C_STATUS_SUCCESS;
|
||||
out:
|
||||
i2c_stop();
|
||||
// return reverse_bits(data, MATRIX_COLS_PER_SIDE);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void unselect_rows(void) {
|
||||
// no need to unselect on mcp23017, because the select step sets all
|
||||
// the other row bits high, and it's not changing to a different
|
||||
// direction
|
||||
|
||||
// unselect rows on microcontroller
|
||||
pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU;
|
||||
for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) {
|
||||
pin_t pin = matrix_row_pins_mcu[pin_index];
|
||||
setPinInput(pin);
|
||||
writePinLow(pin);
|
||||
}
|
||||
}
|
||||
|
||||
static void select_row(uint8_t row) {
|
||||
if (row < MATRIX_ROWS_PER_SIDE) {
|
||||
// select on atmega32u4
|
||||
pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU;
|
||||
pin_t pin = matrix_row_pins_mcu[row];
|
||||
setPinOutput(pin);
|
||||
writePinLow(pin);
|
||||
} else {
|
||||
// select on mcp23017
|
||||
if (mcp23017_status) { // if there was an error
|
||||
// do nothing
|
||||
} else {
|
||||
mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
mcp23017_status = i2c_write(GPIOB, I2C_TIMEOUT);
|
||||
if (mcp23017_status) goto out;
|
||||
// Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one.
|
||||
// Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus.
|
||||
mcp23017_status = i2c_write(0xFF & ~(1 << (row - MATRIX_ROWS_PER_SIDE)), I2C_TIMEOUT);
|
||||
|
||||
if (mcp23017_status) goto out;
|
||||
out:
|
||||
i2c_stop();
|
||||
}
|
||||
}
|
||||
}
|
16
keyboards/handwired/ferris/readme.md
Normal file
16
keyboards/handwired/ferris/readme.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Ferris
|
||||
|
||||

|
||||

|
||||
|
||||
A split 34 keys column staggered keyboard named and decorated after the rustlang mascott. All PCB files and some thoughts on the design are available on the [project's github page](https://github.com/pierrechevalier83/ferris)
|
||||
|
||||
* Keyboard Maintainer: [Pierre Chevalier](https://github.com/pierrechevalier83)
|
||||
* Hardware Supported: Ferris PCB
|
||||
* Hardware Availability: Still in prototype stage
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make handwired/ferris: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).
|
28
keyboards/handwired/ferris/rules.mk
Normal file
28
keyboards/handwired/ferris/rules.mk
Normal file
@@ -0,0 +1,28 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
UNICODE_ENABLE = yes
|
||||
CUSTOM_MATRIX = lite
|
||||
NO_USB_STARTUP_CHECK = yes
|
||||
LTO_ENABLE = yes
|
||||
|
||||
SRC += matrix.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
@@ -1,3 +1,3 @@
|
||||
# Proton C onekey
|
||||
|
||||
To trigger keypress, short together pins *A3* and *A2*.
|
||||
To trigger keypress, short together pins *A1* and *A2*.
|
||||
|
@@ -1,3 +1,3 @@
|
||||
# Teensy++ 2.0 onekey
|
||||
|
||||
To trigger keypress, short together pins *B2* and *B1*
|
||||
To trigger keypress, short together pins *F4* and *F5*
|
||||
|
@@ -22,3 +22,9 @@
|
||||
#define MATRIX_COL_PINS { D5 }
|
||||
#define MATRIX_ROW_PINS { B2 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
// i2c_master defines
|
||||
#define I2C1_SCL 0 // A2 on pinout = B0
|
||||
#define I2C1_SDA 1 // A3 on pinout = B1
|
||||
#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
|
@@ -79,7 +79,7 @@
|
||||
* @brief Enables the I2C subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2C FALSE
|
||||
#define HAL_USE_I2C TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -42,4 +42,10 @@
|
||||
* 5 for Teensy 3.x */
|
||||
#define KINETIS_USB_USB0_IRQ_PRIORITY 5
|
||||
|
||||
/*
|
||||
* I2C driver settings
|
||||
*/
|
||||
#define KINETIS_I2C_USE_I2C0 TRUE
|
||||
#define KINETIS_I2C_I2C0_PRIORITY 4
|
||||
|
||||
#endif /* _MCUCONF_H_ */
|
||||
|
@@ -22,3 +22,9 @@
|
||||
#define MATRIX_COL_PINS { D5 }
|
||||
#define MATRIX_ROW_PINS { B2 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
// i2c_master defines
|
||||
#define I2C1_SCL 0 // A2 on pinout = B0
|
||||
#define I2C1_SDA 1 // A3 on pinout = B1
|
||||
#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
|
||||
|
@@ -79,7 +79,7 @@
|
||||
* @brief Enables the I2C subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2C FALSE
|
||||
#define HAL_USE_I2C TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -42,4 +42,10 @@
|
||||
* 5 for Teensy 3.x */
|
||||
#define KINETIS_USB_USB0_IRQ_PRIORITY 2
|
||||
|
||||
/*
|
||||
* I2C driver settings
|
||||
*/
|
||||
#define KINETIS_I2C_USE_I2C0 TRUE
|
||||
#define KINETIS_I2C_I2C0_PRIORITY 4
|
||||
|
||||
#endif /* _MCUCONF_H_ */
|
||||
|
@@ -69,15 +69,17 @@ void matrix_init(void)
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00;
|
||||
matrix = _matrix0;
|
||||
matrix_prev = _matrix1;
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
|
||||
|
||||
__attribute__((weak)) void matrix_init_user(void) {}
|
||||
|
||||
__attribute__((weak)) void matrix_scan_user(void) {}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
|
@@ -69,15 +69,17 @@ void matrix_init(void)
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00;
|
||||
matrix = _matrix0;
|
||||
matrix_prev = _matrix1;
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
|
||||
|
||||
__attribute__((weak)) void matrix_init_user(void) {}
|
||||
|
||||
__attribute__((weak)) void matrix_scan_user(void) {}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
|
@@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x8F73
|
||||
#define VENDOR_ID 0x6A6A
|
||||
#define PRODUCT_ID 0x4810
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Josh Johnson
|
||||
#define PRODUCT Hub16
|
||||
@@ -42,9 +42,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS \
|
||||
{ F0, C7, C6, B6, E6}
|
||||
{ F0, C7, C6, B6, E6}
|
||||
#define MATRIX_COL_PINS \
|
||||
{ F4, F1, D5, D3 }
|
||||
{ F4, F1, D5, D3 }
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
66
keyboards/hub16/keymaps/via/keymap.c
Executable file
66
keyboards/hub16/keymaps/via/keymap.c
Executable file
@@ -0,0 +1,66 @@
|
||||
/* Copyright 2019 Josh Johnson
|
||||
*
|
||||
* 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( /* Base */
|
||||
KC_MUTE, KC_MPLY,
|
||||
KC_7, KC_8, KC_9, KC_PAST,
|
||||
KC_4, KC_5, KC_6, KC_PMNS,
|
||||
KC_1, KC_2, KC_3, KC_PPLS,
|
||||
MO(1), KC_0, KC_PDOT, KC_PENT
|
||||
),
|
||||
|
||||
[1] = LAYOUT( /* LED Control */
|
||||
_______, _______,
|
||||
_______, RGB_MOD, RGB_RMOD, RGB_TOG,
|
||||
RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI,
|
||||
RGB_SAD, RGB_SAI, _______, _______,
|
||||
_______, _______, RESET, _______
|
||||
),
|
||||
|
||||
[2] = LAYOUT(
|
||||
_______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
),
|
||||
|
||||
[3] = LAYOUT(
|
||||
_______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
),
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* Left Encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLD);
|
||||
} else {
|
||||
tap_code(KC_VOLU);
|
||||
}
|
||||
} else if (index == 1) { /* Right Encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_MPRV);
|
||||
} else {
|
||||
tap_code(KC_MNXT);
|
||||
}
|
||||
}
|
||||
}
|
4
keyboards/hub16/keymaps/via/rules.mk
Normal file
4
keyboards/hub16/keymaps/via/rules.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
VIA_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = no
|
||||
TAP_DANCE_ENABLE = no
|
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// Encoder things
|
||||
#define SWITCH_1 F7
|
||||
#define SWITCH_2 D7
|
||||
static bool read_encoder_values(matrix_row_t current_matrix[], uint8_t current_row);
|
||||
static bool read_encoder_switches(matrix_row_t current_matrix[], uint8_t current_row);
|
||||
|
||||
#ifdef MATRIX_MASKED
|
||||
extern const matrix_row_t matrix_mask[];
|
||||
@@ -128,7 +128,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||
}
|
||||
|
||||
// Unselect row
|
||||
unselect_row(current_row);
|
||||
unselect_row(current_row);
|
||||
|
||||
return (last_row_value != current_matrix[current_row]);
|
||||
}
|
||||
@@ -223,27 +223,23 @@ uint8_t matrix_scan(void) {
|
||||
debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
|
||||
|
||||
// Read encoder switches, already debounced
|
||||
changed |= read_encoder_values(matrix, 4);
|
||||
changed |= read_encoder_switches(matrix, 4);
|
||||
|
||||
matrix_scan_quantum();
|
||||
return (uint8_t)changed;
|
||||
}
|
||||
|
||||
// Customisations for the encoders
|
||||
void matrix_init_kb(void){
|
||||
void matrix_init_kb(void) {
|
||||
setPinInput(SWITCH_1);
|
||||
setPinInput(SWITCH_2);
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void){
|
||||
void matrix_scan_kb(void) {}
|
||||
|
||||
}
|
||||
void matrix_print(void) {}
|
||||
|
||||
void matrix_print(void){
|
||||
|
||||
}
|
||||
|
||||
static bool read_encoder_values(matrix_row_t current_matrix[], uint8_t current_row) {
|
||||
static bool read_encoder_switches(matrix_row_t current_matrix[], uint8_t current_row) {
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[current_row];
|
||||
|
||||
@@ -253,18 +249,18 @@ static bool read_encoder_values(matrix_row_t current_matrix[], uint8_t current_r
|
||||
// Debounce the encoder buttons using a shift register
|
||||
static uint8_t btn_1_array;
|
||||
static uint8_t btn_2_array;
|
||||
bool btn_1_rising = 0;
|
||||
bool btn_2_rising = 0;
|
||||
bool btn_1_pressed = 0;
|
||||
bool btn_2_pressed = 0;
|
||||
btn_1_array <<= 1;
|
||||
btn_2_array <<= 1;
|
||||
btn_1_array |= readPin(SWITCH_1);
|
||||
btn_2_array |= readPin(SWITCH_2);
|
||||
(btn_1_array == 0b01111111) ? (btn_1_rising = 1) : (btn_1_rising = 0);
|
||||
(btn_2_array == 0b01111111) ? (btn_2_rising = 1) : (btn_2_rising = 0);
|
||||
(btn_1_array == 0b11111111) ? (btn_1_pressed = 1) : (btn_1_pressed = 0);
|
||||
(btn_2_array == 0b11111111) ? (btn_2_pressed = 1) : (btn_2_pressed = 0);
|
||||
|
||||
// Populate the matrix row with the state of the encoder
|
||||
current_matrix[current_row] |= btn_1_rising ? (1 << 0) : 0;
|
||||
current_matrix[current_row] |= btn_2_rising ? (1 << 1) : 0;
|
||||
current_matrix[current_row] |= btn_1_pressed ? (1 << 0) : 0;
|
||||
current_matrix[current_row] |= btn_2_pressed ? (1 << 1) : 0;
|
||||
|
||||
return (last_row_value != current_matrix[current_row]);
|
||||
}
|
@@ -1,16 +1,15 @@
|
||||
{
|
||||
"keyboard_name": "maja",
|
||||
"keyboard_name": "MAJA",
|
||||
"url": "",
|
||||
"maintainer": "KBDFANS",
|
||||
"maintainer": "DZTECH",
|
||||
"width": 18.75,
|
||||
"height": 5.5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x": 2.75, "y": 0},
|
||||
{"x": 12.75, "y": 0},
|
||||
{"x": 0.75, "y": 0.25},
|
||||
{"x": 1.75, "y": 0.25},
|
||||
{"x": 2.75, "y": 0},
|
||||
{"x": 3.75, "y": 0.25},
|
||||
{"x": 4.75, "y": 0.25},
|
||||
{"x": 5.75, "y": 0.25},
|
||||
@@ -19,6 +18,7 @@
|
||||
{"x": 9.75, "y": 0.25},
|
||||
{"x": 10.75, "y": 0.25},
|
||||
{"x": 11.75, "y": 0.25},
|
||||
{"x": 12.75, "y": 0},
|
||||
{"x": 13.75, "y": 0.25},
|
||||
{"x": 14.75, "y": 0.25, "w": 2},
|
||||
{"x": 17.75, "y": 0.25},
|
||||
@@ -77,4 +77,4 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,14 +5,22 @@
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT(
|
||||
[_BASE_MAC] = LAYOUT(
|
||||
KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC,
|
||||
KC_BSPC, KC_Q, W_CTRL, E_ALT, R_GUI, KC_T, KC_Y, U_GUI, I_ALT, O_CTRL, KC_P, KC_SCLN,
|
||||
KC_CAPS, A_CTRL, S_ALT, D_GUI, F_SHFT, KC_G, KC_H, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT,
|
||||
KC_BSPC, KC_Q, W_CTL, E_ALT, R_GUI, KC_T, KC_Y, U_GUI, I_ALT, O_CTL, KC_P, KC_SCLN,
|
||||
KC_CAPS, A_CTL, S_ALT, D_GUI, F_SFT, KC_G, KC_H, J_SFT, K_GUI, L_ALT, MINSCTL, KC_QUOT,
|
||||
NAVLOCK, KC_Z, KC_X, KC_C, KC_V, KC_B, ENT_SYM, TAB_NUM, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
ESC_HYP, TAB_NUM, SPC_SFT, SPC_SFT, BSP_SYM, DEL_WRP
|
||||
),
|
||||
|
||||
[_OVER_WIN] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, W_GUI, _______, R_CTL, _______, _______, U_CTL, _______, O_GUI, _______, _______,
|
||||
_______, A_GUI, _______, D_CTL, _______, _______, _______, _______, K_CTL, _______, MINSGUI, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_SYMBOL] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, _______,
|
||||
@@ -22,29 +30,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
[_NAVNUM] = LAYOUT(
|
||||
XNOTIFY, XXXXXXX, XPRVSPC, NWIN, XNXTSPC, XXXXXXX, XXXXXXX, KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, XXXXXXX,
|
||||
XALLWIN, NAVFWD, BWORD, KC_UP, FWORD, KC_PGUP, KC_DLR, KC_P7, KC_P8, KC_P9, KC_DOT, XXXXXXX,
|
||||
XDESKTP, NAVBACK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PERC, KC_P4, KC_P5, KC_P6, KC_EQL, XXXXXXX,
|
||||
_______, PTAB, KC_HOME, PWIN, KC_END, NTAB, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_COMM, _______,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, M_NXWIN, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, XXXXXXX,
|
||||
XXXXXXX, M_NAVFW, M_BWORD, KC_UP, M_FWORD, KC_PGUP, KC_DLR, KC_P7, KC_P8, KC_P9, KC_DOT, XXXXXXX,
|
||||
XXXXXXX, M_NAVBK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PERC, KC_P4, KC_P5, KC_P6, KC_EQL, XXXXXXX,
|
||||
_______, M_PVTAB, KC_HOME, M_PVWIN, KC_END, M_NXTAB, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_COMM, _______,
|
||||
_______, _______, _______, _______, _______, KC_P0
|
||||
),
|
||||
[_NAVNUM_WIN] = LAYOUT(
|
||||
_______, _______, _______, W_NXWIN, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, W_NAVFW, W_BWORD, _______, W_FWORD, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, W_NAVBK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, W_PVTAB, _______, W_PVWIN, _______, W_NXTAB, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_FUNCT] = LAYOUT(
|
||||
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
RESET, XALLWIN, XPRVSPC, NWIN, XNXTSPC, XDESKTP, XXXXXXX, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_K, RESET,
|
||||
DEBUG, XNOTIFY, PTAB, PWIN, NTAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
RESET, XXXXXXX, XXXXXXX, M_NXWIN, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_K, RESET,
|
||||
DEBUG, XXXXXXX, M_PVTAB, M_PVWIN, M_NXTAB, XXXXXXX, XXXXXXX, TOG_WIN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, KC_MPLY, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
)
|
||||
),
|
||||
[_FUNCT_WIN] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, W_NXWIN, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, W_PVTAB, W_PVWIN, W_NXTAB, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_MS_WH_UP);
|
||||
} else {
|
||||
tap_code(KC_MS_WH_DOWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
6
keyboards/keebio/iris/keymaps/yoonbae81/config.h
Normal file
6
keyboards/keebio/iris/keymaps/yoonbae81/config.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define MOUSEKEY_DELAY 100
|
||||
#define MOUSEKEY_INTERVAL 25
|
||||
#define MOUSEKEY_MAX_SPEED 7
|
||||
#define MOUSEKEY_TIME_TO_MAX 30
|
67
keyboards/keebio/iris/keymaps/yoonbae81/keymap.c
Normal file
67
keyboards/keebio/iris/keymaps/yoonbae81/keymap.c
Normal file
@@ -0,0 +1,67 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layer_names {
|
||||
_MAIN,
|
||||
_FN1,
|
||||
_FN2,
|
||||
_FN3
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_MAIN] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LT(2,KC_SPC), KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSPC,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
KC_LGUI, KC_LALT, LT(1,KC_ENT), KC_SPC,LT(1,KC_RALT),LT(2,KC_RCTL)
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
|
||||
[_FN1] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, KC_LCBR, KC_PGUP, KC_UP, KC_HOME, KC_RCBR, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_NO, KC_NO,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, KC_LPRN, KC_LEFT, KC_DOWN, KC_RGHT, KC_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_MINS, KC_EQL,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, KC_LBRC, KC_END, KC_NO, KC_PGDN, KC_RBRC, TO(2), _______, KC_NO, KC_PGDN, KC_END, KC_ENT, KC_INS, KC_DEL,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
_______, _______, _______, KC_BSPC, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
|
||||
[_FN2] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
TO(0), KC_1, KC_2, KC_SLCK, KC_PAUS, KC_PSCR, KC_CALC, KC_ESC, KC_PMNS, KC_PERC, KC_PSLS, MO(3),
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, KC_NO, KC_WH_U, KC_MS_U, KC_NO, KC_NO, KC_F2, KC_7, KC_8, KC_9, KC_PAST, KC_NO,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_ENT, KC_4, KC_5, KC_6, KC_MINS, KC_EQL,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, TO(0), _______, KC_0, KC_1, KC_2, KC_3, KC_PPLS, KC_BSPC,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
KC_BTN2, KC_BTN1, KC_ACL2, _______, KC_PDOT, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
),
|
||||
|
||||
[_FN3] = LAYOUT(
|
||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, KC_MPRV, KC_MRWD, KC_MFFD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______,
|
||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||
KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______
|
||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||
)
|
||||
};
|
4
keyboards/keebio/iris/keymaps/yoonbae81/rules.mk
Normal file
4
keyboards/keebio/iris/keymaps/yoonbae81/rules.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
ENCODER_ENABLE = no
|
||||
MOUSEKEY_ENABLE = yes
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user