Compare commits
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
ed80874f72 | |||
23e942ae4e | |||
c077300e19 | |||
11f12d386b | |||
4d76d85d7b | |||
981ea87b05 | |||
65252ebf67 | |||
5bd0a5a585 | |||
9fbf17b90e | |||
96bfce7000 | |||
d68c4d8106 | |||
9fb988b6e8 | |||
016d417253 | |||
de58b07659 | |||
6ceaae30f5 | |||
5075a1d9e4 | |||
3587e20e70 | |||
963bba1fc3 | |||
571a589cfa | |||
3c2d5599b9 | |||
3b05f25221 | |||
e05e671871 | |||
2d5b492550 | |||
ad8774d6fa | |||
297aad6ebd | |||
8f69983c58 | |||
b779078c60 | |||
b936048b0b | |||
7e0dc5376f | |||
6d1af63842 | |||
6c4a744a1b | |||
f7722ef9ca | |||
76cb2b1160 | |||
5117dff6a2 | |||
e5d34fd084 | |||
bfb2f8e0a8 | |||
d8f3c28a37 | |||
eef0cb2f90 | |||
63e4ad13c8 | |||
f9e67338a4 |
@ -244,34 +244,6 @@ else
|
||||
FIRMWARE_FORMAT?=hex
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),CHIBIOS)
|
||||
include $(TMK_PATH)/chibios.mk
|
||||
OPT_OS = chibios
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_5)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_4)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_3)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_2)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_1)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h
|
||||
endif
|
||||
endif
|
||||
|
||||
# Find all of the config.h files and add them to our CONFIG_H define.
|
||||
CONFIG_H :=
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/config.h)","")
|
||||
@ -307,11 +279,6 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_config.h)","")
|
||||
POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_config.h
|
||||
endif
|
||||
|
||||
# Save the defines and includes here, so we don't include any keymap specific ones
|
||||
PROJECT_DEFS := $(OPT_DEFS)
|
||||
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
|
||||
PROJECT_CONFIG := $(CONFIG_H)
|
||||
|
||||
# Userspace setup and definitions
|
||||
ifeq ("$(USER_NAME)","")
|
||||
USER_NAME := $(KEYMAP)
|
||||
@ -357,23 +324,17 @@ SRC += $(TMK_COMMON_SRC)
|
||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
||||
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
ifeq ($(strip $(PROTOCOL)), VUSB)
|
||||
include $(TMK_PATH)/protocol/vusb.mk
|
||||
include $(TMK_PATH)/$(PLATFORM_KEY).mk
|
||||
ifneq ($(strip $(PROTOCOL)),)
|
||||
include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
|
||||
else
|
||||
include $(TMK_PATH)/protocol/lufa.mk
|
||||
endif
|
||||
include $(TMK_PATH)/avr.mk
|
||||
include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),ARM_ATSAM)
|
||||
include $(TMK_PATH)/arm_atsam.mk
|
||||
include $(TMK_PATH)/protocol/arm_atsam.mk
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),CHIBIOS)
|
||||
include $(TMK_PATH)/protocol/chibios.mk
|
||||
endif
|
||||
# TODO: remove this bodge?
|
||||
PROJECT_DEFS := $(OPT_DEFS)
|
||||
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
|
||||
PROJECT_CONFIG := $(CONFIG_H)
|
||||
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
|
||||
|
@ -322,6 +322,11 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(WPM_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/wpm.c
|
||||
OPT_DEFS += -DWPM_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/encoder.c
|
||||
OPT_DEFS += -DENCODER_ENABLE
|
||||
|
@ -80,6 +80,7 @@
|
||||
* [Terminal](feature_terminal.md)
|
||||
* [Unicode](feature_unicode.md)
|
||||
* [Userspace](feature_userspace.md)
|
||||
* [WPM Calculation](feature_wpm.md)
|
||||
|
||||
* Hardware Features
|
||||
* Displays
|
||||
|
@ -88,6 +88,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
```
|
||||
|
||||
### Advanced Macros
|
||||
|
||||
In addition to the `process_record_user()` function, is the `post_process_record_user()` function. This runs after `process_record` and can be used to do things after a keystroke has been sent. This is useful if you want to have a key pressed before and released after a normal key, for instance.
|
||||
|
||||
In this example, we modify most normal keypresses so that `F22` is pressed before the keystroke is normally sent, and release it __only after__ it's been released.
|
||||
|
||||
```c
|
||||
static uint8_t f22_tracker;
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_A ... KC_F21: //notice how it skips over F22
|
||||
case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_F22); //this means to send F22 down
|
||||
f22_tracker++;
|
||||
register_code(keycode);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_A ... KC_F21: //notice how it skips over F22
|
||||
case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys
|
||||
if (!record->event.pressed) {
|
||||
f22_tracker--;
|
||||
if (!f22_tracker) {
|
||||
unregister_code(KC_F22); //this means to send F22 up
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### TAP, DOWN and UP
|
||||
|
||||
You may want to use keys in your macros that you can't write down, such as `Ctrl` or `Home`.
|
||||
|
@ -396,18 +396,88 @@ The EEPROM for it is currently shared with the RGBLIGHT system (it's generally a
|
||||
|
||||
Where `28` is an unused index from `eeconfig.h`.
|
||||
|
||||
## Suspended state :id=suspended-state
|
||||
## Functions :id=functions
|
||||
|
||||
To use the suspend feature, add this to your `<keyboard>.c`:
|
||||
### Direct Operation :id=direct-operation
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgb_matrix_set_color_all(r, g, b)` |Set all of the LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgb_matrix_set_color(index, r, g, b)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255, and `index` is between 0 and `DRIVER_LED_TOTAL` (not written to EEPROM) |
|
||||
|
||||
### Disable/Enable Effects :id=disable-enable-effects
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgb_matrix_toggle()` |Toggle effect range LEDs between on and off |
|
||||
|`rgb_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
|
||||
|`rgb_matrix_enable()` |Turn effect range LEDs on, based on their previous state |
|
||||
|`rgb_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
|
||||
|`rgb_matrix_disable()` |Turn effect range LEDs off |
|
||||
|`rgb_matrix_disable_noeeprom()` |Turn effect range LEDs off (not written to EEPROM) |
|
||||
|
||||
### Change Effect Mode :id=change-effect-mode
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgb_matrix_mode(mode)` |Set the mode, if RGB animations are enabled |
|
||||
|`rgb_matrix_mode_noeeprom(mode)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
||||
|`rgb_matrix_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
||||
|`rgb_matrix_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
||||
|`rgb_matrix_increase_speed()` |Increases the speed of the animations |
|
||||
|`rgb_matrix_decrease_speed()` |Decreases the speed of the animations |
|
||||
|
||||
### Change Color :id=change-color
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgb_matrix_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue |
|
||||
|`rgb_matrix_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue |
|
||||
|`rgb_matrix_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation |
|
||||
|`rgb_matrix_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation |
|
||||
|`rgb_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
|
||||
|`rgb_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
|
||||
|`rgb_matrix_sethsv(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 |
|
||||
|`rgb_matrix_sethsv_noeeprom(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|
||||
### Query Current Status :id=query-current-status
|
||||
|Function |Description |
|
||||
|-----------------------|-----------------|
|
||||
|`rgb_matrix_get_mode()` |Get current mode |
|
||||
|`rgb_matrix_get_hue()` |Get current hue |
|
||||
|`rgb_matrix_get_sat()` |Get current sat |
|
||||
|`rgb_matrix_get_val()` |Get current val |
|
||||
|
||||
## Callbacks :id=callbacks
|
||||
|
||||
### Indicators :id=indicators
|
||||
|
||||
If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `rgb_matrix_indicators_kb` or `rgb_matrix_indicators_user` function for that:
|
||||
```c
|
||||
void rgb_matrix_indicators_kb(void) {
|
||||
rgb_matrix_set_color(index, red, green, blue);
|
||||
}
|
||||
```
|
||||
|
||||
### Suspended state :id=suspended-state
|
||||
To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
|
||||
|
||||
Additionally add this to your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
void suspend_power_down_kb(void)
|
||||
{
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
```
|
||||
or add this to your `keymap.c`:
|
||||
```c
|
||||
void suspend_power_down_user(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void)
|
||||
{
|
||||
void suspend_wakeup_init_user(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
}
|
||||
```
|
||||
|
25
docs/feature_wpm.md
Normal file
25
docs/feature_wpm.md
Normal file
@ -0,0 +1,25 @@
|
||||
# Word Per Minute (WPM) Calculcation
|
||||
|
||||
The WPM feature uses time between keystrokes to compute a rolling average words
|
||||
per minute rate and makes this available for various uses.
|
||||
|
||||
Enable the WPM system by adding this to your `rules.mk`:
|
||||
|
||||
WPM_ENABLE = yes
|
||||
|
||||
For split keyboards using soft serial, the computed WPM
|
||||
score will be available on the master AND slave half.
|
||||
|
||||
## Public Functions
|
||||
|
||||
`uint8_t get_current_wpm(void);`
|
||||
This function returns the current WPM as an unsigned integer.
|
||||
|
||||
|
||||
## Customized keys for WPM calc
|
||||
|
||||
By default, the WPM score only includes letters, numbers, space and some
|
||||
punctuation. If you want to change the set of characters considered as part of
|
||||
the WPM calculation, you can implement `wpm_keycode_user(uint16_t keycode)`
|
||||
and return true for any characters you would like included in the calculation,
|
||||
or false to not count that particular keycode.
|
@ -61,6 +61,57 @@ This file is used by the [QMK API](https://github.com/qmk/qmk_api). It contains
|
||||
|
||||
All projects need to have a `config.h` file that sets things like the matrix size, product name, USB VID/PID, description and other settings. In general, use this file to set essential information and defaults for your keyboard that will always work.
|
||||
|
||||
The `config.h` files can also be placed in sub-folders, and the order in which they are read is as follows:
|
||||
|
||||
* `keyboards/top_folder/config.h`
|
||||
* `keyboards/top_folder/sub_1/config.h`
|
||||
* `keyboards/top_folder/sub_1/sub_2/config.h`
|
||||
* `keyboards/top_folder/sub_1/sub_2/sub_3/config.h`
|
||||
* `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/config.h`
|
||||
* `users/a_user_folder/config.h`
|
||||
* `keyboards/top_folder/keymaps/a_keymap/config.h`
|
||||
* `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/post_config.h`
|
||||
* `keyboards/top_folder/sub_1/sub_2/sub_3/post_config.h`
|
||||
* `keyboards/top_folder/sub_1/sub_2/post_config.h`
|
||||
* `keyboards/top_folder/sub_1/post_config.h`
|
||||
* `keyboards/top_folder/post_config.h`
|
||||
|
||||
The `post_config.h` file can be used for additional post-processing, depending on what is specified in the `config.h` file. For example, if you define the `IOS_DEVICE_ENABLE` macro in your keymap-level `config.h` file as follows, you can configure more detailed settings accordingly in the `post_config.h` file:
|
||||
|
||||
* `keyboards/top_folder/keymaps/a_keymap/config.h`
|
||||
```c
|
||||
#define IOS_DEVICE_ENABLE
|
||||
```
|
||||
* `keyboards/top_folder/post_config.h`
|
||||
```c
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
// USB_MAX_POWER_CONSUMPTION value for this keyboard
|
||||
#define USB_MAX_POWER_CONSUMPTION 400
|
||||
#else
|
||||
// fix iPhone and iPad power adapter issue
|
||||
// iOS device need lessthan 100
|
||||
#define USB_MAX_POWER_CONSUMPTION 100
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#define RGBLIGHT_LIMIT_VAL 200
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 35
|
||||
#define RGBLIGHT_VAL_STEP 4
|
||||
#endif
|
||||
#ifndef RGBLIGHT_HUE_STEP
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#endif
|
||||
#ifndef RGBLIGHT_SAT_STEP
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#endif
|
||||
#endif
|
||||
```
|
||||
|
||||
?> If you define options using `post_config.h` as in the above example, you should not define the same options in the keyboard- or user-level `config.h`.
|
||||
|
||||
### `rules.mk`
|
||||
|
||||
The presence of this file means that the folder is a keyboard target and can be used in `make` commands. This is where you setup the build environment for your keyboard and configure the default set of features.
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Quantum Mechanical Keyboard Firmware
|
||||
|
||||
<!---
|
||||
original document: eae21eed7:docs/README.md
|
||||
git diff eae21eed7 HEAD -- docs/README.md | cat
|
||||
original document: 0.8.58:docs/README.md
|
||||
git diff 0.8.58 HEAD -- docs/README.md | cat
|
||||
-->
|
||||
|
||||
[](https://github.com/qmk/qmk_firmware/tags)
|
||||
@ -12,26 +12,37 @@
|
||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||
[](https://github.com/qmk/qmk_firmware/)
|
||||
|
||||
## QMK ファームウェアとは何か?
|
||||
## QMK ファームウェアとは何でしょうか?
|
||||
|
||||
QMK (*Quantum Mechanical Keyboard*)は QMK ファームウェア、QMK ツールボックス、qmk.fm およびそれらのドキュメントを保守するオープンソースコミュニティです。QMK ファームウェアは[tmk\_keyboard](http://github.com/tmk/tmk_keyboard) を元にしたキーボードファームウェアで、Atmel AVR コントローラ、より具体的には [OLKB 製品](http://olkb.com)、[ErgoDox EZ](http://www.ergodox-ez.com) キーボードおよび [Clueboard 製品](http://clueboard.co/) のための幾つかの便利な機能を持ちます。また、ChibiOS を使って ARM チップに移植されています。これを使ってあなたの作った手配線のキーボードあるいはカスタムキーボード PCB で作ったキーボードを動かすことができます。
|
||||
QMK (*Quantum Mechanical Keyboard*)は、コンピュータ入力デバイスの開発を中心としたオープンソースコミュニティです。コミュニティには、キーボード、マウス、MIDI デバイスなど、全ての種類の入力デバイスが含まれます。協力者の中心グループは、[QMK ファームウェア](https://github.com/qmk/qmk_firmware)、[QMK Configurator](https://config.qmk.fm)、[QMK ツールボックス](https://github.com/qmk/qmk_toolbox)、[qmk.fm](https://qmk.fm)、そして、このドキュメントを、あなたのようなコミュニティメンバーの助けを借りて保守しています。
|
||||
|
||||
## 入手方法
|
||||
## 始めましょう
|
||||
|
||||
QMK のキーマップ、キーボード、機能に貢献をする予定がある場合、最も簡単なのは、[Github を介してリポジトリをフォークし](https://github.com/qmk/qmk_firmware#fork-destination-box)、リポジトリをあなたの開発環境にクローンして変更を加え、それらをプッシュし、[プルリクエスト](https://github.com/qmk/qmk_firmware/pulls)を開くことです。
|
||||
QMK は初めてですか?始めるには2つの方法があります:
|
||||
|
||||
それ以外の場合は、`git clone https://github.com/qmk/qmk_firmware` を介して直接クローンすることができます。zip または tar ファイルをダウンロードしないでください。コンパイルするためのサブモジュールをダウンロードするために git リポジトリが必要です。
|
||||
* 基本: [QMK Configurator](https://config.qmk.fm)
|
||||
* ドロップダウンからあなたのキーボードを選択し、キーボードをプログラムします。
|
||||
* 見ることができる [紹介ビデオ](https://www.youtube.com/watch?v=-imgglzDMdY) があります。
|
||||
* 読むことができる概要 [ドキュメント](ja/newbs_building_firmware_configurator.md) があります。
|
||||
* 発展: [ソースを使用します](ja/newbs.md)
|
||||
* より強力ですが、使うのはより困難です。
|
||||
|
||||
## コンパイル方法
|
||||
## 自分用にアレンジします
|
||||
|
||||
コンパイルをする前に、AVR または ARM 開発のための[環境をインストール](ja/getting_started_build_tools.md)する必要があります。それが完了したら、`make` コマンドを使用して、以下の表記でキーボードとキーマップをビルドします。
|
||||
QMK には、探求すべき多くの[機能](ja/features.md)と、深く知るためのリファレンスドキュメントがたくさんあります。ほとんどの機能は[キーマップ](ja/keymap.md)を変更し、[キーコード](ja/keycodes.md)を変更することで活用されます。
|
||||
|
||||
make planck/rev4:default
|
||||
## 手助けが必要ですか?
|
||||
|
||||
これは、`planck` の `rev4` リビジョンを `default` キーマップでビルドします。全てのキーボードにリビジョン(サブプロジェクトまたはフォルダとも呼ばれます)があるわけではありません。その場合は省略されます:
|
||||
[サポートページ](ja/support.md) をチェックして、QMK の使い方について手助けを得る方法を確認してください。
|
||||
|
||||
make preonic:default
|
||||
## 貢献する
|
||||
|
||||
## カスタマイズ方法
|
||||
QMK コミュニティに貢献する方法はたくさんあります。始める最も簡単な方法は、それを使って友人に QMK という単語を広めることです。
|
||||
|
||||
QMK には、探求すべき多くの[機能](ja/features.md)と、深堀りするための[リファレンス ドキュメント](http://docs.qmk.fm)がたくさんあります。ほとんどの機能は[キーマップ](ja/keymap.md)を変更し、[キーコード](ja/keycodes.md)を変更することで活用されます。
|
||||
* フォーラムやチャットルームで人々を支援します:
|
||||
* [/r/olkb](https://www.reddit.com/r/olkb/)
|
||||
* [Discord サーバ](https://discord.gg/Uq7gcHh)
|
||||
* 下にある「Edit This Page」をクリックしてドキュメントに貢献します
|
||||
* [ドキュメントをあなたの言語に翻訳します](ja/translating.md)
|
||||
* [バグを報告します](https://github.com/qmk/qmk_firmware/issues/new/choose)
|
||||
* [プルリクエストを開きます](ja/contributing.md)
|
||||
|
@ -1,130 +1,162 @@
|
||||
* [完全な初心者のガイド](ja/newbs.md)
|
||||
* [はじめに](ja/newbs_getting_started.md)
|
||||
* [初めてのファームウェアの構築](ja/newbs_building_firmware.md)
|
||||
* [ファームウェアのフラッシュ](ja/newbs_flashing.md)
|
||||
* [テストとデバッグ](ja/newbs_testing_debugging.md)
|
||||
* [QMK における Git 運用作法](ja/newbs_git_best_practices.md)
|
||||
* [あなたのフォークの master ブランチ](ja/newbs_git_using_your_master_branch.md)
|
||||
* [マージの競合の解決](ja/newbs_git_resolving_merge_conflicts.md)
|
||||
* [同期のとれていない git ブランチの再同期](ja/newbs_git_resynchronize_a_branch.md)
|
||||
* [学習リソース](ja/newbs_learn_more_resources.md)
|
||||
* チュートリアル
|
||||
* [入門](ja/newbs.md)
|
||||
* [セットアップ](ja/newbs_getting_started.md)
|
||||
* [初めてのファームウェアの構築](ja/newbs_building_firmware.md)
|
||||
* [ファームウェアのフラッシュ](ja/newbs_flashing.md)
|
||||
* [テストとデバッグ](ja/newbs_testing_debugging.md)
|
||||
* [手助けを得る/サポート](ja/support.md)
|
||||
* [他のリソース](ja/newbs_learn_more_resources.md)
|
||||
|
||||
* [QMKの基本](ja/README.md)
|
||||
* [QMK の導入](ja/getting_started_introduction.md)
|
||||
* [QMK CLI](ja/cli.md)
|
||||
* [QMK CLI 設定](ja/cli_configuration.md)
|
||||
* [QMK への貢献](ja/contributing.md)
|
||||
* [Github の使い方](ja/getting_started_github.md)
|
||||
* [ヘルプ](ja/getting_started_getting_help.md)
|
||||
* FAQ
|
||||
* [一般的な FAQ](ja/faq_general.md)
|
||||
* [QMK のビルド/コンパイル](ja/faq_build.md)
|
||||
* [QMK のデバッグ/トラブルシューティング](ja/faq_debug.md)
|
||||
* [キーマップ FAQ](ja/faq_keymap.md)
|
||||
* [用語](ja/reference_glossary.md)
|
||||
|
||||
* [破壊的な変更](ja/breaking_changes.md)
|
||||
* [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md)
|
||||
* [2019年8月30日](ja/ChangeLog/20190830.md)
|
||||
* Configurator
|
||||
* [概要](ja/newbs_building_firmware_configurator.md)
|
||||
* [ステップ・バイ・ステップ](ja/configurator_step_by_step.md)
|
||||
* [トラブルシューティング](ja/configurator_troubleshooting.md)
|
||||
* QMK API
|
||||
* [概要](ja/api_overview.md)
|
||||
* [API ドキュメント](ja/api_docs.md)
|
||||
* [キーボードサポート](ja/reference_configurator_support.md)
|
||||
|
||||
* [FAQ](ja/faq.md)
|
||||
* [一般的な FAQ](ja/faq_general.md)
|
||||
* [QMK のビルド/コンパイル](ja/faq_build.md)
|
||||
* [QMK のデバッグ/トラブルシューティング](ja/faq_debug.md)
|
||||
* [キーマップ](ja/faq_keymap.md)
|
||||
* [Zadig を使ったドライバのインストール](ja/driver_installation_zadig.md)
|
||||
* CLI
|
||||
* [概要](ja/cli.md)
|
||||
* [設定](ja/cli_configuration.md)
|
||||
* [コマンド](ja/cli_commands.md)
|
||||
|
||||
* 詳細なガイド
|
||||
* [ビルドツールのインストール](ja/getting_started_build_tools.md)
|
||||
* [Vagrant のガイド](ja/getting_started_vagrant.md)
|
||||
* [ビルド/コンパイルの説明](ja/getting_started_make_guide.md)
|
||||
* [ファームウェアのフラッシュ](ja/flashing.md)
|
||||
* [機能のカスタマイズ](ja/custom_quantum_functions.md)
|
||||
* [キーマップの概要](ja/keymap.md)
|
||||
* QMK を使う
|
||||
* ガイド
|
||||
* [機能のカスタマイズ](ja/custom_quantum_functions.md)
|
||||
* [Zadig を使ったドライバのインストール](ja/driver_installation_zadig.md)
|
||||
* [キーマップの概要](ja/keymap.md)
|
||||
* [Vagrant のガイド](ja/getting_started_vagrant.md)
|
||||
* 書き込み
|
||||
* [書き込み](ja/flashing.md)
|
||||
* [ATmega32A の書き込み (ps2avrgb)](ja/flashing_bootloadhid.md)
|
||||
* IDE
|
||||
* [Eclipse で QMK を使用](ja/other_eclipse.md)
|
||||
* [VSCode で QMK を使用](ja/other_vscode.md)
|
||||
* Git のベストプラクティス
|
||||
* [入門](ja/newbs_git_best_practices.md)
|
||||
* [フォーク](ja/newbs_git_using_your_master_branch.md)
|
||||
* [マージの競合の解決](ja/newbs_git_resolving_merge_conflicts.md)
|
||||
* [ブランチの修正](ja/newbs_git_resynchronize_a_branch.md)
|
||||
* キーボードを作る
|
||||
* [Hand Wiring ガイド](ja/hand_wire.md)
|
||||
* [ISP 書き込みガイド](ja/isp_flashing_guide.md)
|
||||
|
||||
* [ハードウェア](ja/hardware.md)
|
||||
* [互換性のあるマイクロコントローラ](ja/compatible_microcontrollers.md)
|
||||
* [AVR プロセッサ](ja/hardware_avr.md)
|
||||
* [ドライバ](ja/hardware_drivers.md)
|
||||
* 単純なキーコード
|
||||
* [完全なリスト](ja/keycodes.md)
|
||||
* [基本的なキーコード](ja/keycodes_basic.md)
|
||||
* [修飾キー](ja/feature_advanced_keycodes.md)
|
||||
* [Quantum キーコード](ja/quantum_keycodes.md)
|
||||
|
||||
* リファレンス
|
||||
* [キーボード ガイドライン](ja/hardware_keyboard_guidelines.md)
|
||||
* [設定オプション](ja/config_options.md)
|
||||
* [キーコード](ja/keycodes.md)
|
||||
* [コーディング規約 - C](ja/coding_conventions_c.md)
|
||||
* [コーディング規約 - Python](ja/coding_conventions_python.md)
|
||||
* [ドキュメント ベストプラクティス](ja/documentation_best_practices.md)
|
||||
* [ドキュメント テンプレート](ja/documentation_templates.md)
|
||||
* [用語](ja/reference_glossary.md)
|
||||
* [ユニットテスト](ja/unit_testing.md)
|
||||
* [便利な関数](ja/ref_functions.md)
|
||||
* [Configurator サポート](ja/reference_configurator_support.md)
|
||||
* [info.json 形式](ja/reference_info_json.md)
|
||||
* [Python CLI 開発](ja/cli_development.md)
|
||||
* 高度なキーコード
|
||||
* [コマンド](ja/feature_command.md)
|
||||
* [動的マクロ](ja/feature_dynamic_macros.md)
|
||||
* [グレイブ エスケープ](ja/feature_grave_esc.md)
|
||||
* [リーダーキー](ja/feature_leader_key.md)
|
||||
* [モッドタップ](ja/mod_tap.md)
|
||||
* [マクロ](ja/feature_macros.md)
|
||||
* [マウスキー](ja/feature_mouse_keys.md)
|
||||
* [Space Cadet Shift](ja/feature_space_cadet.md)
|
||||
* [US ANSI シフトキー](ja/keycodes_us_ansi_shifted.md)
|
||||
|
||||
* [機能](ja/features.md)
|
||||
* [基本的なキーコード](ja/keycodes_basic.md)
|
||||
* [US ANSI シフトキー](ja/keycodes_us_ansi_shifted.md)
|
||||
* [Quantum キーコード](ja/quantum_keycodes.md)
|
||||
* [Advanced キーコード](ja/feature_advanced_keycodes.md)
|
||||
* [オーディオ](ja/feature_audio.md)
|
||||
* [自動シフト](ja/feature_auto_shift.md)
|
||||
* [バックライト](ja/feature_backlight.md)
|
||||
* [ブルートゥース](ja/feature_bluetooth.md)
|
||||
* [ブートマジック](ja/feature_bootmagic.md)
|
||||
* [コンボ](ja/feature_combo.md)
|
||||
* [コマンド](ja/feature_command.md)
|
||||
* [デバウンス API](ja/feature_debounce_type.md)
|
||||
* [DIP スイッチ](ja/feature_dip_switch.md)
|
||||
* [動的マクロ](ja/feature_dynamic_macros.md)
|
||||
* [エンコーダ](ja/feature_encoders.md)
|
||||
* [グレイブ エスケープ](ja/feature_grave_esc.md)
|
||||
* [触覚フィードバック](ja/feature_haptic_feedback.md)
|
||||
* [HD44780 LCD コントローラ](ja/feature_hd44780.md)
|
||||
* [キーロック](ja/feature_key_lock.md)
|
||||
* [レイアウト](ja/feature_layouts.md)
|
||||
* [リーダー キー](ja/feature_leader_key.md)
|
||||
* [LED マトリックス](ja/feature_led_matrix.md)
|
||||
* [マクロ](ja/feature_macros.md)
|
||||
* [マウスキー](ja/feature_mouse_keys.md)
|
||||
* [OLED ドライバ](ja/feature_oled_driver.md)
|
||||
* [One Shot Keys](ja/one_shot_keys.md)
|
||||
* [ポインティング デバイス](ja/feature_pointing_device.md)
|
||||
* [PS/2 マウス](ja/feature_ps2_mouse.md)
|
||||
* [RGB ライト](ja/feature_rgblight.md)
|
||||
* [RGB マトリックス](ja/feature_rgb_matrix.md)
|
||||
* [Space Cadet](ja/feature_space_cadet.md)
|
||||
* [分割キーボード](ja/feature_split_keyboard.md)
|
||||
* [Stenography](ja/feature_stenography.md)
|
||||
* [Swap Hands](ja/feature_swap_hands.md)
|
||||
* [タップ ダンス](ja/feature_tap_dance.md)
|
||||
* [ターミナル](ja/feature_terminal.md)
|
||||
* [感熱式プリンタ](ja/feature_thermal_printer.md)
|
||||
* [ユニコード](ja/feature_unicode.md)
|
||||
* [ユーザスペース](ja/feature_userspace.md)
|
||||
* [Velocikey](ja/feature_velocikey.md)
|
||||
* ソフトウェア機能
|
||||
* [自動シフト](ja/feature_auto_shift.md)
|
||||
* [コンボ](ja/feature_combo.md)
|
||||
* [デバウンス API](ja/feature_debounce_type.md)
|
||||
* [キーロック](ja/feature_key_lock.md)
|
||||
* [レイヤー](ja/feature_layers.md)
|
||||
* [One Shot Keys](ja/one_shot_keys.md)
|
||||
* [ポインティング デバイス](ja/feature_pointing_device.md)
|
||||
* [Swap Hands](ja/feature_swap_hands.md)
|
||||
* [タップダンス](ja/feature_tap_dance.md)
|
||||
* [タップホールド設定](ja/tap_hold.md)
|
||||
* [ターミナル](ja/feature_terminal.md)
|
||||
* [ユニコード](ja/feature_unicode.md)
|
||||
* [ユーザスペース](ja/feature_userspace.md)
|
||||
* [WPM 計算](ja/feature_wpm.md)
|
||||
|
||||
* メーカーおよびモッダーのために
|
||||
* [Hand Wiring ガイド](ja/hand_wire.md)
|
||||
* [ISP 書き込みガイド](ja/isp_flashing_guide.md)
|
||||
* [ARM デバッグ ガイド](ja/arm_debugging.md)
|
||||
* [ADC ドライバ](ja/adc_driver.md)
|
||||
* [I2C ドライバ](ja/i2c_driver.md)
|
||||
* [WS2812 ドライバ](ja/ws2812_driver.md)
|
||||
* [EEPROM ドライバ](ja/eeprom_driver.md)
|
||||
* [GPIO コントロール](ja/internals_gpio_control.md)
|
||||
* [カスタムマトリックス](ja/custom_matrix.md)
|
||||
* [Proton C 規約](ja/proton_c_conversion.md)
|
||||
* ハードウェア機能
|
||||
* 表示
|
||||
* [HD44780 LCD コントローラ](ja/feature_hd44780.md)
|
||||
* [OLED ドライバ](ja/feature_oled_driver.md)
|
||||
* 電飾
|
||||
* [バックライト](ja/feature_backlight.md)
|
||||
* [LED マトリックス](ja/feature_led_matrix.md)
|
||||
* [RGB ライト](ja/feature_rgblight.md)
|
||||
* [RGB マトリックス](ja/feature_rgb_matrix.md)
|
||||
* [オーディオ](ja/feature_audio.md)
|
||||
* [Bluetooth](ja/feature_bluetooth.md)
|
||||
* [ブートマジック](ja/feature_bootmagic.md)
|
||||
* [カスタムマトリックス](ja/custom_matrix.md)
|
||||
* [DIP スイッチ](ja/feature_dip_switch.md)
|
||||
* [エンコーダ](ja/feature_encoders.md)
|
||||
* [触覚フィードバック](ja/feature_haptic_feedback.md)
|
||||
* [Proton C 規約](ja/proton_c_conversion.md)
|
||||
* [PS/2 マウス](ja/feature_ps2_mouse.md)
|
||||
* [分割キーボード](ja/feature_split_keyboard.md)
|
||||
* [Stenography](ja/feature_stenography.md)
|
||||
* [感熱式プリンタ](ja/feature_thermal_printer.md)
|
||||
* [Velocikey](ja/feature_velocikey.md)
|
||||
|
||||
* より深く知るために
|
||||
* [キーボードがどのように動作するか](ja/how_keyboards_work.md)
|
||||
* [QMK の理解](ja/understanding_qmk.md)
|
||||
* QMK の開発
|
||||
* 破壊的な変更
|
||||
* [概要](ja/breaking_changes.md)
|
||||
* [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md)
|
||||
* 履歴
|
||||
* [2020年2月29日](ja/ChangeLog/20200229.md)
|
||||
* [2019年8月30日](ja/ChangeLog/20190830.md)
|
||||
|
||||
* 他の話題
|
||||
* [Eclipse で QMK を使用](ja/other_eclipse.md)
|
||||
* [VSCode で QMK を使用](ja/other_vscode.md)
|
||||
* [サポート](ja/getting_started_getting_help.md)
|
||||
* [翻訳を追加する方法](ja/translating.md)
|
||||
* C 開発
|
||||
* [ARM デバッグ ガイド](ja/arm_debugging.md)
|
||||
* [AVR プロセッサ](ja/hardware_avr.md)
|
||||
* [コーディング規約](ja/coding_conventions_c.md)
|
||||
* [互換性のあるマイクロコントローラ](ja/compatible_microcontrollers.md)
|
||||
* [ドライバ](ja/hardware_drivers.md)
|
||||
* [ADC ドライバ](ja/adc_driver.md)
|
||||
* [I2C ドライバ](ja/i2c_driver.md)
|
||||
* [WS2812 ドライバ](ja/ws2812_driver.md)
|
||||
* [EEPROM ドライバ](ja/eeprom_driver.md)
|
||||
* [GPIO コントロール](ja/internals_gpio_control.md)
|
||||
* [キーボード ガイドライン](ja/hardware_keyboard_guidelines.md)
|
||||
|
||||
* QMK の内部詳細(作成中)
|
||||
* [定義](ja/internals_defines.md)
|
||||
* [Input Callback Reg](ja/internals_input_callback_reg.md)
|
||||
* [Midi ドライバ](ja/internals_midi_device.md)
|
||||
* [Midi デバイスのセットアップ手順](ja/internals_midi_device_setup_process.md)
|
||||
* [Midi ユーティリティ](ja/internals_midi_util.md)
|
||||
* [Send Functions](ja/internals_send_functions.md)
|
||||
* [Sysex Tools](ja/internals_sysex_tools.md)
|
||||
* Python 開発
|
||||
* [コーディング規約](ja/coding_conventions_python.md)
|
||||
* [QMK CLI 開発](ja/cli_development.md)
|
||||
|
||||
* Configurator 開発
|
||||
* QMK API
|
||||
* [開発環境](ja/api_development_environment.md)
|
||||
* [アーキテクチャの概要](ja/api_development_overview.md)
|
||||
|
||||
* QMK Reference
|
||||
* [QMK への貢献](ja/contributing.md)
|
||||
* [QMK ドキュメントの翻訳](ja/translating.md)
|
||||
* [設定オプション](ja/config_options.md)
|
||||
* [Make ドキュメント](ja/getting_started_make_guide.md)
|
||||
* [ドキュメント ベストプラクティス](ja/documentation_best_practices.md)
|
||||
* [ドキュメント テンプレート](ja/documentation_templates.md)
|
||||
* [コミュニティレイアウト](ja/feature_layouts.md)
|
||||
* [ユニットテスト](ja/unit_testing.md)
|
||||
* [便利な関数](ja/ref_functions.md)
|
||||
* [info.json 形式](ja/reference_info_json.md)
|
||||
|
||||
* より深く知るために
|
||||
* [キーボードがどのように動作するか](ja/how_keyboards_work.md)
|
||||
* [マトリックスがどのように動作するか](ja/how_a_matrix_works.md)
|
||||
* [QMK を理解する](ja/understanding_qmk.md)
|
||||
|
||||
* QMK の内部詳細(作成中)
|
||||
* [定義](ja/internals_defines.md)
|
||||
* [Input Callback Reg](ja/internals_input_callback_reg.md)
|
||||
* [Midi デバイス](ja/internals_midi_device.md)
|
||||
* [Midi デバイスのセットアップ手順](ja/internals_midi_device_setup_process.md)
|
||||
* [Midi ユーティリティ](ja/internals_midi_util.md)
|
||||
* [Send Functions](ja/internals_send_functions.md)
|
||||
* [Sysex Tools](ja/internals_sysex_tools.md)
|
||||
|
@ -1,8 +1,8 @@
|
||||
# 貢献方法
|
||||
|
||||
<!---
|
||||
original document: d47809575:docs/contributing.md
|
||||
git diff d47809575 HEAD -- docs/contributing.md | cat
|
||||
original document: 0.8.62:docs/contributing.md
|
||||
git diff 0.8.62 HEAD -- docs/contributing.md | cat
|
||||
-->
|
||||
|
||||
👍🎉 まず、これを読み貢献する時間を作ってくれてありがとうございます!🎉👍
|
||||
@ -106,7 +106,7 @@ enum my_keycodes {
|
||||
};
|
||||
```
|
||||
|
||||
### ドキュメントのプレビュー
|
||||
### ドキュメントのプレビュー :id=previewing-the-documentation
|
||||
|
||||
開発環境をセットアップした場合は、プルリクエストを開く前に以下のコマンドを `qmk_firmware/` フォルダから実行することで、あなたの変更をプレビューすることができます:
|
||||
|
||||
@ -122,7 +122,7 @@ enum my_keycodes {
|
||||
|
||||
ほとんどの初めての QMK 貢献者は、個人のキーマップから始めます。キーマップの標準はかなりカジュアルなものにしようとしています(キーマップは結局のところ作成者の性格を反映しています)が、他の人があなたのキーマップを簡単に見つけて学ぶことができるように、これらのガイドラインに従うようにお願いします。
|
||||
|
||||
* [the template](documentation_templates.md) を使って `readme.md` を書きます。
|
||||
* [テンプレート](documentation_templates.md) を使って `readme.md` を書きます。
|
||||
* 全てのキーマップの PR は squash されるため、コミットがどのように squash されるかを気にする場合は、自分で行う必要があります。
|
||||
* キーマップの PR に機能をまとめないでください。最初に機能をサブミットし、次にキーマップのための2つ目の PR をサブミットします。
|
||||
* `Makefile` をキーマップフォルダに含めないでください(もう使われていません)。
|
||||
@ -134,7 +134,7 @@ enum my_keycodes {
|
||||
|
||||
また以下のガイドラインに従うことをお願いします:
|
||||
|
||||
* [the template](ja/documentation_templates.md) を使って `readme.md` を書きます。
|
||||
* [テンプレート](ja/documentation_templates.md) を使って `readme.md` を書きます。
|
||||
* コミットの数を適切に保ってください。そうでなければあなたの PR を squash します。
|
||||
* コア機能を新しいキーボードにまとめないでください。最初に機能をサブミットし、次にキーボード用に別の PR をサブミットしてください。
|
||||
* `.c`/`.h` ファイルにすぐ上の親フォルダに従って名前を付けます。例えば、`/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||
|
@ -1,8 +1,8 @@
|
||||
# キーボードの挙動をカスタマイズする方法
|
||||
|
||||
<!---
|
||||
original document: 7494490d6:docs/custom_quantum_functions.md
|
||||
git diff 7494490d6 HEAD -- docs/custom_quantum_functions.md | cat
|
||||
original document: 0.8.62:docs/custom_quantum_functions.md
|
||||
git diff 0.8.62 HEAD -- docs/custom_quantum_functions.md | cat
|
||||
-->
|
||||
|
||||
多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。
|
||||
@ -39,7 +39,7 @@ enum my_keycodes {
|
||||
};
|
||||
```
|
||||
|
||||
## 任意のキーコードの挙動のプログラミング
|
||||
## 任意のキーコードの挙動のプログラミング :id=programming-the-behavior-of-any-keycode
|
||||
|
||||
既存のキーの挙動を上書きしたい場合、あるいは新しいキーについて挙動を定義する場合、`process_record_kb()` および `process_record_user()` 関数を使うべきです。これらは実際のキーイベントが処理される前のキー処理中に QMK によって呼び出されます。これらの関数が `true` を返す場合、QMK はキーコードを通常通りに処理します。これは、キーを置き換えるのではなく、キーの機能を拡張するのに便利です。これらの関数が `false` を返す場合、QMK は通常のキー処理をスキップし、必要なキーのアップまたはダウンイベントを送信するのかはユーザ次第です。
|
||||
|
||||
@ -316,7 +316,7 @@ void suspend_wakeup_init_user(void) {
|
||||
* キーボード/リビジョン : `void suspend_power_down_kb(void)` および `void suspend_wakeup_init_user(void)`
|
||||
* キーマップ: `void suspend_power_down_kb(void)` および `void suspend_wakeup_init_user(void)`
|
||||
|
||||
# レイヤー切り替えコード
|
||||
# レイヤー切り替えコード :id=layer-change-code
|
||||
|
||||
これはレイヤーが切り替えられるたびにコードを実行します。レイヤー表示あるいはカスタムレイヤー処理に役立ちます。
|
||||
|
||||
@ -491,14 +491,24 @@ void eeconfig_init_user(void) { // EEPROM がリセットされます!
|
||||
|
||||
# カスタムタッピング期間
|
||||
|
||||
デフォルトでは、タッピング期間はグローバルに設定されていて、キーでは設定することができません。ほとんどのユーザにとって、これは全然問題ありません。しかし、場合によっては、`LT` キーとは異なるタイムアウトによって、デュアルファンクションキーが大幅に改善されます。なぜなら、一部のキーは他のキーよりも押し続けやすいためです。それぞれにカスタムキーコードを使う代わりに、キーごとに設定可能な `TAPPING_TERM` を使用できます。
|
||||
デフォルトでは、タッピング期間と(`IGNORE_MOD_TAP_INTERRUPT` のような)関連オプションはグローバルに設定されていて、キーでは設定することができません。ほとんどのユーザにとって、これは全然問題ありません。しかし、場合によっては、`LT` キーとは異なるタイムアウトによって、デュアルファンクションキーが大幅に改善されます。なぜなら、一部のキーは他のキーよりも押し続けやすいためです。それぞれにカスタムキーコードを使う代わりに、キーごとに設定可能なタイムアウトの挙動を設定できます。
|
||||
|
||||
この機能を有効にするには、最初に `config.h` に `#define TAPPING_TERM_PER_KEY` を追加する必要があります。
|
||||
キーごとのタイムアウトの挙動を制御するための2つの設定可能なオプションがあります:
|
||||
|
||||
- `TAPPING_TERM_PER_KEY`
|
||||
- `IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
|
||||
|
||||
必要な機能ごとに、`config.h` に `#define` 行を追加する必要があります。
|
||||
|
||||
```
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
|
||||
```
|
||||
|
||||
|
||||
## `get_tapping_term` の実装例
|
||||
|
||||
キーコードに基づいて `TAPPING TERM` を変更するには、次のようなものを `keymap.c` ファイルに追加します:
|
||||
キーコードに基づいて `TAPPING_TERM` を変更するには、次のようなものを `keymap.c` ファイルに追加します:
|
||||
|
||||
```c
|
||||
uint16_t get_tapping_term(uint16_t keycode) {
|
||||
@ -513,6 +523,21 @@ uint16_t get_tapping_term(uint16_t keycode) {
|
||||
}
|
||||
```
|
||||
|
||||
### `get_tapping_term` 関数のドキュメント
|
||||
## `get_ignore_mod_tap_interrupt` の実装例
|
||||
|
||||
キーコードに基づいて `IGNORE_MOD_TAP_INTERRUPT` の値を変更するには、次のようなものを `keymap.c` ファイルに追加します:
|
||||
|
||||
```c
|
||||
bool get_ignore_mod_tap_interrupt(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
case SFT_T(KC_SPC):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `get_tapping_term` / `get_ignore_mod_tap_interrupt` 関数のドキュメント
|
||||
|
||||
ここにある他の多くの関数とは異なり、quantum あるいはキーボードレベルの関数を持つ必要はありません (または理由さえありません)。ここではユーザレベルの関数だけが有用なため、そのようにマークする必要はありません。
|
||||
|
@ -1,13 +1,13 @@
|
||||
# 書き込みの手順とブートローダ情報
|
||||
|
||||
<!---
|
||||
original document: 7494490d6:docs/flashing.md
|
||||
git diff 7494490d6 HEAD -- docs/flashing.md | cat
|
||||
original document: 0.8.62:docs/flashing.md
|
||||
git diff 0.8.62 HEAD -- docs/flashing.md | cat
|
||||
-->
|
||||
|
||||
キーボードが使用するブートローダにはかなり多くの種類があり、ほぼ全てが異なる書き込みの方法を使います。幸いなことに、[QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) のようなプロジェクトは、あまり深く考える必要無しに様々なタイプと互換性を持つことを目指していますが、この文章では様々なタイプのブートローダとそれらを書き込むために利用可能な方法について説明します。
|
||||
|
||||
`rules.mk` の `BOOTLOADER` 変数で選択されたブートローダがある場合、QMK は .hex ファイルがデバイスに書き込むのに適切なサイズかどうかを自動的に計算し、合計サイズをバイト単位で(最大値とともに)出力します。この処理を手動で実行するには、`check-size` を付けてコンパイルします。例えば、`make planck/rev4:default:check-size`。
|
||||
`rules.mk` の `BOOTLOADER` 変数で選択されたブートローダがある場合、QMK は .hex ファイルがデバイスに書き込むのに適切なサイズかどうかを自動的に計算し、合計サイズをバイト単位で(最大値とともに)出力します。
|
||||
|
||||
## DFU
|
||||
|
||||
@ -105,7 +105,7 @@ BOOTLOADER = caterina
|
||||
make <keyboard>:<keymap>:avrdude
|
||||
|
||||
|
||||
#### Caterina コマンド
|
||||
### Caterina コマンド
|
||||
|
||||
ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
# キーマップの概要
|
||||
|
||||
<!---
|
||||
original document: 7494490d6:docs/keymap.md
|
||||
git diff 7494490d6 HEAD -- docs/keymap.md | cat
|
||||
original document: 0.8.62:docs/keymap.md
|
||||
git diff 0.8.62 HEAD -- docs/keymap.md | cat
|
||||
-->
|
||||
|
||||
QMK のキーマップは C のソースファイルの中で定義されます。そのデータ構造は配列の配列です。外側はレイヤーを要素とする配列で、レイヤーはキーを要素とする配列。ほとんどのキーボードは `LAYOUT()` マクロを定義して、この配列の配列を作成しやすくしています。
|
||||
|
||||
|
||||
## キーマップとレイヤー
|
||||
## キーマップとレイヤー :id=keymap-and-layers
|
||||
QMKでは、**`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`**は、**アクションコード**を保持している **16 bit** データの中でキーマップ情報の複数の**レイヤー**を保持します。最大で**32個のレイヤー**を定義することができます。
|
||||
|
||||
普通のキー定義の場合、**アクションコード**の上位8ビットは全て0で、下位8ビットは**キーコード**としてキーによって生成された USB HID usage コードを保持します。
|
||||
@ -32,7 +32,8 @@ QMKでは、**`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`**は
|
||||
|
||||
TMK の歴史的経緯から、キーマップに保存されたアクションコードは、一部のドキュメントではキーコードと呼ばれる場合があります。
|
||||
|
||||
### キーマップレイヤーステータス
|
||||
### キーマップレイヤーステータス :id=keymap-layer-status
|
||||
|
||||
キーマップレイヤーの状態は、2つの32ビットパラメータによって決定されます。
|
||||
|
||||
* **`default_layer_state`** は、常に有効で参照される基本キーマップレイヤー (0-31) を示します (デフォルトレイヤー)。
|
||||
|
@ -50,7 +50,7 @@ After opening a new MSYS2 MinGW 64-bit terminal, make sure `pacman` is up to dat
|
||||
|
||||
You may be asked to close and reopen the window. Do this and keep running the above command until it says `there is nothing to do`. Then run the following:
|
||||
|
||||
pacman -S git python3-pip
|
||||
pacman -S git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3-pip
|
||||
python3 -m pip install qmk
|
||||
|
||||
### macOS
|
||||
|
@ -162,6 +162,15 @@ The `process_record()` function itself is deceptively simple, but hidden within
|
||||
|
||||
At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing.
|
||||
|
||||
After this is called, `post_process_record()` is called, which can be used to handle additional cleanup that needs to be run after the keycode is normally handled.
|
||||
|
||||
* [`void post_process_record(keyrecord_t *record)`]()
|
||||
* [`void post_process_record_quantum(keyrecord_t *record)`]()
|
||||
* [Map this record to a keycode]()
|
||||
* [`void post_process_clicky(uint16_t keycode, keyrecord_t *record)`]()
|
||||
* [`void post_process_record_kb(uint16_t keycode, keyrecord_t *record)`]()
|
||||
* [`void post_process_record_user(uint16_t keycode, keyrecord_t *record)`]()
|
||||
|
||||
<!--
|
||||
#### Mouse Handling
|
||||
|
||||
|
714
keyboards/acheron/keebspcb/chconf.h
Normal file
714
keyboards/acheron/keebspcb/chconf.h
Normal file
File diff suppressed because it is too large
Load Diff
71
keyboards/acheron/keebspcb/config.h
Normal file
71
keyboards/acheron/keebspcb/config.h
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
Copyright 2015 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x4150 // AP for AcheronProject
|
||||
#define PRODUCT_ID 0x4B45 // KE for Keebs
|
||||
#define DEVICE_VER 0x0001 // Revision pre-Alpha
|
||||
#define MANUFACTURER AcheronProject
|
||||
#define PRODUCT KeebsPCB
|
||||
#define DESCRIPTION AcheronProject KeebsPCB
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 13
|
||||
|
||||
#define MATRIX_COL_PINS { B12, A1, A0, F1, F0, C15, C14, C13, B9, B8, B7, B6, B5}
|
||||
#define MATRIX_ROW_PINS { B4, B3, A2, A3, A4}
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
//#define BACKLIGHT_PIN A6
|
||||
//#define BACKLIGHT_PWM_DRIVER PWMD3
|
||||
//#define BACKLIGHT_PWM_CHANNEL 1
|
||||
//#define BACKLIGHT_PAL_MODE 1
|
||||
//#define BACKLIGHT_LEVELS 6
|
||||
//#define BACKLIGHT_BREATHING
|
||||
//#define BREATHING_PERIOD 6
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
525
keyboards/acheron/keebspcb/halconf.h
Normal file
525
keyboards/acheron/keebspcb/halconf.h
Normal file
File diff suppressed because it is too large
Load Diff
12
keyboards/acheron/keebspcb/info.json
Normal file
12
keyboards/acheron/keebspcb/info.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "KeebsPCB",
|
||||
"url": "http://gondolindrim.github.io/AcheronDocs/keebs/intro.html",
|
||||
"maintainer": "Gondolindrim",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_60_ansi_tsangan": {
|
||||
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Menu", "x":13.5, "y":4, "w":1.5}]
|
||||
}
|
||||
}
|
||||
}
|
1
keyboards/acheron/keebspcb/keebspcb.c
Normal file
1
keyboards/acheron/keebspcb/keebspcb.c
Normal file
@ -0,0 +1 @@
|
||||
#include "keebspcb.h"
|
19
keyboards/acheron/keebspcb/keebspcb.h
Normal file
19
keyboards/acheron/keebspcb/keebspcb.h
Normal file
@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define ___ KC_NO
|
||||
|
||||
#define LAYOUT_60_ansi_tsangan( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K3C, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K4C, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \
|
||||
K40, K41, K42, K46, K49, K4A, K4B \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C}, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C}, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C}, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C}, \
|
||||
{ K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, K4C} \
|
||||
}
|
32
keyboards/acheron/keebspcb/keymaps/default/keymap.c
Executable file
32
keyboards/acheron/keebspcb/keymaps/default/keymap.c
Executable file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright 2012,2013 Gondolindrim
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_60_ansi_tsangan(
|
||||
KC_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC,
|
||||
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT ,
|
||||
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1) , KC_RCTL ),
|
||||
[1] = LAYOUT_60_ansi_tsangan(
|
||||
KC_GRV, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_TRNS, KC_TRNS, KC_DEL,
|
||||
KC_TRNS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS ),
|
||||
};
|
176
keyboards/acheron/keebspcb/mcuconf.h
Normal file
176
keyboards/acheron/keebspcb/mcuconf.h
Normal file
@ -0,0 +1,176 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _MCUCONF_H_
|
||||
#define _MCUCONF_H_
|
||||
|
||||
/*
|
||||
* STM32F0xx drivers configuration.
|
||||
* The following settings override the default settings present in
|
||||
* the various device driver implementation headers.
|
||||
* Note that the settings for each driver only have effect if the whole
|
||||
* driver is enabled in halconf.h.
|
||||
*
|
||||
* IRQ priorities:
|
||||
* 3...0 Lowest...Highest.
|
||||
*
|
||||
* DMA priorities:
|
||||
* 0...3 Lowest...Highest.
|
||||
*/
|
||||
|
||||
#define STM32F0xx_MCUCONF
|
||||
// #define STM32F070xB
|
||||
|
||||
/*
|
||||
* HAL driver system settings.
|
||||
*/
|
||||
#define STM32_NO_INIT FALSE
|
||||
#define STM32_PVD_ENABLE FALSE
|
||||
#define STM32_PLS STM32_PLS_LEV0
|
||||
#define STM32_HSI_ENABLED TRUE
|
||||
#define STM32_HSI14_ENABLED TRUE
|
||||
#define STM32_HSI48_ENABLED FALSE
|
||||
#define STM32_LSI_ENABLED TRUE
|
||||
#define STM32_HSE_ENABLED FALSE
|
||||
#define STM32_LSE_ENABLED FALSE
|
||||
#define STM32_SW STM32_SW_PLL
|
||||
#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2
|
||||
#define STM32_PREDIV_VALUE 1
|
||||
#define STM32_PLLMUL_VALUE 12
|
||||
#define STM32_HPRE STM32_HPRE_DIV1
|
||||
#define STM32_PPRE STM32_PPRE_DIV1
|
||||
#define STM32_ADCSW STM32_ADCSW_HSI14
|
||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||
#define STM32_ADCSW STM32_ADCSW_HSI14
|
||||
#define STM32_USBSW STM32_USBSW_HSI48
|
||||
#define STM32_CECSW STM32_CECSW_HSI
|
||||
#define STM32_I2C1SW STM32_I2C1SW_HSI
|
||||
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||
|
||||
/*
|
||||
* ADC driver system settings.
|
||||
*/
|
||||
#define STM32_ADC_USE_ADC1 FALSE
|
||||
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||
#define STM32_ADC_IRQ_PRIORITY 2
|
||||
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2
|
||||
|
||||
/*
|
||||
* EXT driver system settings.
|
||||
*/
|
||||
#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3
|
||||
#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3
|
||||
#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3
|
||||
#define STM32_EXT_EXTI16_IRQ_PRIORITY 3
|
||||
#define STM32_EXT_EXTI17_IRQ_PRIORITY 3
|
||||
|
||||
/*
|
||||
* GPT driver system settings.
|
||||
*/
|
||||
#define STM32_GPT_USE_TIM1 FALSE
|
||||
#define STM32_GPT_USE_TIM2 FALSE
|
||||
#define STM32_GPT_USE_TIM3 FALSE
|
||||
#define STM32_GPT_USE_TIM14 FALSE
|
||||
#define STM32_GPT_TIM1_IRQ_PRIORITY 2
|
||||
#define STM32_GPT_TIM2_IRQ_PRIORITY 2
|
||||
#define STM32_GPT_TIM3_IRQ_PRIORITY 2
|
||||
#define STM32_GPT_TIM14_IRQ_PRIORITY 2
|
||||
|
||||
/*
|
||||
* I2C driver system settings.
|
||||
*/
|
||||
#define STM32_I2C_USE_I2C1 FALSE
|
||||
#define STM32_I2C_USE_I2C2 FALSE
|
||||
#define STM32_I2C_BUSY_TIMEOUT 50
|
||||
#define STM32_I2C_I2C1_IRQ_PRIORITY 3
|
||||
#define STM32_I2C_I2C2_IRQ_PRIORITY 3
|
||||
#define STM32_I2C_USE_DMA FALSE
|
||||
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* ICU driver system settings.
|
||||
*/
|
||||
#define STM32_ICU_USE_TIM1 FALSE
|
||||
#define STM32_ICU_USE_TIM2 FALSE
|
||||
#define STM32_ICU_USE_TIM3 FALSE
|
||||
#define STM32_ICU_TIM1_IRQ_PRIORITY 3
|
||||
#define STM32_ICU_TIM2_IRQ_PRIORITY 3
|
||||
#define STM32_ICU_TIM3_IRQ_PRIORITY 3
|
||||
|
||||
/*
|
||||
* PWM driver system settings.
|
||||
*/
|
||||
#define STM32_PWM_USE_ADVANCED FALSE
|
||||
#define STM32_PWM_USE_TIM1 FALSE
|
||||
#define STM32_PWM_USE_TIM2 FALSE
|
||||
#define STM32_PWM_USE_TIM3 FALSE
|
||||
#define STM32_PWM_TIM1_IRQ_PRIORITY 3
|
||||
#define STM32_PWM_TIM2_IRQ_PRIORITY 3
|
||||
#define STM32_PWM_TIM3_IRQ_PRIORITY 3
|
||||
|
||||
/*
|
||||
* SERIAL driver system settings.
|
||||
*/
|
||||
#define STM32_SERIAL_USE_USART1 FALSE
|
||||
#define STM32_SERIAL_USE_USART2 FALSE
|
||||
#define STM32_SERIAL_USART1_PRIORITY 3
|
||||
#define STM32_SERIAL_USART2_PRIORITY 3
|
||||
|
||||
/*
|
||||
* SPI driver system settings.
|
||||
*/
|
||||
#define STM32_SPI_USE_SPI1 FALSE
|
||||
#define STM32_SPI_USE_SPI2 FALSE
|
||||
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI1_IRQ_PRIORITY 2
|
||||
#define STM32_SPI_SPI2_IRQ_PRIORITY 2
|
||||
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* ST driver system settings.
|
||||
*/
|
||||
#define STM32_ST_IRQ_PRIORITY 2
|
||||
#define STM32_ST_USE_TIMER 2
|
||||
|
||||
/*
|
||||
* UART driver system settings.
|
||||
*/
|
||||
#define STM32_UART_USE_USART1 FALSE
|
||||
#define STM32_UART_USE_USART2 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* USB driver system settings.
|
||||
*/
|
||||
#define STM32_USB_USE_USB1 TRUE
|
||||
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||
#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
|
||||
|
||||
#endif /* _MCUCONF_H_ */
|
33
keyboards/acheron/keebspcb/readme.md
Normal file
33
keyboards/acheron/keebspcb/readme.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Acheron Aχξρων 60-SM-S-STM32-MX-HS-WI (codename "KeebsPCB") QMK firmware
|
||||
|
||||
<p align="center">
|
||||
<img align="middle" src="https://raw.githubusercontent.com/Gondolindrim/acheronLibrary/master/graphics/acheronLong.png" width="400">
|
||||
</p>
|
||||
|
||||
## Introduction
|
||||
|
||||
This is the QMK firmware repository for the KeebsPCB, updated until [pre-revision Alpha](https://github.com/Gondolindrim/KeebsPCB/releases/tag/pre-Alpha).
|
||||
|
||||
The KeebsPCB is an Open-Hardware guidelines compliant PCB which files can be found at [this link](https://github.com/Gondolindrim/KeebsPCB). Its designer and maintainer is [Gondolindrim](https://github.com/Gondolindrim).
|
||||
|
||||
The KeebsPCB is a collaboration between Gondolindrim and MrKeebs; its layouts and features were cherry-picked by MrKeebs and the PCB was designed for him with these chosen features.
|
||||
|
||||
As of may 2020, there is no way to buy an KeebsPCB through a vendor or Group Buy; the only possible way is ordering them directly from a manufacturer.
|
||||
|
||||
## Layouts
|
||||
|
||||
The PCB offers a single layout consisting of a default ANSI layout with 7U bottom row.
|
||||
|
||||
## PCB Documentation
|
||||
|
||||
See the [AcheronDocs](https://gondolindrim.github.io/AcheronDocs/keebs/intro.html) page for the KeebsPCB full documentation. You can also check the KiCad PCB files at the [KeebsPCB GitHub repository](https://github.com/Gondolindrim/KeebsPCB).
|
||||
|
||||
Before using the files for personal or commercial use, please read the [Acheron Open-Hardware License V1.2](https://gondolindrim.github.io/AcheronDocs/license/license.html) under which the Austin PCB is published.
|
||||
|
||||
## How to compile
|
||||
|
||||
After setting up your build environment, you can compile the KeebsPCB default keymap by using:
|
||||
|
||||
make acheron/keebspcb: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).
|
27
keyboards/acheron/keebspcb/rules.mk
Normal file
27
keyboards/acheron/keebspcb/rules.mk
Normal file
@ -0,0 +1,27 @@
|
||||
# MCU name
|
||||
MCU = STM32F072
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
|
||||
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
||||
|
||||
LAYOUTS = 60_ansi_tsangan
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define PRODUCT_ID 0x422D
|
||||
#define DEVICE_VER 0x0200
|
||||
#define MANUFACTURER LSJ
|
||||
#define PRODUCT QMK Firmware for Ares
|
||||
#define PRODUCT Ares
|
||||
|
||||
#define RGBLED_NUM 16
|
||||
|
||||
|
@ -231,31 +231,6 @@ section at the end of this file).
|
||||
#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF)
|
||||
/* Version number of the device: Minor number first, then major number.
|
||||
*/
|
||||
#define USB_CFG_VENDOR_NAME 'L', 'S', 'J'
|
||||
#define USB_CFG_VENDOR_NAME_LEN 3
|
||||
/* These two values define the vendor name returned by the USB device. The name
|
||||
* must be given as a list of characters under single quotes. The characters
|
||||
* are interpreted as Unicode (UTF-16) entities.
|
||||
* If you don't want a vendor name string, undefine these macros.
|
||||
* ALWAYS define a vendor name containing your Internet domain name if you use
|
||||
* obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
|
||||
* details.
|
||||
*/
|
||||
#define USB_CFG_DEVICE_NAME 'A', 'r', 'e', 's'
|
||||
#define USB_CFG_DEVICE_NAME_LEN 4
|
||||
/* Same as above for the device name. If you don't want a device name, undefine
|
||||
* the macros. See the file USB-IDs-for-free.txt before you assign a name if
|
||||
* you use a shared VID/PID.
|
||||
*/
|
||||
/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
|
||||
/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
|
||||
/* Same as above for the serial number. If you don't want a serial number,
|
||||
* undefine the macros.
|
||||
* It may be useful to provide the serial number through other means than at
|
||||
* compile time. See the section about descriptor properties below for how
|
||||
* to fine tune control over USB descriptors such as the string descriptor
|
||||
* for the serial number.
|
||||
*/
|
||||
#define USB_CFG_DEVICE_CLASS 0
|
||||
#define USB_CFG_DEVICE_SUBCLASS 0
|
||||
/* See USB specification if you want to conform to an existing device class.
|
||||
@ -337,11 +312,11 @@ section at the end of this file).
|
||||
#define USB_CFG_DESCR_PROPS_DEVICE 0
|
||||
#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
|
||||
//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
|
||||
#define USB_CFG_DESCR_PROPS_STRINGS 0
|
||||
#define USB_CFG_DESCR_PROPS_STRING_0 0
|
||||
#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
|
||||
#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
|
||||
#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
|
||||
#define USB_CFG_DESCR_PROPS_STRINGS USB_PROP_IS_DYNAMIC
|
||||
#define USB_CFG_DESCR_PROPS_STRING_0 USB_PROP_IS_DYNAMIC
|
||||
#define USB_CFG_DESCR_PROPS_STRING_VENDOR USB_PROP_IS_DYNAMIC
|
||||
#define USB_CFG_DESCR_PROPS_STRING_PRODUCT USB_PROP_IS_DYNAMIC
|
||||
#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER USB_PROP_IS_DYNAMIC
|
||||
#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
|
||||
//#define USB_CFG_DESCR_PROPS_HID 0
|
||||
#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
|
||||
|
21
keyboards/basekeys/slice/config.h
Normal file
21
keyboards/basekeys/slice/config.h
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
22
keyboards/basekeys/slice/keymaps/default/config.h
Normal file
22
keyboards/basekeys/slice/keymaps/default/config.h
Normal file
@ -0,0 +1,22 @@
|
||||
/* Copyright 2020 2Moons
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define TAPPING_FORCE_HOLD
|
||||
#define TAPPING_TERM 180
|
131
keyboards/basekeys/slice/keymaps/default/keymap.c
Normal file
131
keyboards/basekeys/slice/keymaps/default/keymap.c
Normal file
@ -0,0 +1,131 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "split_util.h"
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number {
|
||||
_QWERTY = 0,
|
||||
_FN,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
RGB_RST = SAFE_RANGE
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT(
|
||||
//,------------------------------------------------------------------------| |---------------------------------------------------------------------------.
|
||||
KC_ESC, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPACE,
|
||||
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
RGB_MODE_FORWARD, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
RGB_MODE_GRADIENT, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
RGB_MODE_XMAS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
|
||||
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN)
|
||||
//`------------------------------------------------------------------------| |---------------------------------------------------------------------------'
|
||||
),
|
||||
|
||||
[_FN] = LAYOUT(
|
||||
//,-------------------------------------------------------------------------| |---------------------------------------------------------------------------.
|
||||
KC_ESC, TG(_ADJUST), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPACE,
|
||||
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUSE, KC_UP, _______, _______, _______,
|
||||
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______, _______,
|
||||
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______,
|
||||
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
//`-------------------------------------------------------------------------| |---------------------------------------------------------------------------'
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT( /* Base */
|
||||
//,-------------------------------------------------------------------------| |---------------------------------------------------------------------------.
|
||||
XXXXXXX,TG(_ADJUST),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
||||
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX,
|
||||
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
//`-----------------------------------------------------------------| |---------------------------------------------------------------------------'
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
|
||||
int RGB_current_mode;
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
bool result = false;
|
||||
switch (keycode) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
case RGB_MOD:
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_step();
|
||||
RGB_current_mode = rgblight_get_mode();
|
||||
}
|
||||
break;
|
||||
case RGB_RST:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
RGB_current_mode = rgblight_get_mode();
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
|
||||
const char *read_logo(void) {
|
||||
static char logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
|
||||
0};
|
||||
return logo;
|
||||
}
|
||||
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0;
|
||||
}
|
||||
|
||||
void oled_task_user(void) {
|
||||
if (is_keyboard_master()) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
case _FN:
|
||||
oled_write_P(PSTR("Function\n"), false);
|
||||
break;
|
||||
default:
|
||||
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||
oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
led_t led_usb_state = host_keyboard_led_state();
|
||||
oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
|
||||
} else {
|
||||
oled_write(read_logo(), false);
|
||||
}
|
||||
}
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user