diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/_summary.md | 1 | ||||
-rw-r--r-- | docs/cli.md | 4 | ||||
-rw-r--r-- | docs/cli_development.md | 6 | ||||
-rw-r--r-- | docs/coding_conventions_python.md | 4 | ||||
-rw-r--r-- | docs/faq_debug.md | 7 | ||||
-rw-r--r-- | docs/feature_encoders.md | 2 | ||||
-rw-r--r-- | docs/flashing.md | 1 | ||||
-rw-r--r-- | docs/fr-fr/faq_debug.md | 8 | ||||
-rw-r--r-- | docs/fr-fr/flashing.md | 1 | ||||
-rw-r--r-- | docs/getting_started_vagrant.md | 1 | ||||
-rw-r--r-- | docs/ja/faq_debug.md | 7 | ||||
-rw-r--r-- | docs/ja/feature_combo.md | 108 | ||||
-rw-r--r-- | docs/ja/feature_command.md | 56 | ||||
-rw-r--r-- | docs/ja/feature_encoders.md | 81 | ||||
-rw-r--r-- | docs/ja/flashing.md | 1 | ||||
-rw-r--r-- | docs/ja/getting_started_vagrant.md | 1 | ||||
-rw-r--r-- | docs/proton_c_conversion.md | 69 | ||||
-rw-r--r-- | docs/reference_glossary.md | 3 | ||||
-rw-r--r-- | docs/syllabus.md | 70 | ||||
-rw-r--r-- | docs/tap_hold.md | 4 | ||||
-rw-r--r-- | docs/zh-cn/faq_debug.md | 7 | ||||
-rw-r--r-- | docs/zh-cn/reference_glossary.md | 3 |
22 files changed, 389 insertions, 56 deletions
diff --git a/docs/_summary.md b/docs/_summary.md index d47b252c01..842422665e 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -6,6 +6,7 @@ * [Testing and Debugging](newbs_testing_debugging.md) * [Getting Help/Support](support.md) * [Other Resources](newbs_learn_more_resources.md) + * [Syllabus](syllabus.md) * FAQs * [General FAQ](faq_general.md) diff --git a/docs/cli.md b/docs/cli.md index 760fe1cdb5..01641bd8b8 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -6,7 +6,7 @@ The QMK CLI makes building and working with QMK keyboards easier. We have provid ### Requirements :id=requirements -The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI. +QMK requires Python 3.6 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI. ### Install Using Homebrew (macOS, some Linux) :id=install-using-homebrew @@ -21,7 +21,7 @@ qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build ### Install Using easy_install or pip :id=install-using-easy_install-or-pip -If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command: +If your system is not listed above you can install QMK manually. First ensure that you have python 3.6 (or later) installed and have installed pip. Then install QMK with this command: ``` pip3 install qmk diff --git a/docs/cli_development.md b/docs/cli_development.md index 2a967de4ab..af86686c07 100644 --- a/docs/cli_development.md +++ b/docs/cli_development.md @@ -44,7 +44,7 @@ def hello(cli): First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function. -Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator. +Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.6/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator. # User Interaction @@ -56,13 +56,13 @@ There are two main methods for outputting text in a subcommand- `cli.log` and `c You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below. -Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.5/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example. +Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.6/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example. You should never use the format operator (`%`) directly, always pass values as arguments. ### Logging (`cli.log`) -The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong. +The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.6/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong. The default log level is `INFO`. If the user runs `qmk -v <subcommand>` the default log level will be set to `DEBUG`. diff --git a/docs/coding_conventions_python.md b/docs/coding_conventions_python.md index 1aefc044e8..47dff7f8ee 100644 --- a/docs/coding_conventions_python.md +++ b/docs/coding_conventions_python.md @@ -2,7 +2,7 @@ Most of our style follows PEP8 with some local modifications to make things less nit-picky. -* We target Python 3.5 for compatability with all supported platforms. +* We target Python 3.6 for compatability with all supported platforms. * We indent using four (4) spaces (soft tabs) * We encourage liberal use of comments * Think of them as a story describing the feature @@ -317,7 +317,7 @@ At the time of this writing our tests are not very comprehensive. Looking at the ## Integration Tests -Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.5/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened. +Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.6/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened. ## Unit Tests diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 6c66defbd4..08c84fe4fd 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -160,10 +160,3 @@ As of now root of its cause is not clear but some build options seem to be relat https://github.com/tmk/tmk_keyboard/issues/266 https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 - - - -## FLIP Doesn't Work -### `AtLibUsbDfu.dll` Not Found -Remove current driver and reinstall one FLIP provides from DeviceManager. -http://imgur.com/a/bnwzy diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index 4a0ae60c31..7799b78d6e 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -61,7 +61,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_PGUP); } - } else if (index == 1) { /* Second encoder */ + } else if (index == 1) { /* Second encoder */ if (clockwise) { tap_code(KC_DOWN); } else { diff --git a/docs/flashing.md b/docs/flashing.md index ab003308d0..1f71c253c3 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -26,7 +26,6 @@ Compatible flashers: * [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI) * [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended command line) -* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (not recommended) Flashing sequence: diff --git a/docs/fr-fr/faq_debug.md b/docs/fr-fr/faq_debug.md index 754c79921c..9c12f2917a 100644 --- a/docs/fr-fr/faq_debug.md +++ b/docs/fr-fr/faq_debug.md @@ -155,11 +155,3 @@ Pour le moment, l'origine du problème n'est pas comprise, mais certaines option https://github.com/tmk/tmk_keyboard/issues/266 https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 - -## FLIP ne marche pas - -### `AtLibUsbDfu.dll` Not Found - -Supprimez le pilote actuel et réinstallez celui donné par FLIP dans le gestionnaire de périphériques. - -http://imgur.com/a/bnwzy diff --git a/docs/fr-fr/flashing.md b/docs/fr-fr/flashing.md index c380614a5d..74eae49779 100644 --- a/docs/fr-fr/flashing.md +++ b/docs/fr-fr/flashing.md @@ -26,7 +26,6 @@ Méthodes de flash compatibles : * [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé) * [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé) -* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (non recommandé) Ordre des actions : diff --git a/docs/getting_started_vagrant.md b/docs/getting_started_vagrant.md index da26682d7f..7a4541cfc6 100644 --- a/docs/getting_started_vagrant.md +++ b/docs/getting_started_vagrant.md @@ -20,7 +20,6 @@ The "easy" way to flash the firmware is using a tool from your host OS: * [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (recommended) * [Teensy Loader](https://www.pjrc.com/teensy/loader.html) -* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx) If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version. diff --git a/docs/ja/faq_debug.md b/docs/ja/faq_debug.md index 8e42aebbb5..856e9473a1 100644 --- a/docs/ja/faq_debug.md +++ b/docs/ja/faq_debug.md @@ -152,10 +152,3 @@ https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034 https://github.com/tmk/tmk_keyboard/issues/266 https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 - - - -## FLIP が動作しない -### `AtLibUsbDfu.dll` が見つかりません -デバイスマネージャから現在のドライバを削除し、FLIP が提供するものを再インストールします。 -http://imgur.com/a/bnwzy diff --git a/docs/ja/feature_combo.md b/docs/ja/feature_combo.md new file mode 100644 index 0000000000..4fbd6847d2 --- /dev/null +++ b/docs/ja/feature_combo.md @@ -0,0 +1,108 @@ +# コンボ + +<!--- + original document: 0.8.94:docs/feature_combo.md + git diff 0.8.94 HEAD -- docs/feature_combo.md | cat +--> + +コンボ機能は、同時押し方式でのカスタムアクション追加機能です。同時に複数のキーを押して、異なる効果を生み出すことができます。例えば、タッピング時間内で `A` と `S` を押すと、代わりに `ESC` が押されます。もっと複雑なタスクを実行させることもできます。 + +この機能を有効にするには、`rules.mk` に `COMBO_ENABLE = yes` を追加する必要があります。 + +さらに、使用するコンボの数を `config.h` の中で、`#define COMBO_COUNT 1` (1を使用するコンボの数で置き換えます)と書いて、指定する必要があります。 +<!-- At this time, this is necessary --> + +また、デフォルトでは、コンボのタッピング時間は `TAPPING_TERM` と同じ値に設定されます (ほとんどのキーボードではデフォルトで 200)。ただし、`config.h` で定義することにより異なる値を指定することができます。例えば: `#define COMBO_TERM 300` はコンボのためのタイムアウト時間を 300ms に設定します。 + +次に、`keymap.c` ファイルに、`COMBO_END` で終了するキーのシーケンス、およびキーの組み合わせを列挙する構造体、その結果のアクションを定義する必要があります。 + +```c +const uint16_t PROGMEM test_combo[] = {KC_A, KC_B, COMBO_END}; +combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)}; +``` + +これは、A と B のキーを押した場合に、"Escape" を送信します。 + +!> このメソッドは[基本的なキーコード](ja/keycodes_basic.md)のみをサポートします。詳細な制御については例を見てください。 + +## 例 + +リストを追加したい場合は、以下のようなものを使います: + +```c +enum combos { + AB_ESC, + JK_TAB +}; + +const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; +const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [AB_ESC] = COMBO(ab_combo, KC_ESC), + [JK_TAB] = COMBO(jk_combo, KC_TAB) +}; +``` + +より複雑な実装として、カスタム処理を追加するために `process_combo_event` 関数を使うことができます。 + +```c +enum combo_events { + ZC_COPY, + XV_PASTE +}; + +const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END}; +const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [ZC_COPY] = COMBO_ACTION(copy_combo), + [XV_PASTE] = COMBO_ACTION(paste_combo), +}; + +void process_combo_event(uint8_t combo_index, bool pressed) { + switch(combo_index) { + case ZC_COPY: + if (pressed) { + tap_code16(LCTL(KC_C)); + } + break; + case XV_PASTE: + if (pressed) { + tap_code16(LCTL(KC_V)); + } + break; + } +} +``` + +これは、Z と C を押すと Ctrl+C を送信し、X と V を押すと Ctrl+V を送信します。これを変更して、レイヤーの変更、サウンドの再生、設定の変更などを行うこともできます。 + +## 追加の設定 + +長いコンボあるいはさらに長いコンボを使っている場合、構造体があなたのしていることに対応するのに十分な大きさで無いかもしれないため、問題が発生するかもしれません。 + +この場合、`config.h` ファイルに `#define EXTRA_LONG_COMBOS` または `#define EXTRA_EXTRA_LONG_COMBOS` のどちらかを追加することができます。 + +`COMBO_ALLOW_ACTION_KEYS` を定義することでアクションキーを有効にすることもできます。 + +## キーコード + +その場でコンボ機能を有効、無効および切り替えすることができます。ゲームなどで、一時的にそれらを無効にする必要がある場合に便利です。 + +| キーコード | 説明 | +|----------|---------------------------------| +| `CMB_ON` | コンボ機能をオンにします | +| `CMB_OFF` | コンボ機能をオフにします | +| `CMB_TOG` | コンボ機能のオンとオフを切り替えます | + +## ユーザコールバック + +キーコードに加えて、状態を設定または状態をチェックするために使うことができる幾つかの関数があります: + +| 関数 | 説明 | +|-----------|--------------------------------------------------------------------| +| `combo_enable()` | コンボ機能を有効にします | +| `combo_disable()` | コンボ機能を無効にし、コンボバッファをクリアします | +| `combo_toggle()` | コンボ機能の状態を切り替えます | +| `is_combo_enabled()` | コンボ機能の状態(true か false)を返します | diff --git a/docs/ja/feature_command.md b/docs/ja/feature_command.md new file mode 100644 index 0000000000..f8b7e89294 --- /dev/null +++ b/docs/ja/feature_command.md @@ -0,0 +1,56 @@ +# コマンド + +<!--- + original document: 0.8.94:docs/feature_command.md + git diff 0.8.94 HEAD -- docs/feature_command.md | cat +--> + +コマンド(旧称:マジック)は、ファームウェアを書き込んだり、[ブートマジック](ja/feature_bootmagic.md)を使うためにプラグを抜いたりすることなくキーボードの挙動を変更する方法です。この機能と[ブートマジックキーコード](feature_bootmagic.md#keycodes)には多くの重複があります。可能な限り、コマンドでは無くブートマジックキーコードの機能を使うことをお勧めします。 + +一部のキーボードではコマンドがデフォルトで無効になっています。その場合、`rules.mk` 内で明示的に有効にする必要があります: + +```make +COMMAND_ENABLE = yes +``` + +## 使用法 + +コマンドを使うには、`IS_COMMAND()` マクロで定義されたキーの組み合わせを押し続けます。デフォルトでは、これは「左Shift + 右Shift」です。次に、目的のコマンドに対応するキーを押します。例えば、現在の QMK バージョンを QMK Toolbox コンソールに出力するには、「左Shift + 右Shift + `V`」を押します。 + +## 設定 + +コマンドのためのキーの割り当てを変更したい場合は、キーボードあるいはキーマップレベルのどちらかで、`config.h` にこれらを `#define` します。ここで割り当てる全てのキーコードは `KC_` 接頭辞を省略する必要があります。 + +| 定義 | デフォルト | 説明 | +|------------------------------------|--------------------------------|------------------------------------------------| +| `IS_COMMAND()` | `(get_mods() == MOD_MASK_SHIFT)` | コマンドをアクティブにするキーの組み合わせ | +| `MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` | `true` | ファンクション行を使ってデフォルトレイヤーを設定 | +| `MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` | `true` | 数字キーでデフォルトレイヤーを設定 | +| `MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM` | `false` | `MAGIC_KEY_LAYER0..9` を使ってデフォルトレイヤーを設定 | +| `MAGIC_KEY_DEBUG` | `D` | シリアルを介するデバッグの切り替え | +| `MAGIC_KEY_DEBUG_MATRIX` | `X` | キーマトリックスのデバッグの切り替え | +| `MAGIC_KEY_DEBUG_KBD` | `K` | キーボードのデバッグの切り替え | +| `MAGIC_KEY_DEBUG_MOUSE` | `M` | マウスのデバッグの切り替え | +| `MAGIC_KEY_CONSOLE` | `C` | コマンドコンソールを有効にする | +| `MAGIC_KEY_VERSION` | `V` | コンソールに実行中の QMK バージョンを出力 | +| `MAGIC_KEY_STATUS` | `S` | コンソールに現在のキーボードの状態を出力 | +| `MAGIC_KEY_HELP` | `H` | コンソールにコマンドのヘルプを出力 | +| `MAGIC_KEY_HELP_ALT` | `SLASH` | コンソールにコマンドのヘルプを出力 (代替) | +| `MAGIC_KEY_LAYER0` | `0` | レイヤー 0 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER0_ALT` | `GRAVE` | レイヤー 0 をデフォルトレイヤーにする (代替) | +| `MAGIC_KEY_LAYER1` | `1` | レイヤー 1 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER2` | `2` | レイヤー 2 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER3` | `3` | レイヤー 3 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER4` | `4` | レイヤー 4 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER5` | `5` | レイヤー 5 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER6` | `6` | レイヤー 6 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER7` | `7` | レイヤー 7 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER8` | `8` | レイヤー 8 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER9` | `9` | レイヤー 9 をデフォルトレイヤーにする | +| `MAGIC_KEY_BOOTLOADER` | `B` | ブートローダにジャンプする | +| `MAGIC_KEY_BOOTLOADER_ALT` | `ESC` | ブートローダにジャンプする (代替) | +| `MAGIC_KEY_LOCK` | `CAPS` | 何も入力できないようにキーボードをロック | +| `MAGIC_KEY_EEPROM` | `E` | 保存された EEPROM 設定をコンソールに出力 | +| `MAGIC_KEY_EEPROM_CLEAR` | `BSPACE` | EEPROM をクリア | +| `MAGIC_KEY_NKRO` | `N` | N キーロールオーバー (NKRO) の有効・無効を切り替え | +| `MAGIC_KEY_SLEEP_LED` | `Z` | コンピュータがスリープの時に LED を切り替え | diff --git a/docs/ja/feature_encoders.md b/docs/ja/feature_encoders.md new file mode 100644 index 0000000000..7f8922652d --- /dev/null +++ b/docs/ja/feature_encoders.md @@ -0,0 +1,81 @@ +# エンコーダ + +<!--- + original document: 0.8.123:docs/feature_encoders.md + git diff 0.8.123 HEAD -- docs/feature_encoders.md | cat +--> + +以下を `rules.mk` に追加することで基本的なエンコーダがサポートされます: + +```make +ENCODER_ENABLE = yes +``` + +さらに、以下を `config.h` に追加します: + +```c +#define ENCODERS_PAD_A { B12 } +#define ENCODERS_PAD_B { B13 } +``` + +各 PAD_A/B 変数は配列を定義するため、複数のエンコーダを定義することができます。例えば: + +```c +#define ENCODERS_PAD_A { encoder1a, encoder2a } +#define ENCODERS_PAD_B { encoder1b, encoder2b } +``` + +エンコーダの時計回りの方向が間違っている場合は、A と B のパッド定義を交換することができます。define を使って逆にすることもできます: + +```c +#define ENCODER_DIRECTION_FLIP +``` + +さらに、解像度を同じファイルで指定することができます (デフォルトかつお勧めは4): + +```c +#define ENCODER_RESOLUTION 4 +``` + +## 分割キーボード + +分割キーボードのそれぞれの側のエンコーダに異なるピン配列を使っている場合、右側のピン配列を以下のように定義することができます: + +```c +#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } +#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } +``` + +## コールバック + +コールバック関数を `<keyboard>.c` に記述することができます: + +```c +void encoder_update_kb(uint8_t index, bool clockwise) { + encoder_update_user(index, clockwise); +} +``` + +あるいは `keymap.c` に記述することもできます: + +```c +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} +``` + +## ハードウェア + +エンコーダの A と B の線は MCU に直接配線し、C/common 線はグランドに配線する必要があります。 diff --git a/docs/ja/flashing.md b/docs/ja/flashing.md index 62baa907d1..713d4fdf9e 100644 --- a/docs/ja/flashing.md +++ b/docs/ja/flashing.md @@ -31,7 +31,6 @@ BOOTLOADER = atmel-dfu * [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (推奨の GUI) * QMK の [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` (推奨のコマンドライン) -* [Atmel の Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (非推奨) 書き込み手順: diff --git a/docs/ja/getting_started_vagrant.md b/docs/ja/getting_started_vagrant.md index 0bc5c4b798..66fb895107 100644 --- a/docs/ja/getting_started_vagrant.md +++ b/docs/ja/getting_started_vagrant.md @@ -25,7 +25,6 @@ Vagrant 以外に、適切なプロバイダがインストールされ、その * [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (推奨) * [Teensy ローダー](https://www.pjrc.com/teensy/loader.html) -* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx) コマンドラインでプログラムしたい場合は、Vagranfile の ['modifyvm'] 行のコメントを解除して Linux への USB パススルーを有効にし、dfu-util/dfu-programmer のようなコマンドラインツールを使ってプログラムすることができます。あるいは Teensy CLI バージョンをインストールすることができます。 diff --git a/docs/proton_c_conversion.md b/docs/proton_c_conversion.md index dc0a3f4849..98f1508a9e 100644 --- a/docs/proton_c_conversion.md +++ b/docs/proton_c_conversion.md @@ -1,5 +1,9 @@ # Converting a board to use the Proton C +Since the Proton C is a drop-in replacement for a Pro Micro we've made it easy to use. This page documents a handy automated process for converting keyboards, as well as documenting the manual process if you'd like to make use of Proton C features that aren't available on Pro Micros. + +## Automatic Conversion + If a board currently supported in QMK uses a Pro Micro (or compatible board) and you want to use the Proton C, you can generate the firmware by appending `CONVERT_TO_PROTON_C=yes` (or `CTPC=yes`) to your make argument, like this: make 40percentclub/mf68:default CTPC=yes @@ -8,13 +12,15 @@ You can add the same argument to your keymap's `rules.mk`, which will accomplish This exposes the `CONVERT_TO_PROTON_C` flag that you can use in your code with `#ifdef`s, like this: - #ifdef CONVERT_TO_PROTON_C - // Proton C code - #else - // Pro Micro code - #endif +```c +#ifdef CONVERT_TO_PROTON_C + // Proton C code +#else + // Pro Micro code +#endif +``` -Before being able to compile, you may get some errors about `PORTB/DDRB`, etc not being defined, so you'll need to convert the keyboard's code to use the [GPIO Controls](internals_gpio_control.md) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all. +If you get errors about `PORTB/DDRB`, etc not being defined, so you'll need to convert the keyboard's code to use the [GPIO Controls](internals_gpio_control.md) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all. The Proton C only has one on-board LED (C13), and by default, the TXLED (D5) is mapped to it. If you want the RXLED (B0) mapped to it instead, add this like to your `config.h`: @@ -31,3 +37,54 @@ These are defaults based on what has been implemented for ARM boards. | [Backlight](feature_backlight.md) | Forces [task driven PWM](feature_backlight.md#software-pwm-driver) until ARM can provide automatic configuration | | USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | | [Split keyboards](feature_split_keyboard.md) | Not supported yet | + +## Manual Conversion + +To use the Proton C natively, without having to specify `CTPC=yes`, you need to change the `MCU` line in `rules.mk`: + +``` +MCU = STM32F303 +``` + +Remove these variables if they exist: + +* `BOOTLOADER` +* `EXTRA_FLAGS` + +Finally convert all pin assignments in `config.h` to the stm32 equivalents. + +| Pro Micro Left | Proton C Left | | Proton C Right | Pro Micro Right | +|-----------|----------|-|----------|-----------| +| `D3` | `A9` | | 5v | RAW (5v) | +| `D2` | `A10` | | GND | GND | +| GND | GND | | FLASH | RESET | +| GND | GND | | 3.3v | VCC <sup>1</sup> | +| `D1` | `B7` | | `A2` | `F4` | +| `D0` | `B6` | | `A1` | `F5` | +| `D4` | `B5` | | `A0` | `F6` | +| `C6` | `B4` | | `B8` | `F7` | +| `D7` | `B3` | | `B13` | `B1` | +| `E6` | `B2` | | `B14` | `B3` | +| `B4` | `B1` | | `B15` | `B2` | +| `B5` | `B0` | | `B9` | `B6` | +| `B0` (RX LED) | `C13` <sup>2</sup> | | `C13` <sup>2</sup> | `D5` (TX LED) | + +You can also make use of several new pins on the extended portion of the Proton C: + +| Left | | Right | +|------|-|-------| +| `A4`<sup>3</sup> | | `B10` | +| `A5`<sup>4</sup> | | `B11` | +| `A6` | | `B12` | +| `A7` | | `A14`<sup>5</sup> (SWCLK) | +| `A8` | | `A13`<sup>5</sup> (SWDIO) | +| `A15` | | RESET<sup>6</sup> | + +Notes: + +1. On a Pro Micro VCC can be 3.3v or 5v. +2. A Proton C only has one onboard LED, not two like a Pro Micro. The Pro Micro has an RX LED on `D5` and a TX LED on `B0`. +3. `A4` is shared with the speaker. +4. `A5` is shared with the speaker. +5. `A13` and `A14` are used for hardware debugging (SWD). You can also use them for GPIO, but should use them last. +6. Short RESET to 3.3v (pull high) to reboot the MCU. This does not enter bootloader mode like a Pro Micro, it only resets the MCU. diff --git a/docs/reference_glossary.md b/docs/reference_glossary.md index 08a22050cf..4cdba024e4 100644 --- a/docs/reference_glossary.md +++ b/docs/reference_glossary.md @@ -46,9 +46,6 @@ An IDE that is popular with many C developers. ## Firmware The software that controls your MCU. -## FLIP -Software provided by Atmel for flashing AVR devices. We generally recommend [QMK Flasher](https://github.com/qmk/qmk_flasher) instead, but for some advanced use cases FLIP is required. - ## git Versioning software used at the command line diff --git a/docs/syllabus.md b/docs/syllabus.md new file mode 100644 index 0000000000..ec7f66ba78 --- /dev/null +++ b/docs/syllabus.md @@ -0,0 +1,70 @@ +# QMK Syllabus + +This page helps you build up your QMK knowledge by introducing the basics first and guiding you to understanding all the concepts you need to know to be proficient with QMK. + +# Beginning Topics + +If you read nothing else you should read the documents in this section. After reading the [Tutorial](newbs.md) you should be able to create a basic keymap, compile it, and flash it to your keyboard. The remaining documents will flesh out your knowledge of these basics. + +* **Learn How To Use QMK Tools** + * [Tutorial](newbs.md) + * [CLI](cli.md) + * [GIT](newbs_git_best_practices.md) +* **Learn About Keymaps** + * [Layers](feature_layers.md) + * [Keycodes](keycodes.md) + * The full list of keycodes you can use. Note that some may require knowledge found in the Intermediate or Advanced Topics. +* **Configuring IDEs** - Optional + * [Eclipse](other_eclipse.md) + * [VS Code](other_vscode.md) + +# Intermediate Topics + +These topics start to dig into some of the features that QMK supports. You don't have to read all of these documents, but some of the documents in the Advanced Topics section won't make sense if you skip over some of these. + +* **Learn How To Configure Features** + <!-- * Configuration Overview FIXME(skullydazed/anyone): write this document --> + * [Audio](feature_audio.md) + * Lighting + * [Backlight](feature_backlight.md) + * [LED Matrix](feature_led_matrix.md) + * [RGB Lighting](feature_rgblight.md) + * [RGB Matrix](feature_rgb_matrix.md) + * [Tap-Hold Configuration](tap_hold.md) +* **Learn More About Keymaps** + * [Keymaps](keymap.md) + * [Custom Functions and Keycodes](custom_quantum_functions.md) + * Macros + * [Dynamic Macros](feature_dynamic_macros.md) + * [Compiled Macros](feature_macros.md) + * [Tap Dance](feature_tap_dance.md) + * [Combos](feature_combo.md) + * [Userspace](feature_userspace.md) + +# Advanced Topics + +Everything below here requires a lot of foundational knowledge. Besides being able to create keymaps using advanced features you should be familiar with using both `config.h` and `rules.mk` to configure options for your keyboard. + +* **Maintaining Keyboards Within QMK** + * [Handwiring a Keyboard](hand_wire.md) + * [Keyboard Guidelines](hardware_keyboard_guidelines.md) + * [info.json Reference](reference_info_json.md) + * [Debounce API](feature_debounce_type.md) +* **Advanced Features** + * [Unicode](feature_unicode.md) + * [API](api_overview.md) + * [Bootmagic](feature_bootmagic.md) +* **Hardware** + * [How Keyboards Work](how_keyboards_work.md) + * [How A Keyboard Matrix Works](how_a_matrix_works.md) + * [Split Keyboards](feature_split_keyboard.md) + * [Stenography](feature_stenography.md) + * [Pointing Devices](feature_pointing_device.md) +* **Core Development** + * [Coding Conventions](coding_conventions_c.md) + * [Compatible Microcontrollers](compatible_microcontrollers.md) + * [Custom Matrix](custom_matrix.md) + * [Understanding QMK](understanding_qmk.md) +* **CLI Development** + * [Coding Conventions](coding_conventions_python.md) + * [CLI Development Overview](cli_development.md) diff --git a/docs/tap |