Compare commits
114 Commits
Author | SHA1 | Date | |
---|---|---|---|
65c9da5a65 | |||
d1819f02df | |||
e1cdfdc0e7 | |||
97c18bfbc4 | |||
0e76b27661 | |||
bd4c66a26b | |||
7c57efaaf9 | |||
d4dc2a577f | |||
92839f8a09 | |||
907c1c64cf | |||
8b9e3e9979 | |||
6600f32d35 | |||
e9fa41631c | |||
91efcfb43a | |||
24f59c2d72 | |||
398a7e5b3f | |||
48db3ad6ef | |||
12b43f55d6 | |||
6d6340a82b | |||
67beec5e94 | |||
09a53d1aa3 | |||
4f9e5d4cde | |||
cf17a8eb95 | |||
207b17bc4d | |||
1baa99c647 | |||
e9e6054ee7 | |||
4e4a3449a7 | |||
7c17b87215 | |||
62ceb46e9d | |||
2c0201e80f | |||
51509ec07b | |||
b215bc3aba | |||
0928496220 | |||
a8904d47b7 | |||
32a47e7af4 | |||
b27c20d204 | |||
b87895dc12 | |||
2344b6865a | |||
3d45861216 | |||
e184da91a6 | |||
d36d5ecfad | |||
7baeaae9bb | |||
c85e010d45 | |||
097df6afdb | |||
6574ac52ad | |||
751a1789b5 | |||
ac7b1d0bf3 | |||
7369e195c2 | |||
30f4b4d763 | |||
9236c3a9d0 | |||
c2dd19de51 | |||
6d88794960 | |||
7a710fb426 | |||
c8b35b6230 | |||
995464cb9c | |||
45c73b13e1 | |||
9b85bd68a4 | |||
ce91b36c5d | |||
2521b970e5 | |||
598c392709 | |||
4d218566cc | |||
a4b2baa2ba | |||
4b80ee46f8 | |||
9b398a8f31 | |||
c30170b868 | |||
39b483ad32 | |||
88ebf92184 | |||
8d792cfb5f | |||
bd1b51cbd1 | |||
3028662fa3 | |||
aea2d6845a | |||
a502ce43c3 | |||
b0e30862d6 | |||
146873fd8e | |||
b3b617633c | |||
9ae8a45197 | |||
a8bb5840ad | |||
d353fcb99c | |||
f0bde7906d | |||
24b0cda3e8 | |||
1ab8f969f6 | |||
58af0305f5 | |||
c7cc20918b | |||
924573ece2 | |||
5f06fce2c5 | |||
4b13c49578 | |||
98642ca028 | |||
82dc8faaf3 | |||
0b09189087 | |||
3d6d899666 | |||
cb13dd0a33 | |||
af4bc251f9 | |||
e79fb2c26e | |||
3e0f8f9c8b | |||
b0a31f0bf3 | |||
a91034b802 | |||
2f85f6fbff | |||
32340e14fb | |||
b7da69ec85 | |||
f36112e957 | |||
30cdf9331a | |||
8252f378d9 | |||
d7f9e6fcf1 | |||
5c07363054 | |||
b6e9ef8dd1 | |||
e58ab6d326 | |||
02781979d6 | |||
69b484600f | |||
de79d55187 | |||
580cb2c1df | |||
d9eae3ef03 | |||
05e6cc2655 | |||
8b572de523 | |||
18e561b82c |
49
.github/workflows/info.yml
vendored
Normal file
49
.github/workflows/info.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: PR Lint keyboards
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'keyboards/**'
|
||||
|
||||
jobs:
|
||||
info:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: qmkfm/base_container
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Print info
|
||||
run: |
|
||||
git rev-parse --short HEAD
|
||||
echo ${{ github.event.pull_request.base.sha }}
|
||||
git diff --name-only ${{ github.event.pull_request.base.sha }}...
|
||||
|
||||
- name: Run qmk info
|
||||
shell: 'bash {0}'
|
||||
run: |
|
||||
QMK_CHANGES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}...)
|
||||
QMK_KEYBOARDS=$(qmk list-keyboards)
|
||||
|
||||
exit_code=0
|
||||
for KB in $QMK_KEYBOARDS; do
|
||||
KEYBOARD_CHANGES=$(echo "$QMK_CHANGES" | grep -E '^(keyboards/'${KB}'/)')
|
||||
if [[ -z "$KEYBOARD_CHANGES" ]]; then
|
||||
# skip as no changes for this keyboard
|
||||
continue
|
||||
fi
|
||||
|
||||
KEYMAP_ONLY=$(echo "$KEYBOARD_CHANGES" | grep -cv /keymaps/)
|
||||
if [[ $KEYMAP_ONLY -gt 0 ]]; then
|
||||
echo "linting ${KB}"
|
||||
|
||||
# TODO: info info always returns 0 - right now the only way to know failure is to inspect log lines
|
||||
qmk info -kb ${KB} 2>&1 | tee /tmp/$$
|
||||
!(grep -cq ☒ /tmp/$$)
|
||||
: $((exit_code = $exit_code + $?))
|
||||
fi
|
||||
done
|
||||
exit $exit_code
|
@ -144,7 +144,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 WS2812 custom
|
||||
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
||||
|
||||
LED_MATRIX_ENABLE ?= no
|
||||
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
||||
@ -205,6 +205,13 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3741)
|
||||
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3741.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
|
||||
OPT_DEFS += -DWS2812
|
||||
WS2812_DRIVER_REQUIRED := yes
|
||||
|
@ -61,4 +61,4 @@ This page describes my cool feature. You can use my cool feature to make coffee
|
||||
|KC_SUGAR||Order Sugar|
|
||||
```
|
||||
|
||||
Place your documentation into `docs/feature_<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_sidebar.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.
|
||||
Place your documentation into `docs/feature_<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_summary.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.
|
||||
|
@ -26,7 +26,7 @@ If your encoder's clockwise directions are incorrect, you can swap the A & B pad
|
||||
#define ENCODER_DIRECTION_FLIP
|
||||
```
|
||||
|
||||
Additionally, the resolution can be specified in the same file (the default & suggested is 4):
|
||||
Additionally, the resolution, which defines how many pulses the encoder registers between each detent, can be defined with:
|
||||
|
||||
```c
|
||||
#define ENCODER_RESOLUTION 4
|
||||
|
@ -19,7 +19,7 @@ These functions allow you to activate layers in various ways. Note that layers a
|
||||
|
||||
### Caveats :id=caveats
|
||||
|
||||
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-16, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only.
|
||||
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-15, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only.
|
||||
|
||||
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||
|
||||
|
@ -6,34 +6,34 @@ Macros allow you to send multiple keystrokes when pressing just one key. QMK has
|
||||
|
||||
## The New Way: `SEND_STRING()` & `process_record_user`
|
||||
|
||||
Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string (i.e. a sequence of characters) for you. All ASCII characters that are easily translated to a keycode are supported (e.g. `\n\t`).
|
||||
Sometimes you want a key to type out words or phrases. For the most common situations, we've provided `SEND_STRING()`, which will type out a string (i.e. a sequence of characters) for you. All ASCII characters that are easily translatable to a keycode are supported (e.g. `qmk 123\n\t`).
|
||||
|
||||
Here is an example `keymap.c` for a two-key keyboard:
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
QMKBEST = SAFE_RANGE,
|
||||
QMKBEST = SAFE_RANGE,
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
switch (keycode) {
|
||||
case QMKBEST:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKBEST is pressed
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
} else {
|
||||
// when keycode QMKBEST is released
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return true;
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKBEST is pressed
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
} else {
|
||||
// when keycode QMKBEST is released
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = {
|
||||
{QMKBEST, KC_ESC}
|
||||
}
|
||||
[0] = {
|
||||
{QMKBEST, KC_ESC},
|
||||
// ...
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
@ -49,42 +49,45 @@ You can do that by adding another keycode and adding another case to the switch
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
QMKBEST = SAFE_RANGE,
|
||||
QMKURL,
|
||||
MY_OTHER_MACRO
|
||||
QMKBEST = SAFE_RANGE,
|
||||
QMKURL,
|
||||
MY_OTHER_MACRO,
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
switch (keycode) {
|
||||
case QMKBEST:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKBEST is pressed
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
} else {
|
||||
// when keycode QMKBEST is released
|
||||
}
|
||||
break;
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKBEST is pressed
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
} else {
|
||||
// when keycode QMKBEST is released
|
||||
}
|
||||
break;
|
||||
|
||||
case QMKURL:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKURL is pressed
|
||||
SEND_STRING("https://qmk.fm/\n");
|
||||
} else {
|
||||
// when keycode QMKURL is released
|
||||
}
|
||||
break;
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKURL is pressed
|
||||
SEND_STRING("https://qmk.fm/\n");
|
||||
} else {
|
||||
// when keycode QMKURL is released
|
||||
}
|
||||
break;
|
||||
|
||||
case MY_OTHER_MACRO:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING(SS_LCTL("ac")); // selects all and copies
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING(SS_LCTL("ac")); // selects all and copies
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = {
|
||||
{MY_CUSTOM_MACRO, MY_OTHER_MACRO}
|
||||
}
|
||||
[0] = {
|
||||
{MY_CUSTOM_MACRO, MY_OTHER_MACRO},
|
||||
// ...
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
|
@ -186,8 +186,16 @@ All RGB keycodes are currently shared with the RGBLIGHT system:
|
||||
|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|
||||
|`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held|
|
||||
|`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held|
|
||||
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
|
||||
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
|
||||
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Full gradient scrolling left to right (uses the `RGB_MATRIX_CYCLE_LEFT_RIGHT` mode) |
|
||||
|`RGB_MODE_SWIRL` |`RGB_M_SW`|Full gradient spinning pinwheel around center of keyboard (uses `RGB_MATRIX_CYCLE_PINWHEEL` mode) |
|
||||
|
||||
* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
|
||||
* `RGB_MODE_*` keycodes will generally work, but not all of the modes are currently mapped to the correct effects for the RGB Matrix system.
|
||||
|
||||
`RGB_MODE_PLAIN`, `RGB_MODE_BREATHE`, `RGB_MODE_RAINBOW`, and `RGB_MATRIX_SWIRL` are the only ones that are mapped properly. The rest don't have a direct equivalent, and are not mapped.
|
||||
|
||||
!> By default, if you have both the [RGB Light](feature_rgblight.md) and the RGB Matrix feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.
|
||||
|
||||
## RGB Matrix Effects :id=rgb-matrix-effects
|
||||
|
||||
@ -385,6 +393,7 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
|
||||
#define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set
|
||||
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
|
||||
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
|
||||
#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
|
||||
```
|
||||
|
||||
## EEPROM storage :id=eeprom-storage
|
||||
|
@ -64,6 +64,9 @@ Changing the **Value** sets the overall brightness.<br>
|
||||
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|
||||
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |
|
||||
|
||||
!> By default, if you have both the RGB Light and the [RGB Matrix](feature_rgb_matrix.md) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
Your RGB lighting can be configured by placing these `#define`s in your `config.h`:
|
||||
@ -76,6 +79,7 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
|
||||
|`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level |
|
||||
|`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep|
|
||||
|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added|
|
||||
|`RGBLIGHT_DISABLE_KEYCODES`|*not defined*|If defined, disables the ability to control RGB Light from the keycodes. You must use code functions to control the feature|
|
||||
|
||||
## Effects and Animations
|
||||
|
||||
|
@ -2,11 +2,25 @@
|
||||
|
||||
Unicode characters can be input straight from your keyboard! There are some limitations, however.
|
||||
|
||||
QMK has three different methods for enabling Unicode input and defining keycodes:
|
||||
In order to enable Unicode support on your keyboard, you will need to do the following:
|
||||
|
||||
## Basic Unicode
|
||||
1. Choose one of three supported Unicode implementations: [Basic Unicode](#basic-unicode), [Unicode Map](#unicode-map), [UCIS](#ucis).
|
||||
2. Find which [input mode](#input-modes) is the best match for your operating system and setup.
|
||||
3. [Set](#setting-the-input-mode) the appropriate input mode (or modes) in your configuration.
|
||||
4. Add Unicode keycodes to your keymap.
|
||||
|
||||
This method supports Unicode code points up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji.
|
||||
|
||||
## 1. Methods :id=methods
|
||||
|
||||
QMK supports three different methods for enabling Unicode input and adding Unicode characters to your keymap. Each has its pros and cons in terms of flexibility and ease of use. Choose the one that best fits your use case.
|
||||
|
||||
The Basic method should be enough for most users. However, if you need a wider range of supported characters (including emoji, rare symbols etc.), you should use Unicode Map.
|
||||
|
||||
<br>
|
||||
|
||||
### 1.1. Basic Unicode :id=basic-unicode
|
||||
|
||||
The easiest to use method, albeit somewhat limited. It stores Unicode characters as keycodes in the keymap itself, so it only supports code points up to `0x7FFF`. This covers characters for most modern languages (including East Asian), as well as symbols, but it doesn't cover emoji.
|
||||
|
||||
Add the following to your `rules.mk`:
|
||||
|
||||
@ -14,11 +28,13 @@ Add the following to your `rules.mk`:
|
||||
UNICODE_ENABLE = yes
|
||||
```
|
||||
|
||||
Then add `UC(c)` keycodes to your keymap, where _c_ is the code point (preferably in hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`.
|
||||
Then add `UC(c)` keycodes to your keymap, where _c_ is the code point of the desired character (preferably in hexadecimal, up to 4 digits long). For example, `UC(0x40B)` will output [Ћ](https://unicode-table.com/en/040B/), and `UC(0x30C4)` will output [ツ](https://unicode-table.com/en/30C4).
|
||||
|
||||
## Unicode Map
|
||||
<br>
|
||||
|
||||
This method supports all possible code points (up to `0x10FFFF`); however, you need to maintain a separate mapping table in your keymap file, which may contain at most 16384 entries.
|
||||
### 1.2. Unicode Map :id=unicode-map
|
||||
|
||||
In addition to standard character ranges, this method also covers emoji, ancient scripts, rare symbols etc. In fact, all possible code points (up to `0x10FFFF`) are supported. Here, Unicode characters are stored in a separate mapping table. You need to maintain a `unicode_map` array in your keymap file, which may contain at most 16384 entries.
|
||||
|
||||
Add the following to your `rules.mk`:
|
||||
|
||||
@ -26,7 +42,7 @@ Add the following to your `rules.mk`:
|
||||
UNICODEMAP_ENABLE = yes
|
||||
```
|
||||
|
||||
Then add `X(i)` keycodes to your keymap, where _i_ is an array index into the mapping table:
|
||||
Then add `X(i)` keycodes to your keymap, where _i_ is the desired character's index in the mapping table. This can be a numeric value, but it's recommended to keep the indices in an enum and access them by name.
|
||||
|
||||
```c
|
||||
enum unicode_names {
|
||||
@ -44,15 +60,17 @@ const uint32_t PROGMEM unicode_map[] = {
|
||||
|
||||
Then you can use `X(BANG)`, `X(SNEK)` etc. in your keymap.
|
||||
|
||||
### Lower and Upper Case
|
||||
#### Lower and Upper Case
|
||||
|
||||
Characters often come in lower and upper case pairs, such as å and Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear.
|
||||
|
||||
This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP()`. This helps blend Unicode keys in with regular alphas.
|
||||
|
||||
Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L40) function. This also allows you to, say, check Ctrl instead of Shift/Caps.
|
||||
Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L36) function. This also allows you to, say, check Ctrl instead of Shift/Caps.
|
||||
|
||||
## UCIS
|
||||
<br>
|
||||
|
||||
### 1.3. UCIS :id=ucis
|
||||
|
||||
This method also supports all possible code points. As with the Unicode Map method, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you have to create a custom keycode or function that invokes this functionality.
|
||||
|
||||
@ -77,7 +95,7 @@ By default, each table entry may be up to 3 code points long. This number can be
|
||||
|
||||
To use UCIS input, call `qk_ucis_start()`. Then, type the mnemonic for the character (such as "rofl") and hit Space, Enter or Esc. QMK should erase the "rofl" text and insert the laughing emoji.
|
||||
|
||||
### Customization
|
||||
#### Customization
|
||||
|
||||
There are several functions that you can define in your keymap to customize the functionality of this feature.
|
||||
|
||||
@ -87,7 +105,8 @@ There are several functions that you can define in your keymap to customize the
|
||||
|
||||
You can find the default implementations of these functions in [`process_ucis.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c).
|
||||
|
||||
## Input Modes
|
||||
|
||||
## 2. Input Modes :id=input-modes
|
||||
|
||||
Unicode input in QMK works by inputting a sequence of characters to the OS, sort of like a macro. Unfortunately, the way this is done differs for each platform. Specifically, each platform requires a different combination of keys to trigger Unicode input. Therefore, a corresponding input mode has to be set in QMK.
|
||||
|
||||
@ -96,54 +115,67 @@ The following input modes are available:
|
||||
* **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0x10FFFF` (all possible code points).
|
||||
|
||||
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
|
||||
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with another keycode.
|
||||
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with a different keycode.
|
||||
|
||||
!> Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as Option + Left Arrow and Option + Right Arrow.
|
||||
!> Using the _Unicode Hex Input_ input source may disable some Option-based shortcuts, such as Option+Left and Option+Right.
|
||||
|
||||
!> `UC_OSX` is a deprecated alias of `UC_MAC` that will be removed in a future version of QMK.
|
||||
!> `UC_OSX` is a deprecated alias of `UC_MAC` that will be removed in future versions of QMK. All new keymaps should use `UC_MAC`.
|
||||
|
||||
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
|
||||
|
||||
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
||||
By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with another keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E.
|
||||
By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with a different keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E.
|
||||
|
||||
* **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`.
|
||||
|
||||
To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards.
|
||||
To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards.
|
||||
This mode is not recommended because of reliability and compatibility issues; use the `UC_WINC` mode instead.
|
||||
|
||||
* **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues).
|
||||
|
||||
* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.9.0, supports code points up to `0x10FFFF` (all possible code points).
|
||||
|
||||
To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. Works reliably under all version of Windows supported by the app.
|
||||
By default, this mode uses right Alt (`KC_RALT`) as the Compose key, but this can be changed in the WinCompose settings and by defining [`UNICODE_KEY_WINC`](#input-key-configuration) with another keycode.
|
||||
To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. This mode works reliably under all version of Windows supported by the app.
|
||||
By default, this mode uses right Alt (`KC_RALT`) as the Compose key, but this can be changed in the WinCompose settings and by defining [`UNICODE_KEY_WINC`](#input-key-configuration) with a different keycode.
|
||||
|
||||
### Switching Input Modes
|
||||
|
||||
There are two ways to set the input mode for Unicode: by keycode or by function. Keep in mind that both methods write to persistent storage (EEPROM), and are loaded each time the keyboard starts. So once you've set it the first time, you don't need to set it again unless you want to change it, or you've reset the EEPROM settings.
|
||||
## 3. Setting the Input Mode :id=setting-the-input-mode
|
||||
|
||||
You can switch the input mode at any time by using one of the following keycodes. The easiest way is to add the ones you use to your keymap.
|
||||
|
||||
|Keycode |Alias |Input Mode |Description |
|
||||
|----------------------|---------|------------|--------------------------------------------------------------|
|
||||
|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|[Cycle](#input-mode-cycling) through selected modes |
|
||||
|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|[Cycle](#input-mode-cycling) through selected modes in reverse|
|
||||
|`UNICODE_MODE_MAC` |`UC_M_MA`|`UC_MAC` |Switch to macOS input |
|
||||
|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input |
|
||||
|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input |
|
||||
|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented) |
|
||||
|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose |
|
||||
|
||||
You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). Since the function only needs to be called once, it's recommended that you do it in `eeconfig_init_user()` (or a similar function). For example:
|
||||
To set your desired input mode, add the following define to your `config.h`:
|
||||
|
||||
```c
|
||||
void eeconfig_init_user(void) {
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
}
|
||||
#define UNICODE_SELECTED_MODES UC_LNX
|
||||
```
|
||||
|
||||
### Audio Feedback
|
||||
This example sets the board's default input mode to `UC_LNX`. You can replace this with `UC_MAC`, `UC_WINC`, or any of the other modes listed [above](#input-modes). The board will automatically use the selected mode on startup, unless you manually switch to another mode (see [below](#keycodes)).
|
||||
|
||||
You can also select multiple input modes, which allows you to easily cycle through them using the `UC_MOD`/`UC_RMOD` keycodes.
|
||||
|
||||
```c
|
||||
#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WINC
|
||||
```
|
||||
|
||||
Note that the values are separated by commas. The board will remember the last used input mode and will continue using it on next power-up. You can disable this and force it to always start with the first mode in the list by adding `#define UNICODE_CYCLE_PERSIST false` to your `config.h`.
|
||||
|
||||
#### Keycodes
|
||||
|
||||
You can switch the input mode at any time by using the following keycodes. Adding these to your keymap allows you to quickly switch to a specific input mode, including modes not listed in `UNICODE_SELECTED_MODES`.
|
||||
|
||||
|Keycode |Alias |Input Mode |Description |
|
||||
|----------------------|---------|------------|-----------------------------------------------------------------------------|
|
||||
|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|Cycle through selected modes, reverse direction when Shift is held |
|
||||
|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|Cycle through selected modes in reverse, forward direction when Shift is held|
|
||||
|`UNICODE_MODE_MAC` |`UC_M_MA`|`UC_MAC` |Switch to macOS input |
|
||||
|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input |
|
||||
|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input |
|
||||
|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input _(not implemented)_ |
|
||||
|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose |
|
||||
|
||||
You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`).
|
||||
|
||||
?> Using `UNICODE_SELECTED_MODES` is preferable to calling `set_unicode_input_mode()` in `matrix_init_user()` or similar functions, since it's better integrated into the Unicode system and has the added benefit of avoiding unnecessary writes to EEPROM.
|
||||
|
||||
#### Audio Feedback
|
||||
|
||||
If you have the [Audio feature](feature_audio.md) enabled on the board, you can set melodies to be played when you press the above keys. That way you can have some audio feedback when switching input modes.
|
||||
|
||||
@ -157,20 +189,21 @@ For instance, you can add these definitions to your `config.h` file:
|
||||
#define UNICODE_SONG_WINC UNICODE_WINDOWS
|
||||
```
|
||||
|
||||
### Additional Customization
|
||||
|
||||
## Additional Customization
|
||||
|
||||
Because Unicode is a large and versatile feature, there are a number of options you can customize to make it work better on your system.
|
||||
|
||||
#### Start and Finish Input Functions
|
||||
### Start and Finish Input Functions
|
||||
|
||||
The functions for starting and finishing Unicode input on your platform can be overridden locally. Possible uses include customizing input mode behavior if you don't use the default keys, or adding extra visual/audio feedback to Unicode input.
|
||||
|
||||
* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it presses Ctrl+Shift+U on Linux and holds the Option key on macOS.
|
||||
* `void unicode_input_finish(void)` – This is called to exit Unicode input mode, for example by pressing Space or releasing the Option key.
|
||||
* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it holds the left Alt key followed by Num+ on Windows, and presses the `UNICODE_KEY_LNX` combination (default: Ctrl+Shift+U) on Linux.
|
||||
* `void unicode_input_finish(void)` – This is called to exit Unicode input mode, for example by pressing Space or releasing the Alt key.
|
||||
|
||||
You can find the default implementations of these functions in [`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c).
|
||||
|
||||
#### Input Key Configuration
|
||||
### Input Key Configuration
|
||||
|
||||
You can customize the keys used to trigger Unicode input for macOS, Linux and WinCompose by adding corresponding defines to your `config.h`. The default values match the platforms' default settings, so you shouldn't need to change this unless Unicode input isn't working, or you want to use a different key (e.g. in order to free up left or right Alt).
|
||||
|
||||
@ -180,54 +213,47 @@ You can customize the keys used to trigger Unicode input for macOS, Linux and Wi
|
||||
|`UNICODE_KEY_LNX` |`uint16_t`|`LCTL(LSFT(KC_U))`|`#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))`|
|
||||
|`UNICODE_KEY_WINC`|`uint8_t` |`KC_RALT` |`#define UNICODE_KEY_WINC KC_RGUI` |
|
||||
|
||||
#### Input Mode Cycling
|
||||
|
||||
You can choose which input modes are available for cycling through. By default, this is disabled. If you want to enable it, limiting it to just the modes you use makes sense. Note that the values in the list are comma-delimited.
|
||||
## Sending Unicode Strings
|
||||
|
||||
```c
|
||||
#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WIN, UC_WINC
|
||||
```
|
||||
QMK provides several functions that allow you to send Unicode input to the host programmatically:
|
||||
|
||||
You can cycle through the selected modes by using the `UC_MOD`/`UC_RMOD` keycodes, or by calling `cycle_unicode_input_mode(offset)` in your code (`offset` is how many modes to move forward by, so +1 corresponds to `UC_MOD`).
|
||||
### `send_unicode_string()`
|
||||
|
||||
By default, when the keyboard boots, it will initialize the input mode to the last one you used. You can disable this and make it start with the first mode in the list every time by adding the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define UNICODE_CYCLE_PERSIST false
|
||||
```
|
||||
|
||||
!> Using `UNICODE_SELECTED_MODES` means you don't have to initially set the input mode in `matrix_init_user()` (or a similar function); the Unicode system will do that for you on startup. This has the added benefit of avoiding unnecessary writes to EEPROM.
|
||||
|
||||
## `send_unicode_string()`
|
||||
|
||||
This function is much like `send_string()` but allows you to input UTF-8 characters directly, and supports all code points (provided the selected input method also supports it). Make sure your `keymap.c` is formatted in UTF-8 encoding.
|
||||
This function is much like `send_string()`, but it allows you to input UTF-8 characters directly. It supports all code points, provided the selected input mode also supports it. Make sure your `keymap.c` file is formatted using UTF-8 encoding.
|
||||
|
||||
```c
|
||||
send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
|
||||
```
|
||||
|
||||
## `send_unicode_hex_string()`
|
||||
Example uses include sending Unicode strings when a key is pressed, as described in [Macros](feature_macros.md).
|
||||
|
||||
Similar to `send_unicode_string()`, but the characters are represented by their code point values in ASCII, separated by spaces. For example, the table flip above would be achieved with:
|
||||
### `send_unicode_hex_string()`
|
||||
|
||||
Similar to `send_unicode_string()`, but the characters are represented by their Unicode code points, written in hexadecimal and separated by spaces. For example, the table flip above would be achieved with:
|
||||
|
||||
```c
|
||||
send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
|
||||
```
|
||||
|
||||
An easy way to convert your Unicode string to this format is by using [this site](https://r12a.github.io/app-conversion/), and taking the result in the "Hex/UTF-32" section.
|
||||
An easy way to convert your Unicode string to this format is to use [this site](https://r12a.github.io/app-conversion/) and take the result in the "Hex/UTF-32" section.
|
||||
|
||||
|
||||
## Additional Language Support
|
||||
|
||||
In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware.
|
||||
In `quantum/keymap_extras`, you'll see various language files — these work the same way as the ones for alternative layouts such as Colemak or BÉPO. When you include one of these language headers, you gain access to keycodes specific to that language / national layout. Such keycodes are defined by a 2-letter country/language code, followed by an underscore and a 4-letter abbreviation of the character to which the key corresponds. For example, including `keymap_french.h` and using `FR_UGRV` in your keymap will output `ù` when typed on a system with a native French AZERTY layout.
|
||||
|
||||
If the primary system layout you use on your machine is different from US ANSI, using these language-specific keycodes can help your QMK keymaps better match what will actually be output on the screen. However, keep in mind that these keycodes are just aliases for the corresponding default US keycodes under the hood, and that the HID protocol used by keyboards is itself inherently based on US ANSI.
|
||||
|
||||
|
||||
## International Characters on Windows
|
||||
|
||||
### AutoHotkey allows Windows users to create custom hotkeys among others.
|
||||
### AutoHotkey
|
||||
|
||||
The method does not require Unicode support in the keyboard itself but depends instead of [AutoHotkey](https://autohotkey.com) running in the background.
|
||||
The method does not require Unicode support in the keyboard itself but instead depends on [AutoHotkey](https://autohotkey.com) running in the background.
|
||||
|
||||
First you need to select a modifier combination that is not in use by any of your programs.
|
||||
CtrlAltWin is not used very widely and should therefore be perfect for this.
|
||||
Ctrl+Alt+Win is not used very widely and should therefore be perfect for this.
|
||||
There is a macro defined for a mod-tab combo `LCAG_T`.
|
||||
Add this mod-tab combo to a key on your keyboard, e.g.: `LCAG_T(KC_TAB)`.
|
||||
This makes the key behave like a tab key if pressed and released immediately but changes it to the modifier if used with another key.
|
||||
@ -242,8 +268,5 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
|
||||
|
||||
### US International
|
||||
|
||||
If you enable the US International layout on the system, it will use punctuation to accent the characters.
|
||||
|
||||
For instance, typing "\`a" will result in à.
|
||||
|
||||
If you enable the US International layout on the system, it will use punctuation to accent the characters. For instance, typing "\`a" will result in à.
|
||||
You can find details on how to enable this [here](https://support.microsoft.com/en-us/help/17424/windows-change-keyboard-layout).
|
||||
|
@ -106,7 +106,7 @@
|
||||
* [Velocikey](ja/feature_velocikey.md)
|
||||
|
||||
* QMK の開発
|
||||
* 破壊的な変更
|
||||
* 互換性を破る変更/Breaking changes
|
||||
* [概要](ja/breaking_changes.md)
|
||||
* [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md)
|
||||
* 履歴
|
||||
|
120
docs/ja/breaking_changes.md
Normal file
120
docs/ja/breaking_changes.md
Normal file
@ -0,0 +1,120 @@
|
||||
# Breaking changes/互換性を破る変更
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.9.0:docs/breaking_changes.md
|
||||
git diff 0.9.0 HEAD -- docs/breaking_changes.md | cat
|
||||
-->
|
||||
|
||||
このドキュメントは QMK の互換性を破る変更(Breaking change) のプロセスについて説明します。
|
||||
互換性を破る変更とは、互換性がなかったり潜在的な危険が生じるように QMK の動作を変える変更を指します。
|
||||
ユーザが QMK ツリーを更新しても自分のキーマップが壊れない事を確信できるように、これらの変更を制限します。(訳注:以後、原文のまま Breaking change を用語として使用します。)
|
||||
|
||||
Breaking change ピリオドとは、危険な変更、または予想外の変更を QMK へ行なう PR をマージする時のことです。
|
||||
付随するテスト期間があるため、問題が起きることはまれか、有りえないと確信しています。
|
||||
|
||||
## 過去の Breaking change には何が含まれますか?
|
||||
|
||||
* [2020年5月30日](ja/ChangeLog/20200530.md)
|
||||
* [2020年2月29日](ja/ChangeLog/20200229.md)
|
||||
* [2019年8月30日](ja/ChangeLog/20190830.md)
|
||||
|
||||
## 次の Breaking change はいつですか?
|
||||
|
||||
次の Breaking change は2020年8月29日に予定されています。
|
||||
|
||||
### 重要な日付
|
||||
|
||||
* [x] 2020年 5月30日 - `develop` が作成されました。毎週リベースされます。
|
||||
* [ ] 2020年 8月 1日 - `develop` は新しいPRを取り込みません。
|
||||
* [ ] 2020年 8月 1日 - テスターの募集。
|
||||
* [ ] 2020年 8月27日 - `master`がロックされ、PR はマージされません。
|
||||
* [ ] 2020年 8月29日 - `develop` を `master` にマージします。
|
||||
* [ ] 2020年 8月29日 - `master` のロックが解除されます。PR を再びマージすることができます。
|
||||
|
||||
## どのような変更が含まれますか?
|
||||
|
||||
最新の Breaking change 候補を見るには、[`breaking_change` ラベル](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr)を参照してください。
|
||||
現在から `develop` が閉じられるまでの間に新しい変更が追加される可能性があり、そのラベルが適用された PR はマージされることは保証されていません。
|
||||
|
||||
このラウンドに、あなたの Breaking change を含めたい場合は、`breaking_change` ラベルを持つ PR を作成し、`develop` が閉じる前に承認してもらう必要があります。
|
||||
`develop` が閉じた後は、新しい Breaking change は受け付けられません。
|
||||
|
||||
受け入れの基準:
|
||||
|
||||
* PR が完了し、マージの準備ができている
|
||||
* PR が ChangeLog を持つ
|
||||
|
||||
# チェックリスト
|
||||
|
||||
ここでは、Breaking change プロセスを実行する時に使用する様々なプロセスについて説明します。
|
||||
|
||||
## `master` から `develop` をリベースします
|
||||
|
||||
これは `develop` が開いている間、毎週金曜日に実行されます。
|
||||
|
||||
プロセス:
|
||||
|
||||
```
|
||||
cd qmk_firmware
|
||||
git checkout master
|
||||
git pull --ff-only
|
||||
git checkout develop
|
||||
git rebase master
|
||||
git push --force
|
||||
```
|
||||
|
||||
## `develop` ブランチの作成
|
||||
|
||||
以前の `develop` ブランチがマージされた直後に、これが発生します。
|
||||
|
||||
* `qmk_firmware` git commands
|
||||
* [ ] `git checkout master`
|
||||
* [ ] `git pull --ff-only`
|
||||
* [ ] `git checkout -b develop`
|
||||
* [ ] Edit `readme.md`
|
||||
* [ ] これがテストブランチであることを上部に大きな通知で追加します。
|
||||
* [ ] このドキュメントへのリンクを含めます
|
||||
* [ ] `git commit -m 'Branch point for <DATE> Breaking Change'`
|
||||
* [ ] `git tag breakpoint_<YYYY>_<MM>_<DD>`
|
||||
* [ ] `git tag <next_version>` # ブレーキング ポイント タグがバージョンの増分を混乱させないようにします
|
||||
* [ ] `git push origin develop`
|
||||
* [ ] `git push --tags`
|
||||
|
||||
## マージの 4 週間前
|
||||
|
||||
* `develop` は新しい PR に対して閉じられ、現在の PR の修正のみがマージされる可能性があります。
|
||||
* テスターの呼び出しを投稿します
|
||||
* [ ] Discord
|
||||
* [ ] GitHub PR
|
||||
* [ ] https://reddit.com/r/olkb
|
||||
|
||||
## マージの 1 週間前
|
||||
|
||||
* master が < 2 日前> から <マージの日> まで閉じられることを発表します
|
||||
* [ ] Discord
|
||||
* [ ] GitHub PR
|
||||
* [ ] https://reddit.com/r/olkb
|
||||
|
||||
## マージの 2 日前
|
||||
|
||||
* master が 2 日間閉じられることを発表します
|
||||
* [ ] Discord
|
||||
* [ ] GitHub PR
|
||||
* [ ] https://reddit.com/r/olkb
|
||||
|
||||
## マージの日
|
||||
|
||||
* `qmk_firmware` git commands
|
||||
* [ ] `git checkout develop`
|
||||
* [ ] `git pull --ff-only`
|
||||
* [ ] `git rebase origin/master`
|
||||
* [ ] Edit `readme.md`
|
||||
* [ ] `develop` についてのメモを削除
|
||||
* [ ] ChangeLog を 1 つのファイルにまとめます。
|
||||
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
|
||||
* [ ] `git push origin develop`
|
||||
* GitHub Actions
|
||||
* [ ] `develop`の PR を作成します
|
||||
* [ ] travis がクリーンに戻ったことを確認します
|
||||
* [ ] `develop` PR をマージします
|
51
docs/ja/breaking_changes_instructions.md
Normal file
51
docs/ja/breaking_changes_instructions.md
Normal file
@ -0,0 +1,51 @@
|
||||
# breaking changes/互換性を破る変更: プルリクエストにフラグが付けられた
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.9.0:docs/breaking_changes_instructions.md
|
||||
git diff 0.9.0 HEAD -- docs/breaking_changes_instructions.md | cat
|
||||
-->
|
||||
|
||||
QMK のメンバーがあなたのプルリクエストに返信し、あなたの提出したものは Breaking change (互換性を破る変更) であると述べている場合があります。メンバーの判断では、あなたが提案した変更は QMK やその利用者にとってより大きな影響を持つと考えられます。
|
||||
|
||||
プルリクエストにフラグが立てられる原因となるものには、以下のようなものがあります:
|
||||
|
||||
- **ユーザーのキーマップに対する編集**
|
||||
ユーザーが自分のキーマップを QMK に提出した後、しばらくしてさらに更新してプルリクエストを開いたところ、それが `qmk/qmk_firmware` リポジトリで編集されていたためにマージできなかったことに気づくことがあるかもしれません。すべてのユーザーが Git や GitHub を使いこなせるわけではないので、ユーザー自身で問題を修正できないことに気づくかもしれません。
|
||||
- **期待される動作の変更**
|
||||
QMK の動作を変更すると、既存の QMK 機能への変更を組み込んだ新しいファームウェアをフラッシュした場合、ユーザはハードウェアまたは QMK が壊れていると考え、希望する動作を復元する手段がないことに気付くことがあります。
|
||||
- **ユーザーのアクションを必要とする変更**
|
||||
変更には、ツールチェインを更新したり、Git で何らかのアクションを取るなど、ユーザーがアクションを行う必要がある場合もあります。
|
||||
- **精査が必要な変更**
|
||||
時には、投稿がプロジェクトとしての QMK に影響を与えることもあります。これは、著作権やライセンスの問題、コーディング規約、大規模な機能のオーバーホール、コミュニティによるより広範なテストを必要とする「リスクの高い」変更、あるいは全く別のものである可能性があります。
|
||||
- **エンドユーザーとのコミュニケーションを必要とする変更**
|
||||
これには、将来の非推奨化への警告、時代遅れの慣習、その他伝えなければならないが上記のカテゴリのどれかに当てはまらないものが含まれます。
|
||||
|
||||
## 何をすればいいのか?
|
||||
|
||||
提出したものが Breaking change だと判断された場合、手続きをスムーズに進めるためにできることがいくつかあります。
|
||||
|
||||
### PR を分割することを検討する
|
||||
|
||||
あなたがコアコードを投稿していて、それが Breaking change プロセスを経る必要がある唯一の理由が、あなたの変更に合わせてキーマップを更新していることである場合、古いキーマップが機能し続けるような方法であなたの機能を投稿できるかどうかを検討してください。
|
||||
そののち、Breaking change プロセスを経て古いコードを削除する別の PR を提出してください。
|
||||
|
||||
### ChangeLog エントリの提供
|
||||
|
||||
Breaking change プロセスを経て提出する際には、変更ログのエントリを含めることを我々は要請します。
|
||||
エントリーは、あなたのプルリクエストが行う変更の短い要約としてください – [ここの各セクションは changelog として開始されました](ja/ChangeLog/20190830.md "n.b. This should link to the 2019 Aug 30 Breaking Changes doc - @noroadsleft")。
|
||||
|
||||
変更ログは `docs/ChangeLog/YYYYMMDD/PR####.md` に置いてください。
|
||||
ここで、`YYYYMMDD` は QMK の breaking change ブランチ – 通常は `develop` という名称 – が `master` ブランチにマージされる日付、`####` はプルリクエストの番号です。
|
||||
|
||||
ユーザー側でのアクションを必要とする場合、あなたの変更ログは、どのようなアクションを取らなければならないかをユーザーに指示するか、そのようなアクションを指示する場所にリンクする必要があります。
|
||||
|
||||
### 変更点を文書化する
|
||||
|
||||
提出物の目的を理解し、それが必要とする可能性のある意味合いやアクションを理解することで、レビュープロセスをより簡単にすることができます。この目的のためには変更履歴で十分かもしれませんが、より広範囲の変更を行う場合には、変更履歴には不向きな詳細レベルが必要になるかもしれません。
|
||||
|
||||
あなたのプルリクエストにコメントしたり、質問やコメント、変更要求に対応したりすることは、非常にありがたいことです。
|
||||
|
||||
### 助けを求める
|
||||
|
||||
あなたの提出物にフラグが立ったことで、あなたはびっくりしてしまったかもしれません。もし、あなた自身が脅されたり、圧倒されたりしていると感じたら、私たちに知らせてください。プルリクエストにコメントするか、[Discord で QMK チームに連絡を取ってください](https://discord.gg/Uq7gcHh)。
|
@ -1,8 +1,8 @@
|
||||
# QMK CLI :id=qmk-cli
|
||||
|
||||
<!---
|
||||
original document: 0.8.58:docs/cli.md
|
||||
git diff 0.8.58 HEAD -- docs/cli.md | cat
|
||||
original document: 0.9.19:docs/cli.md
|
||||
git diff 0.9.19 HEAD -- docs/cli.md | cat
|
||||
-->
|
||||
|
||||
## 概要 :id=overview
|
||||
@ -11,25 +11,24 @@ QMK CLI を使用すると QMK キーボードの構築と作業が簡単にな
|
||||
|
||||
### 必要事項 :id=requirements
|
||||
|
||||
CLI は Python 3.5 以上を必要とします。我々は必要事項の数を少なくしようとしていますが、[`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) に列挙されているパッケージもインストールする必要があります。これらは QMK CLI をインストールするときに自動的にインストールされます。
|
||||
QMK は Python 3.6 以上を必要とします。我々は必要事項の数を少なくしようとしていますが、[`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) に列挙されているパッケージもインストールする必要があります。これらは QMK CLI をインストールするときに自動的にインストールされます。
|
||||
|
||||
### Homebrew を使ったインストール (macOS、いくつかの Linux) :id=install-using-homebrew
|
||||
|
||||
[Homebrew](https://brew.sh) をインストールしている場合は、タップして QMK をインストールすることができます:
|
||||
|
||||
```
|
||||
brew tap qmk/qmk
|
||||
brew install qmk
|
||||
brew install qmk/qmk/qmk
|
||||
export QMK_HOME='~/qmk_firmware' # オプション、`qmk_firmware` の場所を設定します
|
||||
qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします
|
||||
```
|
||||
|
||||
### easy_install あるいは pip を使ってインストール :id=install-using-easy_install-or-pip
|
||||
### pip を使ってインストール :id=install-using-easy_install-or-pip
|
||||
|
||||
上のリストにあなたのシステムがない場合は、QMK を手動でインストールすることができます。最初に、python 3.5 (以降)をインストールしていて、pip をインストールしていることを確認してください。次に以下のコマンドを使って QMK をインストールします:
|
||||
上で列挙した中にあなたのシステムがない場合は、QMK を手動でインストールすることができます。最初に、python 3.6 (以降)をインストールしていて、pip をインストールしていることを確認してください。次に以下のコマンドを使って QMK をインストールします:
|
||||
|
||||
```
|
||||
pip3 install qmk
|
||||
python3 -m pip install qmk
|
||||
export QMK_HOME='~/qmk_firmware' # オプション、`qmk_firmware` の場所を設定します
|
||||
qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします
|
||||
```
|
||||
|
@ -1,48 +1,18 @@
|
||||
# QMK CLI コマンド
|
||||
|
||||
<!---
|
||||
original document: 0.8.58:docs/cli.md
|
||||
git diff 0.8.58 HEAD -- docs/cli.md | cat
|
||||
original document: 0.9.19:docs/cli_command.md
|
||||
git diff 0.9.19 HEAD -- docs/cli_command.md | cat
|
||||
-->
|
||||
|
||||
# CLI コマンド
|
||||
|
||||
## `qmk cformat`
|
||||
|
||||
このコマンドは clang-format を使って C コードを整形します。
|
||||
|
||||
引数無しで実行すると、変更された全てのコアコードを整形します。デフォルトでは `git diff` で `origin/master` をチェックし、ブランチは `-b <branch_name>` を使って変更できます。
|
||||
|
||||
`-a` で全てのコアコードを整形するか、コマンドラインでファイル名を渡して特定のファイルに対して実行します。
|
||||
|
||||
**指定したファイルに対する使い方**:
|
||||
|
||||
```
|
||||
qmk cformat [file1] [file2] [...] [fileN]
|
||||
```
|
||||
|
||||
**全てのコアファイルに対する使い方**:
|
||||
|
||||
```
|
||||
qmk cformat -a
|
||||
```
|
||||
|
||||
**origin/master で変更されたファイルのみに対する使い方**:
|
||||
|
||||
```
|
||||
qmk cformat
|
||||
```
|
||||
|
||||
**branch_name で変更されたファイルのみに対する使い方**:
|
||||
|
||||
```
|
||||
qmk cformat -b branch_name
|
||||
```
|
||||
# ユーザー用コマンド
|
||||
|
||||
## `qmk compile`
|
||||
|
||||
このコマンドにより、任意のディレクトリからファームウェアをコンパイルすることができます。<https://config.qmk.fm> からエクスポートした JSON をコンパイルするか、リポジトリ内でキーマップをコンパイルするか、現在の作業ディレクトリでキーボードをコンパイルすることができます。
|
||||
|
||||
このコマンドはディレクトリを認識します。キーボードやキーマップのディレクトリにいる場合、自動的に KEYBOARD や KEYMAP を入力します。
|
||||
|
||||
**Configurator Exports での使い方**:
|
||||
|
||||
```
|
||||
@ -113,6 +83,8 @@ $ qmk compile -kb dz60
|
||||
このコマンドは `qmk compile` に似ていますが、ブートローダを対象にすることもできます。ブートローダはオプションで、デフォルトでは `:flash` に設定されています。
|
||||
違うブートローダを指定するには、`-bl <bootloader>` を使ってください。利用可能なブートローダの詳細については、[ファームウェアを書き込む](ja/flashing.md)を見てください。
|
||||
|
||||
このコマンドはディレクトリを認識します。キーボードやキーマップのディレクトリにいる場合、自動的に KEYBOARD や KEYMAP を入力します。
|
||||
|
||||
**Configurator Exports での使い方**:
|
||||
|
||||
```
|
||||
@ -141,16 +113,6 @@ qmk flash -b
|
||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||
```
|
||||
|
||||
## `qmk docs`
|
||||
|
||||
このコマンドは、ドキュメントを参照または改善するために使うことができるローカル HTTP サーバを起動します。デフォルトのポートは 8936 です。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk docs [-p PORT]
|
||||
```
|
||||
|
||||
## `qmk doctor`
|
||||
|
||||
このコマンドは環境を調査し、潜在的なビルドあるいは書き込みの問題について警告します。必要に応じてそれらの多くを修正できます。
|
||||
@ -175,6 +137,32 @@ qmk doctor [-y] [-n]
|
||||
|
||||
qmk doctor -n
|
||||
|
||||
## `qmk info`
|
||||
|
||||
QMK のキーボードやキーマップに関する情報を表示します。キーボードに関する情報を取得したり、レイアウトを表示したり、基礎となるキーマトリックスを表示したり、JSON キーマップをきれいに印刷したりするのに使用できます。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk info [-f FORMAT] [-m] [-l] [-km KEYMAP] [-kb KEYBOARD]
|
||||
```
|
||||
|
||||
このコマンドはディレクトリを認識します。キーボードやキーマップのディレクトリにいる場合、自動的に KEYBOARD や KEYMAP を入力します。
|
||||
|
||||
**例**:
|
||||
|
||||
キーボードの基本情報を表示する:
|
||||
|
||||
qmk info -kb planck/rev5
|
||||
|
||||
キーボードのマトリクスを表示する:
|
||||
|
||||
qmk info -kb ergodox_ez -m
|
||||
|
||||
キーボードの JSON キーマップを表示する:
|
||||
|
||||
qmk info -kb clueboard/california -km default
|
||||
|
||||
## `qmk json2c`
|
||||
|
||||
QMK Configurator からエクスポートしたものから keymap.c を生成します。
|
||||
@ -185,6 +173,86 @@ QMK Configurator からエクスポートしたものから keymap.c を生成
|
||||
qmk json2c [-o OUTPUT] filename
|
||||
```
|
||||
|
||||
## `qmk list-keyboards`
|
||||
|
||||
このコマンドは現在 `qmk_firmware` で定義されている全てのキーボードを列挙します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk list-keyboards
|
||||
```
|
||||
|
||||
## `qmk list-keymaps`
|
||||
|
||||
このコマンドは指定されたキーボード(とリビジョン)の全てのキーマップを列挙します。
|
||||
|
||||
このコマンドはディレクトリを認識します。キーボードのディレクトリにいる場合、自動的に KEYBOARD を入力します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk list-keymaps -kb planck/ez
|
||||
```
|
||||
|
||||
## `qmk new-keymap`
|
||||
|
||||
このコマンドは、キーボードの既存のデフォルトのキーマップに基づいて新しいキーマップを作成します。
|
||||
|
||||
このコマンドはディレクトリを認識します。キーボードやキーマップのディレクトリにいる場合、自動的に KEYBOARD や KEYMAP を入力します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# 開発者用コマンド
|
||||
|
||||
## `qmk cformat`
|
||||
|
||||
このコマンドは clang-format を使って C コードを整形します。
|
||||
|
||||
引数無しで実行すると、変更された全てのコアコードを整形します。デフォルトでは `git diff` で `origin/master` をチェックし、ブランチは `-b <branch_name>` を使って変更できます。
|
||||
|
||||
`-a` で全てのコアコードを整形するか、コマンドラインでファイル名を渡して特定のファイルに対して実行します。
|
||||
|
||||
**指定したファイルに対する使い方**:
|
||||
|
||||
```
|
||||
qmk cformat [file1] [file2] [...] [fileN]
|
||||
```
|
||||
|
||||
**全てのコアファイルに対する使い方**:
|
||||
|
||||
```
|
||||
qmk cformat -a
|
||||
```
|
||||
|
||||
**origin/master で変更されたファイルのみに対する使い方**:
|
||||
|
||||
```
|
||||
qmk cformat
|
||||
```
|
||||
|
||||
**branch_name で変更されたファイルのみに対する使い方**:
|
||||
|
||||
```
|
||||
qmk cformat -b branch_name
|
||||
```
|
||||
|
||||
## `qmk docs`
|
||||
|
||||
このコマンドは、ドキュメントを参照または改善するために使うことができるローカル HTTP サーバを起動します。デフォルトのポートは 8936 です。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk docs [-p PORT]
|
||||
```
|
||||
|
||||
## `qmk kle2json`
|
||||
|
||||
このコマンドにより、生の KLE データから QMK Configurator の JSON へ変換することができます。絶対パスあるいは現在のディレクトリ内のファイル名のいずれかを受け取ります。デフォルトでは、`info.json` が既に存在している場合は上書きしません。上書きするには、`-f` あるいは `--force` フラグを使ってください。
|
||||
@ -207,36 +275,6 @@ $ qmk kle2json -f kle.txt -f
|
||||
Ψ Wrote out to info.json
|
||||
```
|
||||
|
||||
## `qmk list-keyboards`
|
||||
|
||||
このコマンドは現在 `qmk_firmware` で定義されている全てのキーボードを列挙します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk list-keyboards
|
||||
```
|
||||
|
||||
## `qmk list-keymaps`
|
||||
|
||||
このコマンドは指定されたキーボード(とリビジョン)の全てのキーマップを列挙します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk list-keymaps -kb planck/ez
|
||||
```
|
||||
|
||||
## `qmk new-keymap`
|
||||
|
||||
このコマンドは、キーボードの既存のデフォルトのキーマップに基づいて新しいキーマップを作成します。
|
||||
|
||||
**使用法**:
|
||||
|
||||
```
|
||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||
```
|
||||
|
||||
## `qmk pyformat`
|
||||
|
||||
このコマンドは `qmk_firmware` 内の python コードを整形します。
|
||||
|
@ -1,8 +1,8 @@
|
||||
# QMK CLI 設定
|
||||
|
||||
<!---
|
||||
original document: d598f01cb:docs/cli_configuration.md
|
||||
git diff d598f01cb HEAD -- docs/cli_configuration.md | cat
|
||||
original document: 0.9.0:docs/cli_configuration.md
|
||||
git diff 0.9.0 HEAD -- docs/cli_configuration.md | cat
|
||||
-->
|
||||
|
||||
このドキュメントは `qmk config` がどのように動作するかを説明します。
|
||||
|
42
docs/ja/compatible_microcontrollers.md
Normal file
42
docs/ja/compatible_microcontrollers.md
Normal file
@ -0,0 +1,42 @@
|
||||
# 互換性のあるマイクロコントローラ
|
||||
|
||||
<!---
|
||||
original document: 0.9.19:docs/compatible_microcontrollers.md
|
||||
git diff 0.9.19 HEAD -- docs/compatible_microcontrollers.md | cat
|
||||
-->
|
||||
|
||||
QMK は十分な容量のフラッシュメモリを備えた USB 対応 AVR または ARM マイクロコントローラで実行されます - 一般的に 32kB 以上ですが、ほとんどの機能を無効にすると*ほんの* 16kB に詰め込むことができます。
|
||||
|
||||
## Atmel AVR
|
||||
|
||||
以下は、USB スタックとして [LUFA](https://www.fourwalledcubicle.com/LUFA.php) を使います:
|
||||
|
||||
* [ATmega16U2](https://www.microchip.com/wwwproducts/en/ATmega16U2) / [ATmega32U2](https://www.microchip.com/wwwproducts/en/ATmega32U2)
|
||||
* [ATmega16U4](https://www.microchip.com/wwwproducts/en/ATmega16U4) / [ATmega32U4](https://www.microchip.com/wwwproducts/en/ATmega32U4)
|
||||
* [AT90USB64](https://www.microchip.com/wwwproducts/en/AT90USB646) / [AT90USB128](https://www.microchip.com/wwwproducts/en/AT90USB1286)
|
||||
|
||||
組み込みの USB インターフェースを持たない、いくつかの MCU は代わりに [V-USB](https://www.obdev.at/products/vusb/index.html) を使います:
|
||||
|
||||
* [ATmega32A](https://www.microchip.com/wwwproducts/en/ATmega32A)
|
||||
* [ATmega328P](https://www.microchip.com/wwwproducts/en/ATmega328P)
|
||||
* [ATmega328](https://www.microchip.com/wwwproducts/en/ATmega328)
|
||||
|
||||
## ARM
|
||||
|
||||
[ChibiOS](http://www.chibios.org) がサポートする USB 付きの ARM チップを使うこともできます。ほとんどのチップには十分な容量のフラッシュメモリがあります。動作するとわかっているのは:
|
||||
|
||||
### STMicroelectronics (STM32)
|
||||
|
||||
* [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html)
|
||||
* [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)
|
||||
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
|
||||
|
||||
### NXP (Kinetis)
|
||||
|
||||
* [MKL26Z64](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/kl-series-cortex-m0-plus/kinetis-kl2x-72-96-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x)
|
||||
* [MK20DX128](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-50-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-based-on-arm-cortex-m4-core:K20_50)
|
||||
* [MK20DX256](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72)
|
||||
|
||||
## Atmel ATSAM
|
||||
|
||||
Atmel の ATSAM マイクロコントローラの一つである、[Massdrop keyboards](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop) で使用されている [ATSAMD51J18A](https://www.microchip.com/wwwproducts/en/ATSAMD51J18A) には限定的なサポートがあります。
|
67
docs/ja/configurator_step_by_step.md
Normal file
67
docs/ja/configurator_step_by_step.md
Normal file
@ -0,0 +1,67 @@
|
||||
# QMK Configurator: ステップ・バイ・ステップ
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.9.0:docs/configurator_step_by_step.md
|
||||
git diff 0.9.0 HEAD -- docs/configurator_step_by_step.md | cat
|
||||
-->
|
||||
|
||||
このページでは、QMK Configurator でファームウェアを構築する手順を説明します。
|
||||
|
||||
## ステップ 1: キーボードを選ぶ
|
||||
|
||||
ドロップダウンボックスをクリックして、キーマップを作成するキーボードを選択します。
|
||||
|
||||
?> **キーボードに複数のバージョンがある場合は、正しいバージョンを選択してください。**
|
||||
|
||||
大事なことなのでもう一度言います。
|
||||
|
||||
!> **正しいバージョンを選択してください!**
|
||||
|
||||
キーボードが QMK を搭載していると宣伝されていてもリストにない場合は、開発者がまだ作業中か、私たちがまだマージするきっかけがなかった可能性があります。
|
||||
アクティブな [プルリクエスト](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) がない場合、[qmk_firmware](https://github.com/qmk/qmk_firmware/issues)で報告して、その特定のキーボードのサポートをリクエストします。
|
||||
製作者自身の GitHub アカウントにある QMK 搭載キーボードもあります。
|
||||
それも再確認してください。
|
||||
|
||||
## ステップ2: キーボードのレイアウトを選択する
|
||||
|
||||
作成したいと思うキーマップに最も近いレイアウトを選択します。一部のキーボードには、まだ十分なレイアウトや正しいレイアウトが定義されていません。これらは将来サポートされる予定です。
|
||||
|
||||
## ステップ3: キーマップの名前を決める
|
||||
|
||||
お好みの名前をキーマップにつけます。
|
||||
|
||||
?> コンパイル時に問題が発生した場合は、もしかすると QMK ファームウェアリポジトリに既に同じ名前が存在しているのかもしれません。名前を変更してみてください。
|
||||
|
||||
## ステップ4: キーマップを定義する
|
||||
|
||||
キーコードの入力は、3つの方法のいずれかで行います。
|
||||
|
||||
1. ドラッグ・アンド・ドロップ
|
||||
2. レイアウト上の空の場所をクリックして、希望するキーコードをクリックします
|
||||
3. レイアウト上の空の場所をクリックして、キーボードの物理キーを押します
|
||||
|
||||
?> マウスをキーの上に置くと、そのキーコードの機能の短い説明文が出ます。より詳細な説明については以下を見てください:
|
||||
|
||||
* [基本的なキーコードリファレンス](ja/keycodes_basic.md)
|
||||
* [高度なキーコードリファレンス](ja/feature_advanced_keycodes.md)
|
||||
|
||||
!> 選択したレイアウトが物理的なビルドと一致しない場合は、使用していないキーは空白のままにしておきます。どのキーが使用されているかわからない場合、例えば、バックスペースキーは1つだが `LAYOUT_all` には2つのキーがある場合は、同じキーコードを両方の場所に配置してください。
|
||||
|
||||
## ステップ5: 後日のためにキーマップを保存する
|
||||
|
||||
キーマップに満足するか、または後で作業したい場合は、`Export Keymap' ボタンを押します。
|
||||
これでキーマップがあなたのコンピュータに保存されます。
|
||||
その後、`Import Keymap` ボタンを押すことで、この .json ファイルを後で読み込むことができます。
|
||||
|
||||
!> **注意:** このファイルは、kbfirmware.com またはその他のツールに使用される .json ファイルと同じ形式ではありません。これらのツールにこの .json を使用したり、QMK Configurator でこれらのツールの .json を使用しようとすると、問題が発生します。
|
||||
|
||||
## ステップ6: ファームウェアをコンパイルする
|
||||
|
||||
緑色の `Compile` ボタンを押します。
|
||||
|
||||
コンパイルが完了すると、緑色の `Download Firmware` ボタンを押すことができます。
|
||||
|
||||
## 次のステップ: キーボードに書き込む(フラッシュする)
|
||||
|
||||
[ファームウェアを書きこむ](ja/newbs_flashing.md) を参照してください。
|
32
docs/ja/configurator_troubleshooting.md
Normal file
32
docs/ja/configurator_troubleshooting.md
Normal file
@ -0,0 +1,32 @@
|
||||
# Configurator トラブルシューティング
|
||||
|
||||
<!---
|
||||
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
|
||||
original document: 0.9.0:docs/configurator_troubleshooting.md
|
||||
git diff 0.9.0 HEAD -- docs/configurator_troubleshooting.md | cat
|
||||
-->
|
||||
|
||||
## 私の .json ファイルが動きません
|
||||
|
||||
.json ファイルが QMK Configurator で作ったものの場合、おめでとうございます。バグに遭遇しました。 [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) で報告してください。
|
||||
|
||||
そうでない場合は、... 他の .json ファイルを使用しないようにという、上に書いた注意書きを見逃してませんか?
|
||||
|
||||
#### レイアウトに余分なスペースがありますか?どうすればいいですか?
|
||||
|
||||
もしスペースバーが3つに分かれている場合は、全てスペースバーで埋めるのが最善の方法です。バックスペースや Shift キーについても同じことができます。
|
||||
|
||||
#### キーコードってなに?
|
||||
|
||||
以下を見てください。
|
||||
|
||||
* [基本的なキーコードリファレンス](ja/keycodes_basic.md)
|
||||
* [高度なキーコードリファレンス](ja/feature_advanced_keycodes.md)
|
||||
|
||||
#### コンパイルできません
|
||||
|
||||
キーマップの他のレイヤーを再確認して、おかしなキーが存在しないことを確認してください。
|
||||
|
||||
## 問題とバグ
|
||||
|
||||
私たちは利用者の依頼やバグレポートを常に受け入れています。[qmk_configurator](https://github.com/qmk/qmk_configurator/issues) で報告してください。
|
69
docs/ja/documentation_best_practices.md
Normal file
69
docs/ja/documentation_best_practices.md
Normal file
@ -0,0 +1,69 @@
|
||||
# ドキュメントベストプラクティス
|
||||
|
||||
<!---
|
||||
original document: 0.9.19:docs/documentation_best_practices.md
|
||||
git diff 0.9.19 HEAD -- docs/documentation_best_practices.md | cat
|
||||
-->
|
||||
|
||||
このページは QMK のためのドキュメントを作成する時のベストプラクティスを文章化するためのものです。これらのガイドラインに従うことで、一貫したトーンとスタイルを維持することでき、他の人が QMK をより理解しやすくすることができます。
|
||||
|
||||
# ページの開始
|
||||
|
||||
ドキュメントページは通常 H1 ヘッダで始まり、最初の段落を使ってこのページの内容を説明します。この見出しと段落は目次の次にあるため、見出しは短くして空白の無い長い文字列を避けるように気を付けてください。
|
||||
|
||||
例:
|
||||
|
||||
```
|
||||
# My Page Title
|
||||
|
||||
This page covers my super cool feature. You can use this feature to make coffee, squeeze fresh oj, and have an egg mcmuffin and hashbrowns delivered from your local macca's by drone.
|
||||
```
|
||||
|
||||
# 見出し
|
||||
|
||||
通常、ページには複数の "H1" 見出しが有るべきです。H1 と H2 見出しのみが目次に含まれるので、適切に計画してください。目次が広くなりすぎないように、H1 と H2 の見出しでは幅を広げないようにしてください。
|
||||
|
||||
# スタイル付きのヒントブロック
|
||||
|
||||
注意を引くためにテキストの周りにスタイル付きのヒントブロックを描くことができます。
|
||||
|
||||
### 重要なもの
|
||||
|
||||
```
|
||||
!> This is important
|
||||
```
|
||||
|
||||
以下のように表示されます:
|
||||
|
||||
!> This is important
|
||||
|
||||
### 一般的なヒント
|
||||
|
||||
```
|
||||
?> This is a helpful tip.
|
||||
```
|
||||
|
||||
以下のように表示されます:
|
||||
|
||||
?> This is a helpful tip.
|
||||
|
||||
|
||||
# 機能を文章化する
|
||||
|
||||
QMK のために新しい機能を作成した場合、そのドキュメントページを作成してください。長い必要は無く、機能を説明する幾つかの文と、関連するキーコードを列挙した表で十分です。以下は基本的なテンプレートです:
|
||||
|
||||
```markdown
|
||||
# My Cool Feature
|
||||
|
||||
This page describes my cool feature. You can use my cool feature to make coffee and order cream and sugar to be delivered via drone.
|
||||
|
||||
## My Cool Feature Keycodes
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|KC_COFFEE||Make Coffee|
|
||||
|KC_CREAM||Order Cream|
|
||||
|KC_SUGAR||Order Sugar|
|
||||
```
|
||||
|
||||
ドキュメントを `docs/feature_<my_cool_feature>.md` に配置し、そのファイルを `docs/_summary.md` の適切な場所に追加します。キーコードを追加した場合は、機能ページに戻るリンクとともに `docs/keycodes.md` に追加するようにしてください。
|
45
docs/ja/documentation_templates.md
Normal file
45
docs/ja/documentation_templates.md
Normal file
@ -0,0 +1,45 @@
|
||||
# ドキュメントテンプレート
|
||||
|
||||
<!---
|
||||
original document: 0.9.19:docs/documentation_templates.md
|
||||
git diff 0.9.19 HEAD -- docs/documentation_templates.md | cat
|
||||
-->
|
||||
|
||||
このページでは、新しいキーマップやキーボードを QMK に提出する際に使うべきテンプレートをまとめています。
|
||||
|
||||
## キーマップ `readme.md` テンプレート :id=keyboard-readmemd-template
|
||||
|
||||
ほとんどのキーマップには、レイアウトを表す画像があります。画像を作成するには、[Keyboard Layout Editor](http://keyboard-layout-editor.com) を使うことができます。画像は [Imgur](http://imgur.com) や別のホスティングサービスにアップロードし、プルリクエストに画像を含めないでください。
|
||||
|
||||
画像の下には、キーマップを理解してもらうための簡単な説明文を書いてください。
|
||||
|
||||
```
|
||||

|
||||
|
||||
# Default Clueboard Layout
|
||||
|
||||
This is the default layout that comes flashed on every Clueboard. For the most
|
||||
part it's a straightforward and easy to follow layout. The only unusual key is
|
||||
the key in the upper left, which sends Escape normally, but Grave when any of
|
||||
the Ctrl, Alt, or GUI modifiers are held down.
|
||||
```
|
||||
|
||||
## キーボード `readme.md` テンプレート
|
||||
|
||||
```
|
||||
# Planck
|
||||
|
||||

|
||||
|
||||
A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/)
|
||||
|
||||
* Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
|
||||
* Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, Teensy 2.0
|
||||
* Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make planck/rev4: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).
|
||||
```
|
@ -1,8 +1,8 @@
|
||||
# Zadig を使ったブートローダドライバのインストール
|
||||
|
||||
<!---
|
||||
original document: d598f01cb:docs/driver_installation_zadig.md
|
||||
git diff d598f01cb HEAD -- docs/driver_installation_zadig.md | cat
|
||||
original document: 0.9.0:docs/driver_installation_zadig.md
|
||||
git diff 0.9.0 HEAD -- docs/driver_installation_zadig.md | cat
|
||||
-->
|
||||
|
||||
QMK はホストにたいして通常の HID キーボードデバイスとして振る舞うため特別なドライバは必要ありません。しかし、Windows でのキーボードへの書き込みは、多くの場合、キーボードをリセットした時に現れるブートローダデバイスで*行います*。
|
||||
|
@ -1,8 +1,8 @@
|
||||
# よくあるビルドの質問
|
||||
|
||||
<!---
|
||||
original document: 0f43c2652:docs/faq_build.md
|
||||
git diff 0f43c2652 HEAD -- docs/faq_build.md | cat
|
||||
original document: 0.9.10:docs/faq_build.md
|
||||
git diff 0.9.10 HEAD -- docs/faq_build.md | cat
|
||||
-->
|
||||
|
||||
このページは QMK のビルドに関する質問を説明します。まだビルドをしていない場合は、[ビルド環境のセットアップ](ja/getting_started_build_tools.md) および [Make 手順](ja/getting_started_make_guide.md)ガイドを読むべきです。
|
||||
@ -32,33 +32,30 @@ sudo udevadm trigger
|
||||
**/etc/udev/rules.d/50-atmel-dfu.rules:**
|
||||
```
|
||||
# Atmel ATMega32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# Atmel USBKEY AT90USB1287
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# Atmel ATMega32U2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/52-tmk-keyboard.rules:**
|
||||
```
|
||||
# tmk keyboard products https://github.com/tmk/tmk_keyboard
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
|
||||
```
|
||||
**/etc/udev/rules.d/54-input-club-keyboard.rules:**
|
||||
|
||||
```
|
||||
# Input Club keyboard bootloader
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/55-caterina.rules:**
|
||||
```
|
||||
# ModemManager should ignore the following devices
|
||||
ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
```
|
||||
|
||||
**注意:** ModemManager フィルタリングは厳格モードでは無い場合のみ動作します。以下のコマンドでその設定を変更することができます:
|
||||
**注意:** 古い(1.12以前の) ModemManager では、フィルタリングは厳密なモードではない場合にのみ動作し、以下のコマンドはその設定を更新することができます。
|
||||
```console
|
||||
sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service
|
||||
sudo systemctl daemon-reload
|
||||
@ -68,15 +65,15 @@ sudo systemctl restart ModemManager
|
||||
**/etc/udev/rules.d/56-dfu-util.rules:**
|
||||
```
|
||||
# stm32duino
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# Generic stm32
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/57-bootloadhid.rules:**
|
||||
```
|
||||
# bootloadHID
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", MODE:="0666"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
```
|
||||
|
||||
### Linux のブートローダモードで Serial デバイスが検知されない
|
||||
@ -116,23 +113,14 @@ OPT_DEFS += -DBOOTLOADER_SIZE=2048
|
||||
```
|
||||
|
||||
## MacOS での `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)`
|
||||
|
||||
これは brew での更新に関する問題で、avr-gcc が依存するシンボリックリンクを壊します。
|
||||
|
||||
解決法は全ての影響を受けたモジュールを削除し再インストールすることです。
|
||||
|
||||
```
|
||||
brew rm avr-gcc
|
||||
brew rm avr-gcc@8
|
||||
brew rm dfu-programmer
|
||||
brew rm dfu-util
|
||||
brew rm gcc-arm-none-eabi
|
||||
brew rm arm-gcc-bin@8
|
||||
brew rm avrdude
|
||||
brew install avr-gcc@8
|
||||
brew install dfu-programmer
|
||||
brew install dfu-util
|
||||
brew install arm-gcc-bin@8
|
||||
brew install avrdude
|
||||
brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk
|
||||
brew install qmk/qmk/qmk
|
||||
brew link --force avr-gcc@8
|
||||
brew link --force arm-gcc-bin@8
|
||||
```
|
||||
|
@ -1,8 +1,8 @@
|
||||
# デバッグの FAQ
|
||||
|
||||
<!---
|
||||
original document: 376419a4f:docs/faq_debug.md
|
||||
git diff 376419a4f HEAD -- docs/faq_debug.md | cat
|
||||
original document: 0.9.10:docs/faq_debug.md
|
||||
git diff 0.9.10 HEAD -- docs/faq_debug.md | cat
|
||||
-->
|
||||
|
||||
このページは、キーボードのトラブルシューティングについての様々な一般的な質問を説明します。
|
||||
|
@ -1,53 +1,10 @@
|
||||
# レイヤーの切り替えとトグル :id=switching-and-toggling-layers
|
||||
# 修飾キー :id=modifier-keys
|
||||
|
||||
<!---
|
||||
original document: 5d5ff80:docs/feature_advanced_keycodes.md
|
||||
git diff 5d5ff80 HEAD -- docs/feature_advanced_keycodes.md | cat
|
||||
original document: 0.9.0:docs/feature_advanced_keycodes.md
|
||||
git diff 0.9.0 HEAD -- docs/feature_advanced_keycodes.md | cat
|
||||
-->
|
||||
|
||||
これらの機能により、様々な方法でレイヤーをアクティブ化することができます。レイヤーは一般的に独立したレイアウトでは無いことに注意してください -- 複数のレイヤーを一度にアクティブ化することができ、レイヤーが `KC_TRNS` を使ってキーの押下を下のレイヤーに渡すことが一般的です。レイヤーの詳細については、[キーマップの概要](ja/keymap.md#keymap-and-layers)を見てください。MO()、LM()、TT() あるいは LT() を使って一時的なレイヤーの切り替えを使う場合、上のレイヤーのキーを透過にするようにしてください。さもないと意図したように動作しないかもしれません。
|
||||
|
||||
* `DF(layer)` - デフォルトレイヤーを切り替えます。デフォルトレイヤーは、他のレイヤーがその上に積み重なっている、常にアクティブな基本レイヤーです。デフォルトレイヤーの詳細については以下を見てください。これは QWERTY から Dvorak レイアウトに切り替えるために使うことができます。(これは一時的な切り替えであり、キーボードの電源が切れるまでしか持続しないことに注意してください。デフォルトレイヤーを永続的に変更するには、[process_record_user](ja/custom_quantum_functions.md#programming-the-behavior-of-any-keycode) 内で `set_single_persistent_default_layer` 関数を呼び出すなど、より深いカスタマイズが必要です。)
|
||||
* `MO(layer)` - 一時的に*レイヤー*をアクティブにします。キーを放すとすぐに、レイヤーは非アクティブになります。
|
||||
* `LM(layer, mod)` - (`MO` のように)一時的に*レイヤー*をアクティブにしますが、モディファイア *mod* がアクティブな状態です。layer 0-15 と、左モディファイアのみをサポートします: `MOD_LCTL`、`MOD_LSFT`、`MOD_LALT`、`MOD_LGUI` (`KC_` の代わりに `MOD_` 定数を使うことに注意してください)。これらのモディファイアは、例えば `LM(_RAISE, MOD_LCTL | MOD_LALT)` のように、ビット単位の OR を使って組み合わせることができます。
|
||||
* `LT(layer, kc)` - ホールドされた時に*レイヤー*を一時的にアクティブにし、タップされた時に *kc* を送信します。layer 0-15 のみをサポートします。
|
||||
* `OSL(layer)` - 次のキーが押されるまで、一時的に*レイヤー*をアクティブにします。詳細と追加機能については、[ワンショットキー](ja/one_shot_keys.md)を見てください。
|
||||
* `TG(layer)` - *レイヤー*を切り替えます。非アクティブな場合はアクティブにし、逆も同様です。
|
||||
* `TO(layer)` - *レイヤー*をアクティブにし、他の全てのレイヤー(デフォルトレイヤーを除く)を非アクティブにします。この関数は特別です。1つのレイヤーをアクティブなレイヤースタックに追加/削除する代わりに、現在のアクティブなレイヤーを完全に置き換え、唯一上位のレイヤーを下位のレイヤーで置き換えることができるからです。これはキーダウンで(キーが押されるとすぐに)アクティブになります。
|
||||
* `TT(layer)` - レイヤーのタップ切り替え。キーを押したままにすると*レイヤー*がアクティブにされ、放すと非アクティブになります (`MO` 風)。繰り返しタップすると、レイヤーはオンあるいはオフを切り替えます (`TG` 風)。デフォルトでは5回のタップが必要ですが、`TAPPING_TOGGLE` を定義することで変更することができます -- 例えば、2回のタップだけで切り替えるには、`#define TAPPING_TOGGLE 2` を定義します。
|
||||
|
||||
## 注意事項
|
||||
|
||||
現在のところ、`LT()` と `MT()` は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。レイヤータップあるいはモッドタップのキーコードの一部として指定されたモディファイアは無視されます。タップしたキーコードにモディファイアを適用する必要がある場合は、[タップダンス](ja/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys)を使うことができます。
|
||||
|
||||
さらに、モッドタップあるいはレイヤータップで少なくとも1つの右手用のモディファイアが指定された場合、指定された全てのモディファイアが右手用になるため、2つをうまく組み合わせて一致させることはできません。
|
||||
|
||||
# レイヤーの使用
|
||||
|
||||
レイヤーを切り替える時は注意してください。(キーボードを取り外さずに)そのレイヤーを非アクティブにすることができずレイヤーから移動できなくなる可能性があります。最も一般的な問題を避けるためのガイドラインを作成しました。
|
||||
|
||||
## 初心者
|
||||
|
||||
QMK を使い始めたばかりの場合は、全てを単純にしたいでしょう。レイヤーをセットアップする時は、これらのガイドラインに従ってください:
|
||||
|
||||
* デフォルトの "base" レイヤーとして、layer 0 をセットアップします。これは通常の入力レイヤーであり、任意のレイアウト (qwerty、dvorak、colemak など)にすることができます。通常はキーボードのキーのほとんどまたは全てが定義されているため、これを最下位のレイヤーとして設定することが重要です。そうすることで、もしそれが他のレイヤーの上 (つまりレイヤー番号が大きい)にある場合の影響を防ぎます。
|
||||
* layer 0 をルートとして、レイヤーを "ツリー" レイアウトに配置します。他の複数のレイヤーから同じレイヤーに行こうとしないでください。
|
||||
* 各レイヤーのキーマップでは、より高い番号のレイヤーのみを参照します。レイヤーは最大の番号(最上位)のアクティブレイヤーから処理されるため、下位レイヤーの状態を変更するのは難しくエラーが発生しやすくなります。
|
||||
|
||||
## 中級ユーザ
|
||||
|
||||
複数の基本レイヤーが必要な場合があります。例えば、QWERTY と Dvorak を切り替える場合、国ごとに異なるレイアウトを切り替える場合、あるいは異なるビデオゲームごとにレイアウトを切り替える場合などです。基本レイヤーは常に最小の番号のレイヤーである必要があります。複数の基本レイヤーがある場合、常にそれらを相互排他的に扱う必要があります。1つの基本レイヤーがオンの場合、他をオフにします。
|
||||
|
||||
## 上級ユーザ
|
||||
|
||||
レイヤーがどのように動作し、何ができるかを理解したら、より創造的になります。初心者のセクションで列挙されている規則は、幾つかの巧妙な詳細を回避するのに役立ちますが、特に超コンパクトなキーボードのユーザにとって制約になる場合があります。レイヤーの仕組みを理解することで、レイヤーをより高度な方法で使うことができます。
|
||||
|
||||
レイヤーは番号順に上に積み重なっています。キーの押下の動作を決定する時に、QMK は上から順にレイヤーを走査し、`KC_TRNS` に設定されていない最初のアクティブなレイヤーに到達すると停止します。結果として、現在のレイヤーよりも数値的に低いレイヤーをアクティブにし、現在のレイヤー(あるいはアクティブでターゲットレイヤーよりも高い別のレイヤー)に `KC_TRNS` 以外のものがある場合、それが送信されるキーであり、アクティブ化したばかりのレイヤー上のキーではありません。これが、ほとんどの人の "なぜレイヤーが切り替わらないのか" 問題の原因です。
|
||||
|
||||
場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h) で見つけることができます。
|
||||
|
||||
# 修飾キー :id=modifier-keys
|
||||
|
||||
以下のようにキーコードとモディファイアを組み合わせることができます。押すと、モディファイアのキーダウンイベントが送信され、次に `kc` のキーダウンイベントが送信されます。放すと、`kc` のキーアップイベントが送信され、次にモディファイアのキーアップイベントが送信されます。
|
||||
|
||||
| キー | エイリアス | 説明 |
|
||||
@ -66,12 +23,16 @@ QMK を使い始めたばかりの場合は、全てを単純にしたいでし
|
||||
| `MEH(kc)` | | 左 Control、左 Shift、左 Alt を押しながら `kc` を押します。 |
|
||||
| `HYPR(kc)` | | 左 Control、左 Shift、左 Alt、左 GUI を押しながら `kc` を押します。 |
|
||||
|
||||
また、それらを繋げることができます。例えば、`LCTL(LALT(KC_DEL))` は1回のキー押下で Control+Alt+Delete を送信するキーを作成します。
|
||||
また、それらを繋げることができます。例えば、`LCTL(LALT(KC_DEL))` または `C(A(KC_DEL))` は1回のキー押下で Control+Alt+Delete を送信するキーを作成します。
|
||||
|
||||
# 過去の内容
|
||||
# 過去の内容 :id=legacy-content
|
||||
|
||||
このページには多くの機能が含まれていました。このページを構成していた多くのセクションをそれぞれのページに移動しました。これより下は全て単なるリダイレクトであるため、web上で古いリンクをたどっている人は探しているものを見つけることができます。
|
||||
|
||||
## レイヤー :id=switching-and-toggling-layers
|
||||
|
||||
* [レイヤー](ja/feature_layers.md)
|
||||
|
||||
## モッドタップ :id=mod-tap
|
||||
|
||||
* [モッドタップ](ja/mod_tap.md)
|
||||
|
@ -1,8 +1,8 @@
|
||||
# オーディオ
|
||||
|
||||
<!---
|
||||
original document: 5d5ff80:docs/feature_audio.md
|
||||
git diff 5d5ff80 HEAD -- docs/feature_audio.md | cat
|
||||
original document: 0.9.0:docs/feature_audio.md
|
||||
git diff 0.9.0 HEAD -- docs/feature_audio.md | cat
|
||||
-->
|
||||
|
||||
キーボードは音を出すことができます!Planck、Preonic あるいは特定の PWM 対応ピンにアクセスできる AVR キーボードがある場合は、単純なスピーカーを接続してビープ音を鳴らすことができます。これらのビープ音を使ってレイヤーの変化、モディファイア、特殊キーを示したり、あるいは単にイカした8ビットの曲を鳴らすことができます。
|
||||
|
@ -1,8 +1,8 @@
|
||||
# 自動シフト: なぜシフトキーが必要ですか?
|
||||
|
||||
<!---
|
||||
original document: 5d5ff80:docs/feature_auto_shift.md
|
||||
git diff 5d5ff80 HEAD -- docs/feature_auto_shift.md | cat
|
||||
original document: 0.9.0:docs/feature_auto_shift.md
|
||||
git diff 0.9.0 HEAD -- docs/feature_auto_shift.md | cat
|
||||
-->
|
||||
|
||||
キーをタップすると、その文字を取得します。キーをタップするが、*わずかに*長く押し続けると、シフト状態になります。ほら!シフトキーは必要ありません!
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Bluetooth
|
||||
|
||||
<!---
|
||||
original document: 5d5ff80:docs/feature_bluetooth.md
|
||||
git diff 5d5ff80 HEAD -- docs/feature_bluetooth.md | cat
|
||||
original document: 0.9.0:docs/feature_bluetooth.md
|
||||
git diff 0.9.0 HEAD -- docs/feature_bluetooth.md | cat
|
||||
-->
|
||||
|
||||
## Bluetooth の既知のサポートハードウェア
|
||||
|
@ -1,8 +1,8 @@
|
||||
# ブートマジック
|
||||
|
||||
<!---
|
||||
original document: 5d5ff80:docs/feature_bootmagic.md
|
||||
git diff 5d5ff80 HEAD -- docs/feature_bootmagic.md | cat
|
||||
original document: 0.9.0:docs/feature_bootmagic.md
|
||||
git diff 0.9.0 HEAD -- docs/feature_bootmagic.md | cat
|
||||
-->
|
||||
|
||||
再書き込みせずにキーボードの挙動を変更することができる、3つの独立した関連する機能があります。それぞれは似たような機能を持ちますが、キーボードがどのように設定されているかによって異なる方法でアクセスされます。
|
||||
@ -149,6 +149,17 @@ BOOTMAGIC_ENABLE = lite
|
||||
|
||||
!> ブートマジックライトを使用すると、EEPROM を**常にリセットします**。つまり保存された全ての設定は失われます。
|
||||
|
||||
## 分割キーボード
|
||||
|
||||
`SPLIT_HAND_PIN` のようなオプションで、左右の設定があらかじめ決められている場合は、キーボードの左右で別のキーを設定する必要があるかもしれません。これを行うには、`config.h` ファイルに以下のエントリを追加します。
|
||||
|
||||
```c
|
||||
#define BOOTMAGIC_LITE_ROW_RIGHT 4
|
||||
#define BOOTMAGIC_LITE_COLUMN_RIGHT 1
|
||||
```
|
||||
|
||||
デフォルトでは、これらの値は設定されていません。
|
||||
|
||||
## 高度なブートマジックライト
|
||||
|
||||
`bootmagic_lite` 関数は必要に応じてコード内で置き換えることができるように、弱く定義されています。これの良い例は Zeal60 キーボードで、追加の処理が必要です。
|
||||
|
99
docs/ja/feature_layers.md
Normal file
99
docs/ja/feature_layers.md
Normal file
@ -0,0 +1,99 @@
|
||||
# レイヤー :id=layers
|
||||
|
||||
<!---
|
||||
original document: 0.9.20:docs/feature_layers.md
|
||||
git diff 0.9.20 HEAD -- docs/feature_layers.md | cat
|
||||
-->
|
||||
|
||||
QMK ファームウェアの最も強力で良く使われている機能の一つは、レイヤーを使う機能です。ほとんどの人にとって、これはラップトップやタブレットキーボードにあるのと同じように、様々なキーを可能にするファンクションキーに相当します。
|
||||
|
||||
レイヤースタックがどのように動作するかの詳細な説明については、[キーマップの概要](ja/keymap.md#keymap-and-layers)を調べてください。
|
||||
|
||||
## レイヤーの切り替えとトグル :id=switching-and-toggling-layers
|
||||
|
||||
以下の関数により、様々な方法でレイヤーをアクティブにすることができます。レイヤーは通常、独立したレイアウトでは無いことに注意してください -- 複数のレイヤーを一度にアクティブにすることができ、レイヤーが `KC_TRNS` を使ってキーの押下を下のレイヤーへと透過させることが一般的です。MO()、LM()、TT() あるいは LT() を使って一時的なレイヤーの切り替えを使う場合、上のレイヤーのキーを透過にするようにしてください。さもないと意図したように動作しないかもしれません。
|
||||
|
||||
* `DF(layer)` - デフォルトレイヤーを切り替えます。デフォルトレイヤーは、他のレイヤーがその上に積み重なっている、常にアクティブな基本レイヤーです。デフォルトレイヤーの詳細については以下を見てください。これは QWERTY から Dvorak レイアウトに切り替えるために使うことができます。(これは一時的な切り替えであり、キーボードの電源が切れるまでしか持続しないことに注意してください。デフォルトレイヤーを永続的に変更するには、[process_record_user](ja/custom_quantum_functions.md#programming-the-behavior-of-any-keycode) 内で `set_single_persistent_default_layer` 関数を呼び出すなど、より深いカスタマイズが必要です。)
|
||||
* `MO(layer)` - 一時的に*レイヤー*をアクティブにします。キーを放すとすぐに、レイヤーは非アクティブになります。
|
||||
* `LM(layer, mod)` - (`MO` のように)一時的に*レイヤー*をアクティブにしますが、モディファイア *mod* がアクティブな状態です。layer 0-15 と、左モディファイアのみをサポートします: `MOD_LCTL`、`MOD_LSFT`、`MOD_LALT`、`MOD_LGUI` (`KC_` 定数の代わりに `MOD_` 定数を使うことに注意してください)。これらのモディファイアは、例えば `LM(_RAISE, MOD_LCTL | MOD_LALT)` のように、ビット単位の OR を使って組み合わせることができます。
|
||||
* `LT(layer, kc)` - ホールドされた時に*レイヤー*を一時的にアクティブにし、タップされた時に *kc* を送信します。layer 0-15 のみをサポートします。
|
||||
* `OSL(layer)` - 次のキーが押されるまで、一時的に*レイヤー*をアクティブにします。詳細と追加機能については、[ワンショットキー](ja/one_shot_keys.md)を見てください。
|
||||
* `TG(layer)` - *レイヤー*を切り替えます。非アクティブな場合はアクティブにし、逆も同様です。
|
||||
* `TO(layer)` - *レイヤー*をアクティブにし、他の全てのレイヤー(デフォルトレイヤーを除く)を非アクティブにします。この関数は特別です。1つのレイヤーをアクティブなレイヤースタックに追加/削除する代わりに、現在のアクティブなレイヤーを完全に置き換え、唯一上位のレイヤーを下位のレイヤーで置き換えることができるからです。これはキーダウンで(キーが押されるとすぐに)アクティブになります。
|
||||
* `TT(layer)` - レイヤーのタップ切り替え。キーを押したままにすると*レイヤー*がアクティブにされ、放すと非アクティブになります (`MO` 風)。繰り返しタップすると、レイヤーはオンあるいはオフを切り替えます (`TG` 風)。デフォルトでは5回のタップが必要ですが、`TAPPING_TOGGLE` を定義することで変更することができます -- 例えば、2回のタップだけで切り替えるには、`#define TAPPING_TOGGLE 2` を定義します。
|
||||
|
||||
### 注意事項 :id=caveats
|
||||
|
||||
現在のところ、`LT()` と `MT()` は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。特に、`LT` と `MT` のような二重の機能キーは16ビットキーコードを使います。4ビットは機能の識別のために使われ、次の12ビットはパラメータに分かれます。レイヤータップはレイヤーに4ビットを使います(実はレイヤータップがレイヤー 0-15 に制限されている理由です)。モッドタップも同じですが、識別子に4ビット、モッドのために4ビットが使われ、全体でキーコードに8ビットを使います。このため、使用されるキーコードは `0xFF` (0-255) に制限され、基本的なキーコードのみです。
|
||||
|
||||
これを拡張してもせいぜい複雑になるだけでしょう。32ビットキーコードに移行すると、これの多くが解決されますが、キーマップマトリックスが使用する領域が2倍になります。また、問題が起きる可能性もあります。タップしたキーコードにモディファイアを適用する必要がある場合は、[タップダンス](ja/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys)を使うことができます。
|
||||
|
||||
さらに、モッドタップあるいはレイヤータップで少なくとも1つの右手用のモディファイアが指定された場合、指定された全てのモディファイアが右手用になるため、2つをうまく組み合わせて一致させることはできません。
|
||||
|
||||
## レイヤーとの連携 :id=working-with-layers
|
||||
|
||||
レイヤーを切り替える時は注意してください。(キーボードを取り外さずに)そのレイヤーを非アクティブにすることができずレイヤーから移動できなくなる可能性があります。最も一般的な問題を避けるためのガイドラインを作成しました。
|
||||
|
||||
### 初心者 :id=beginners
|
||||
|
||||
QMK を使い始めたばかりの場合は、全てを単純にしたいでしょう。レイヤーをセットアップする時は、これらのガイドラインに従ってください:
|
||||
|
||||
* デフォルトの "base" レイヤーとして、layer 0 をセットアップします。これは通常の入力レイヤーであり、任意のレイアウト (qwerty、dvorak、colemak など)にすることができます。通常はキーボードのキーのほとんどまたは全てが定義されているため、これを最下位のレイヤーとして設定することが重要です。そうすることで、もしそれが他のレイヤーの上 (つまりレイヤー番号が大きい)にある場合の影響を防ぎます。
|
||||
* layer 0 をルートとして、レイヤーを "ツリー" レイアウトに配置します。他の複数のレイヤーから同じレイヤーに行こうとしないでください。
|
||||
* 各レイヤーのキーマップでは、より高い番号のレイヤーのみを参照します。レイヤーは最大の番号(最上位)のアクティブレイヤーから処理されるため、下位レイヤーの状態を変更するのは難しくエラーが発生しやすくなります。
|
||||
|
||||
### 中級ユーザ :id=intermediate-users
|
||||
|
||||
複数の基本レイヤーが必要な場合があります。例えば、QWERTY と Dvorak を切り替える場合、国ごとに異なるレイアウトを切り替える場合、あるいは異なるビデオゲームごとにレイアウトを切り替える場合などです。基本レイヤーは常に最小の番号のレイヤーである必要があります。複数の基本レイヤーがある場合、常にそれらを相互排他的に扱う必要があります。1つの基本レイヤーがオンの場合、他をオフにします。
|
||||
|
||||
### 上級ユーザ :id=advanced-users
|
||||
|
||||
レイヤーがどのように動作し、何ができるかを理解したら、より創造的になります。初心者のセクションで列挙されている規則は、幾つかの巧妙な詳細を回避するのに役立ちますが、特に超コンパクトなキーボードのユーザにとって制約になる場合があります。レイヤーの仕組みを理解することで、レイヤーをより高度な方法で使うことができます。
|
||||
|
||||
レイヤーは番号順に上に積み重なっています。キーの押下の動作を決定する時に、QMK は上から順にレイヤーを走査し、`KC_TRNS` に設定されていない最初のアクティブなレイヤーに到達すると停止します。結果として、現在のレイヤーよりも数値的に低いレイヤーをアクティブにし、現在のレイヤー(あるいはアクティブでターゲットレイヤーよりも高い別のレイヤー)に `KC_TRNS` 以外のものがある場合、それが送信されるキーであり、アクティブ化したばかりのレイヤー上のキーではありません。これが、ほとんどの人の "なぜレイヤーが切り替わらないのか" 問題の原因です。
|
||||
|
||||
場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h) で見つけることができます。
|
||||
|
||||
## 関数 :id=functions
|
||||
|
||||
レイヤーの使用あるいは操作に関係する多くの関数(と変数)があります。
|
||||
|
||||
| 関数 | 説明 |
|
||||
|----------------------------------------------|---------------------------------------------------------------------------------------------------------|
|
||||
| `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)` | ユーザレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 |
|
||||
|
||||
?> これらのコールバックを使うための追加の情報については、[レイヤー変換コード](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がオンになっているかどうかを確認する時に誤った値が返されることがあります。
|
399
docs/ja/feature_macros.md
Normal file
399
docs/ja/feature_macros.md
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user