diff options
author | umi <57262844+umi-umi@users.noreply.github.com> | 2020-05-26 17:14:58 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 17:14:58 +0900 |
commit | 451c472d1d701507d06923a859561a60bfbcfa78 (patch) | |
tree | 3946a5e77f7011c10f11ec7edfed5fea563df3f1 | |
parent | bfe76053ba2767e8df1aea1183c8dcaabeaca8c9 (diff) | |
download | qmk_firmware-451c472d1d701507d06923a859561a60bfbcfa78.tar.gz qmk_firmware-451c472d1d701507d06923a859561a60bfbcfa78.zip |
[Docs] Japanese translation of docs/feature_pointing_device.md (#8993)
* add feature_pointing_device.md translation
* update based on comment
* update based on comment
* update based on comment
* update based on comment
-rw-r--r-- | docs/ja/feature_pointing_device.md | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/docs/ja/feature_pointing_device.md b/docs/ja/feature_pointing_device.md new file mode 100644 index 000000000..8b26ac102 --- /dev/null +++ b/docs/ja/feature_pointing_device.md | |||
@@ -0,0 +1,49 @@ | |||
1 | # ポインティングデバイス :id=pointing-device | ||
2 | |||
3 | <!--- | ||
4 | original document: 0.8.182:docs/feature_pointing_device.md | ||
5 | git diff 0.8.182 HEAD -- docs/feature_pointing_device.md | cat | ||
6 | --> | ||
7 | |||
8 | ポインティングデバイスは汎用的な機能の総称です: システムポインタを移動します。マウスキーのような他のオプションも確かにありますが、これは簡単に変更可能で軽量であることを目指しています。機能を制御するためにカスタムキーを実装したり、他の周辺機器から情報を収集してここに直接挿入したりできます - QMK に処理を任せてください。 | ||
9 | |||
10 | ポインティングデバイスを有効にするには、rules.mk の以下の行のコメントを解除します: | ||
11 | |||
12 | ```makefile | ||
13 | POINTING_DEVICE_ENABLE = yes | ||
14 | ``` | ||
15 | |||
16 | マウスレポートを操作するために、以下の関数を使うことができます: | ||
17 | |||
18 | * `pointing_device_get_report()` - ホストコンピュータに送信された情報を表す現在の report_mouse_t を返します。 | ||
19 | * `pointing_device_set_report(report_mouse_t newMouseReport)` - ホストコンピュータに送信される report_mouse_t を上書き保存します。 | ||
20 | |||
21 | report_mouse_t (ここでは "mouseReport") が以下のプロパティを持つことを覚えておいてください: | ||
22 | |||
23 | * `mouseReport.x` - これは、x軸の動き(+ 右へ、- 左へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。 | ||
24 | * `mouseReport.y` - これは、y軸の動き(+ 上へ、- 下へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。 | ||
25 | * `mouseReport.v` - これは、垂直スクロール(+ 上へ、- 下へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。 | ||
26 | * `mouseReport.h` - これは、水平スクロール(+ 右へ、- 左へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。 | ||
27 | * `mouseReport.buttons` - これは uint8_t で、上位の5ビットを使っています。これらのビットはマウスボタンの状態を表します - ビット 3 はマウスボタン 5、ビット 7 はマウスボタン 1 です。 | ||
28 | |||
29 | マウスレポートが送信されると、x、y、v、h のいずれの値も 0 に設定されます (これは "pointing_device_send()" で行われます。この挙動を回避するためにオーバーライドすることができます)。このように、ボタンの状態は持続しますが、動きは1度だけ起こります。さらにカスタマイズするために、`pointing_device_init` と `pointing_device_task` のどちらもオーバーライドすることができます。 | ||
30 | |||
31 | 以下の例では、カスタムキーを使ってマウスをクリックし垂直および水平方向に127単位スクロールし、リリースされた時にそれを全て元に戻します - なぜならこれは完全に便利な機能だからです。いいですか、以下はひとつの例です: | ||
32 | |||
33 | ```c | ||
34 | case MS_SPECIAL: | ||
35 | report_mouse_t currentReport = pointing_device_get_report(); | ||
36 | if (record->event.pressed) { | ||
37 | currentReport.v = 127; | ||
38 | currentReport.h = 127; | ||
39 | currentReport.buttons |= MOUSE_BTN1; // this is defined in report.h | ||
40 | } else { | ||
41 | currentReport.v = -127; | ||
42 | currentReport.h = -127; | ||
43 | currentReport.buttons &= ~MOUSE_BTN1; | ||
44 | } | ||
45 | pointing_device_set_report(currentReport); | ||
46 | break; | ||
47 | ``` | ||
48 | |||
49 | マウスレポートは送信されるたびに 0 (ボタンを除く)に設定されることを思い出してください。そのため、スクロールはそれぞれの場合に1度だけ発生します。 | ||