From c7ee4b3f63e00e51dde570a2aa91fca1e73fec2b Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Sun, 18 Mar 2018 18:40:59 +0900 Subject: [PATCH 1/5] Helix keyboard OLED, RGBLIGHT enable/disable control integrate into rules.mk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rules.mk: add 4 Variables for compile control. # Helix keyboard customize # you can edit follows 4 Variables # jp: 以下の4つの変数を必要に応じて編集します。 OLED_ENABLE = no # OLED_ENABLE LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations config.h: auto set RGBLED_NUM by HELIX_ROWS and rules.mk's define --- keyboards/helix/rev2/config.h | 2 +- keyboards/helix/rev2/keymaps/default/config.h | 22 +++++--- keyboards/helix/rev2/keymaps/default/rules.mk | 52 ++++++++++++++++++- 3 files changed, 67 insertions(+), 9 deletions(-) diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h index 5905627760..e8ad1b9bed 100644 --- a/keyboards/helix/rev2/config.h +++ b/keyboards/helix/rev2/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_TIMER -#define RGBLED_NUM 12 // Number of LEDs +//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h #define ws2812_PORTREG PORTD #define ws2812_DDRREG DDRD diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h index 53ff0b3ca8..987c9b0d19 100644 --- a/keyboards/helix/rev2/keymaps/default/config.h +++ b/keyboards/helix/rev2/keymaps/default/config.h @@ -36,7 +36,10 @@ along with this program. If not, see . // #define EE_HANDS // Helix keyboard OLED support -//#define SSD1306OLED +// see ./rules.mk: OLED_ENABLE=yes or no +#ifdef OLED_ENABLE + #define SSD1306OLED +#endif /* Select rows configuration */ // Rows are 4 or 5 @@ -62,12 +65,19 @@ along with this program. If not, see . #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 +// Helix keyboard RGB LED support +//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no +// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes +#ifdef RGBLED_BACK + #if HELIX_ROWS == 4 + #define RGBLED_NUM 25 + #elif HELIX_ROWS == 5 + #define RGBLED_NUM 32 + #endif +#else + #define RGBLED_NUM 6 +#endif -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -// Helix keyboard : see ./rules.mk: RGBLIGHT_ENABLE = yes or no -// Helix keyboard : RGBLED_NUM 6 or 32 -#define RGBLED_NUM 6 #if RGBLED_NUM <= 6 #define RGBLIGHT_LIMIT_VAL 255 #else diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index f4d3454351..1705579ad8 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -14,14 +14,62 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -# Helix keyboard : see ./config.h: RGBLED_NUM 6 or 32 -# Helix keyboard : RGBLIGHT_ENABLE = no or yes RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. ONEHAND_ENABLE = no # Enable one-hand typing +define HELIX_CUSTOMISE_MSG + $(info Helix customize) + $(info - OLED_ENABLE=$(OLED_ENABLE)) + $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION=$(LED_ANIMATIONS)) +endef + +# Helix keyboard customize +# you can edit follows 4 Variables +# jp: 以下の4つの変数を必要に応じて編集します。 +OLED_ENABLE = no # OLED_ENABLE +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. +#### Do not enable these with audio at the same time. + +# Uncomment these for checking +# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 +# $(eval $(call HELIX_CUSTOMISE_MSG)) +# $(info ) + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DRGBLIGHT_ANIMATIONS +endif + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifndef QUANTUM_DIR include ../../../../Makefile endif + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) From f3231834ee89f8601750bd305186c54507987287 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Tue, 20 Mar 2018 02:19:22 +0900 Subject: [PATCH 2/5] HELIX_ROWS define move from config.h to rules.mk --- keyboards/helix/rev2/keymaps/default/config.h | 2 +- keyboards/helix/rev2/keymaps/default/rules.mk | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h index 987c9b0d19..66c9b9e8bd 100644 --- a/keyboards/helix/rev2/keymaps/default/config.h +++ b/keyboards/helix/rev2/keymaps/default/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . /* Select rows configuration */ // Rows are 4 or 5 -#define HELIX_ROWS 5 +// #define HELIX_ROWS 5 see ./rules.mk /* key matrix size */ // Rows are doubled-up diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 1705579ad8..070785255b 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -26,8 +26,9 @@ define HELIX_CUSTOMISE_MSG endef # Helix keyboard customize -# you can edit follows 4 Variables -# jp: 以下の4つの変数を必要に応じて編集します。 +# you can edit follows 5 Variables +# jp: 以下の5つの変数を必要に応じて編集します。 +HELIX_ROWS = 5 # Helix Rows is 4 or 5 OLED_ENABLE = no # OLED_ENABLE LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) @@ -41,6 +42,13 @@ LED_ANIMATIONS = yes # LED animations # $(eval $(call HELIX_CUSTOMISE_MSG)) # $(info ) +ifneq ($(strip $(HELIX_ROWS)), 4) + ifneq ($(strip $(HELIX_ROWS)), 5) + $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) + endif +endif +OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) + ifeq ($(strip $(LED_BACK_ENABLE)), yes) RGBLIGHT_ENABLE = yes OPT_DEFS += -DRGBLED_BACK From e0d08f48953b89beee646fe2bb5dc40cfc5e0051 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Tue, 20 Mar 2018 03:03:40 +0900 Subject: [PATCH 3/5] add readme.md --- .../helix/rev2/keymaps/default/readme.md | 79 +++++++++++++++---- 1 file changed, 65 insertions(+), 14 deletions(-) diff --git a/keyboards/helix/rev2/keymaps/default/readme.md b/keyboards/helix/rev2/keymaps/default/readme.md index 02888855b8..92ba264dba 100644 --- a/keyboards/helix/rev2/keymaps/default/readme.md +++ b/keyboards/helix/rev2/keymaps/default/readme.md @@ -1,25 +1,76 @@ -SSD1306 OLED Display via I2C -====== +# Helix keyboard default keymap -Features --------- +## コンパイルの仕方 -Some features supported by the firmware: +コンパイルは、qmk_firmware のトップディレクトリで行います。 +``` +$ cd qmk_firmware +``` +qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 -* I2C connection between the two halves is required as the OLED display will use this connection as well. Note this - requires pull-up resistors on the data and clock lines. -* OLED display will connect from either side +``` +$ make helix:default +``` +キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 -Wiring ------- +``` +$ make helix:default:avrdude +``` +コンパイル結果と中間生成物を消去したい場合は以下のようにします。 -Work in progress... +``` +$ make helix:default:clean +``` +## カスタマイズ -OLED Configuration -------------------------------- +Helix キーボードを4行版として製作したり、オプションの OLED をつけたり、 +RGB バックライトまたは、RGB Underglow をつけた場合は、 +`qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` の以下の部分を編集して機能を有効化してください。 -Work in progress... +``` +# Helix keyboard customize +# you can edit follows 5 Variables +# jp: 以下の5つの変数を必要に応じて編集します。 +HELIX_ROWS = 5 # Helix Rows is 4 or 5 +OLED_ENABLE = no # OLED_ENABLE +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +``` + +## 4行版Helix に対応する + +rules.mk の下記の部分を編集して 5 を 4 に変更してください。 + +``` +HELIX_ROWS = 4 # Helix Rows is 4 or 5 +``` + +## RGB バックライトを有効にする + +rules.mk の下記の部分を編集して no を yes に変更してください。 + +``` +LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) +``` + +## RGB Underglow を有効にする + +rules.mk の下記の部分を編集して no を yes に変更してください。 +``` +LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +``` + +## OLEDを有効にする + +rules.mk の下記の部分を編集して no を yes に変更してください。 +``` +OLED_ENABLE = yes # OLED_ENABLE +``` + +さらに詳細は、[こちら](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。 From 2c10938230b9394c9dced70013d82f58121dc0a0 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Wed, 21 Mar 2018 00:25:21 +0900 Subject: [PATCH 4/5] rename readme.md to readme_jp.md --- keyboards/helix/rev2/keymaps/default/{readme.md => readme_jp.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/helix/rev2/keymaps/default/{readme.md => readme_jp.md} (100%) diff --git a/keyboards/helix/rev2/keymaps/default/readme.md b/keyboards/helix/rev2/keymaps/default/readme_jp.md similarity index 100% rename from keyboards/helix/rev2/keymaps/default/readme.md rename to keyboards/helix/rev2/keymaps/default/readme_jp.md From 82ed2e1e797db5f2ee44f8451f9775b3a2426237 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Wed, 21 Mar 2018 04:04:33 +0900 Subject: [PATCH 5/5] add readme.md and modify readme_jp.md --- .../helix/rev2/keymaps/default/readme.md | 141 ++++++++++++++++++ .../helix/rev2/keymaps/default/readme_jp.md | 26 +++- 2 files changed, 165 insertions(+), 2 deletions(-) create mode 100644 keyboards/helix/rev2/keymaps/default/readme.md diff --git a/keyboards/helix/rev2/keymaps/default/readme.md b/keyboards/helix/rev2/keymaps/default/readme.md new file mode 100644 index 0000000000..307e5c30b9 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/default/readme.md @@ -0,0 +1,141 @@ +# The Default Helix Layout +## Layout + +### Qwerty + +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + `-------------------------------------------------------------------------------------------------' +``` + +### Colemak +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | Shift| Z | X | C | V | B | [ | ] | K | M | , | . | / |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + `-------------------------------------------------------------------------------------------------' +``` + +### Dvorak +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | Shift| ; | Q | J | K | X | [ | ] | B | M | W | V | Z |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + `-------------------------------------------------------------------------------------------------' +``` + +## Layers + +|Priority|number|name|description| +| ---- | ---- | --- | --- | +|high|16|Adjust|Functions| +||4|Raise|Numeric charactors| +||3|Lower|Other charactors| +||2|Dvorak|Dvorak leyout| +||1|Colemak|Colemak leyout| +|low|0|Qwerty|QWERTY leyout(base)| + +### Lower +``` + ,-----------------------------------------. ,-----------------------------------------. + | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | Next | Vol- | Vol+ | Play | + `-------------------------------------------------------------------------------------------------' +``` + +### Raise +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | Next | Vol- | Vol+ | Play | + `-------------------------------------------------------------------------------------------------' +``` + +### Adjust (Lower + Raise) +``` + ,-----------------------------------------. ,-----------------------------------------. + | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | Reset|RGBRST| | | | | | | | | | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + `-------------------------------------------------------------------------------------------------' +``` + +## Customize + +see `qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` + +``` +# Helix keyboard customize +# you can edit follows 5 Variables +# jp: 以下の5つの変数を必要に応じて編集します。 +HELIX_ROWS = 5 # Helix Rows is 4 or 5 +OLED_ENABLE = no # OLED_ENABLE +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +``` +## Compile + +go to qmk top directory. +``` +$ cd qmk_firmware +``` + +build +``` +$ make helix:default +``` + +flash to keyboard +``` +$ make helix:default:avrdude +``` + +## Link +* more detail wrote in Japanese [helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md) +* [Helix top](https://github.com/MakotoKurauchi/helix) + diff --git a/keyboards/helix/rev2/keymaps/default/readme_jp.md b/keyboards/helix/rev2/keymaps/default/readme_jp.md index 92ba264dba..88ffc02ff3 100644 --- a/keyboards/helix/rev2/keymaps/default/readme_jp.md +++ b/keyboards/helix/rev2/keymaps/default/readme_jp.md @@ -1,4 +1,23 @@ -# Helix keyboard default keymap +# The Default Helix Layout +## 配列 + +### Qwerty配列 + +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + `-------------------------------------------------------------------------------------------------' +``` + +他の配列(Colemak,Dvorak)は、[readme.md](readme.md) を参照 ## コンパイルの仕方 @@ -73,4 +92,7 @@ rules.mk の下記の部分を編集して no を yes に変更してくださ OLED_ENABLE = yes # OLED_ENABLE ``` -さらに詳細は、[こちら](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。 +## リンク + +* さらに詳細は、[こちら helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。 +* [Helix top](https://github.com/MakotoKurauchi/helix)