From af4bc251f9d4032abf12d0377b5e948701e82713 Mon Sep 17 00:00:00 2001 From: Gregorio <38576492+ohchiko@users.noreply.github.com> Date: Mon, 22 Jun 2020 04:59:43 +0700 Subject: [PATCH 01/26] Updates on Mixi default keymaps and fixes on configuration (#9467) --- keyboards/mixi/config.h | 4 +- keyboards/mixi/keymaps/default/keymap.c | 43 ++++++++--------- keyboards/mixi/keymaps/default/readme.md | 2 +- keyboards/mixi/keymaps/via/keymap.c | 60 +++++++++++++++--------- keyboards/mixi/mixi.c | 3 +- keyboards/mixi/readme.md | 2 +- 6 files changed, 67 insertions(+), 47 deletions(-) diff --git a/keyboards/mixi/config.h b/keyboards/mixi/config.h index cb89dd2cb0ae..aed57f3241c9 100644 --- a/keyboards/mixi/config.h +++ b/keyboards/mixi/config.h @@ -21,8 +21,8 @@ { C6, F7, B6 } \ } -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } +#define ENCODERS_PAD_A { D7, B1 } +#define ENCODERS_PAD_B { E6, B3 } /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/mixi/keymaps/default/keymap.c b/keyboards/mixi/keymaps/default/keymap.c index 806a7a924c19..21c3c669a053 100644 --- a/keyboards/mixi/keymaps/default/keymap.c +++ b/keyboards/mixi/keymaps/default/keymap.c @@ -6,36 +6,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* - * | Knob: Layer +/- | - * .---------------------------------------. - * | Mute | Play/Pause | Hold: Layer 2 | - * |----------|------------|---------------| - * | Previous | Up | Next | - * |----------|------------|---------------| - * | Left | Down | Right | - * '---------------------------------------' + * | Knob: Layer +/- | + * .------------------------------------------------. + * | Volume Mute | Media Play/Pause | Hold: Layer 2 | + * |-------------|------------------|---------------| + * | Media Prev | Up | Media Next | + * |-------------|------------------|---------------| + * | Left | Down | Right | + * '------------------------------------------------' */ [0] = LAYOUT( - KC_MUTE, KC_MPLY, MO(2), - KC_MNXT, KC_UP , KC_MPRV , + KC_MUTE, KC_MPLY, MO(2) , + KC_MPRV, KC_UP , KC_MNXT, KC_LEFT, KC_DOWN , KC_RGHT ), /* - * .-----------------------. - * | NUM 7 | NUM 8 | NUM 9 | - * |-------|-------|-------| - * | NUM 4 | NUM 5 | NUM 6 | - * |-------|-------|-------| - * | NUM 1 | NUM 2 | NUM 3 | - * '-----------------------' + * | Knob: Layer +/- | + * .---------------------------------------------------. + * | RGB Toggle | Media Play/Pause | Hold: Layer 2 | + * |----------------|------------------|---------------| + * | Media Previous | RGB Bright+ | Media Next | + * |----------------|------------------|---------------| + * | RGB Anim- | RGB Bright- | RGB Anim+ | + * '---------------------------------------------------' */ [1] = LAYOUT( - KC_P7, KC_P8, KC_P8, - KC_P4, KC_P5, KC_P6, - KC_P1, KC_P2, KC_P3 + RGB_TOG , KC_TRNS, KC_TRNS, + KC_TRNS , RGB_VAI, KC_TRNS, + RGB_RMOD, RGB_VAD, RGB_MOD ), /* @@ -58,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const rgblight_segment_t PROGMEM _base_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, RGBLED_NUM, HSV_WHITE} + {0, RGBLED_NUM, HSV_BLUE} ); const rgblight_segment_t PROGMEM _middle_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, RGBLED_NUM, HSV_GREEN} diff --git a/keyboards/mixi/keymaps/default/readme.md b/keyboards/mixi/keymaps/default/readme.md index 863fa6f5d68d..c780eb5f4e2a 100644 --- a/keyboards/mixi/keymaps/default/readme.md +++ b/keyboards/mixi/keymaps/default/readme.md @@ -1,4 +1,4 @@ -![Mixi Layout Image](https://i.imgur.com/UIXj9O6.png) +![Mixi Layout Image](https://i.imgur.com/WCtQ6GG.jpg) # Default Mixi Layout diff --git a/keyboards/mixi/keymaps/via/keymap.c b/keyboards/mixi/keymaps/via/keymap.c index 806a7a924c19..4ffaf111dc63 100644 --- a/keyboards/mixi/keymaps/via/keymap.c +++ b/keyboards/mixi/keymaps/via/keymap.c @@ -6,36 +6,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* - * | Knob: Layer +/- | - * .---------------------------------------. - * | Mute | Play/Pause | Hold: Layer 2 | - * |----------|------------|---------------| - * | Previous | Up | Next | - * |----------|------------|---------------| - * | Left | Down | Right | - * '---------------------------------------' + * | Knob: Layer +/- | + * .------------------------------------------------. + * | Volume Mute | Media Play/Pause | Hold: Layer 2 | + * |-------------|------------------|---------------| + * | Media Prev | Up | Media Next | + * |-------------|------------------|---------------| + * | Left | Down | Right | + * '------------------------------------------------' */ [0] = LAYOUT( - KC_MUTE, KC_MPLY, MO(2), - KC_MNXT, KC_UP , KC_MPRV , + KC_MUTE, KC_MPLY, MO(2) , + KC_MPRV, KC_UP , KC_MNXT, KC_LEFT, KC_DOWN , KC_RGHT ), /* - * .-----------------------. - * | NUM 7 | NUM 8 | NUM 9 | - * |-------|-------|-------| - * | NUM 4 | NUM 5 | NUM 6 | - * |-------|-------|-------| - * | NUM 1 | NUM 2 | NUM 3 | - * '-----------------------' + * | Knob: Layer +/- | + * .---------------------------------------------------. + * | RGB Toggle | Media Play/Pause | Hold: Layer 2 | + * |----------------|------------------|---------------| + * | Media Previous | RGB Bright+ | Media Next | + * |----------------|------------------|---------------| + * | RGB Anim- | RGB Bright- | RGB Anim+ | + * '---------------------------------------------------' */ [1] = LAYOUT( - KC_P7, KC_P8, KC_P8, - KC_P4, KC_P5, KC_P6, - KC_P1, KC_P2, KC_P3 + RGB_TOG , KC_TRNS, KC_TRNS, + KC_TRNS , RGB_VAI, KC_TRNS, + RGB_RMOD, RGB_VAD, RGB_MOD ), /* @@ -53,12 +54,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO , KC_NO, KC_TRNS, EEP_RST, RESET, DEBUG , KC_NO , KC_NO, KC_NO + ), + + /* + * | Knob: N/A | + * .-----------------. + * | N/A | N/A | N/A | + * |-----------------| + * | N/A | N/A | N/A | + * |-----------------| + * | N/A | N/A | N/A | + * '-----------------' + */ + [3] = + LAYOUT( + KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO ) }; const rgblight_segment_t PROGMEM _base_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, RGBLED_NUM, HSV_WHITE} + {0, RGBLED_NUM, HSV_BLUE} ); const rgblight_segment_t PROGMEM _middle_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, RGBLED_NUM, HSV_GREEN} diff --git a/keyboards/mixi/mixi.c b/keyboards/mixi/mixi.c index 533cf3b88179..43625bcd568d 100644 --- a/keyboards/mixi/mixi.c +++ b/keyboards/mixi/mixi.c @@ -3,8 +3,9 @@ void eeconfig_init_kb(void) { #ifdef RGBLIGHT_ENABLE rgblight_enable(); // Enable RGB underglow by default + rgblight_sethsv(0, 255, 255); #ifdef RGBLIGHT_ANIMATIONS - rgblight_mode(RGBLIGHT_MODE_TWINKLE + 5); // Set to RGB_TWINKLE animation by default + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 5); // Set to RGB_RAINBOW_SWIRL animation by default #endif #endif diff --git a/keyboards/mixi/readme.md b/keyboards/mixi/readme.md index 4c911db57086..e8930809411a 100644 --- a/keyboards/mixi/readme.md +++ b/keyboards/mixi/readme.md @@ -1,6 +1,6 @@ # Mixi -![Mixi](https://i.imgur.com/GPO6Khu.jpg) +![Mixi](https://i.imgur.com/f6hHXKZ.jpg) A mini 3x3 macropad with rotary encoders support and RGB underglow and also tray mount support. Currently the PCB and kits can only be purchased in Indonesia. From cb13dd0a33c153d8cb0a26596489804c012eaae4 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 21 Jun 2020 15:47:41 -0700 Subject: [PATCH 02/26] Enable NKRO on 1up's boards (#9434) * enable NKRO and keep consistent with bootmagic set to lite * Update keyboards/1upkeyboards/1up60hse/rules.mk Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/1upkeyboards/1up60hse/rules.mk | 6 +++--- keyboards/1upkeyboards/1up60rgb/rules.mk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/1upkeyboards/1up60hse/rules.mk b/keyboards/1upkeyboards/1up60hse/rules.mk index bce414e25a5c..2ba1f9ef506f 100644 --- a/keyboards/1upkeyboards/1up60hse/rules.mk +++ b/keyboards/1upkeyboards/1up60hse/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,8 +22,8 @@ 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 = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode diff --git a/keyboards/1upkeyboards/1up60rgb/rules.mk b/keyboards/1upkeyboards/1up60rgb/rules.mk index 24f737398e7e..ea5308b96058 100644 --- a/keyboards/1upkeyboards/1up60rgb/rules.mk +++ b/keyboards/1upkeyboards/1up60rgb/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug From 3d6d89966614be1e80d9957fb83743934c5eb162 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 22 Jun 2020 11:21:48 +1000 Subject: [PATCH 03/26] `qmk cformat` (#9500) --- drivers/issi/is31fl3741.c | 5 +- drivers/ws2812.h | 4 +- quantum/process_keycode/process_ucis.c | 79 +++++++++---------- .../process_keycode/process_unicode_common.c | 2 +- quantum/process_keycode/process_unicodemap.c | 2 +- quantum/rgb_matrix_drivers.c | 6 +- 6 files changed, 47 insertions(+), 51 deletions(-) diff --git a/drivers/issi/is31fl3741.c b/drivers/issi/is31fl3741.c index 45d2b4099098..ab4b31465b00 100644 --- a/drivers/issi/is31fl3741.c +++ b/drivers/issi/is31fl3741.c @@ -24,7 +24,6 @@ #include "i2c_master.h" #include "progmem.h" - // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) // The address will vary depending on your wiring: @@ -178,9 +177,9 @@ void IS31FL3741_init(uint8_t addr) { // Set Pull up & Down for SWx CSy IS31FL3741_write_register(addr, ISSI_REG_PULLDOWNUP, 0x77); -// IS31FL3741_update_led_scaling_registers(addr, 0xFF, 0xFF, 0xFF); + // IS31FL3741_update_led_scaling_registers(addr, 0xFF, 0xFF, 0xFF); -// Wait 10ms to ensure the device has woken up. + // Wait 10ms to ensure the device has woken up. wait_ms(10); } diff --git a/drivers/ws2812.h b/drivers/ws2812.h index 370b14f3e8f1..f179fcb0ef5a 100644 --- a/drivers/ws2812.h +++ b/drivers/ws2812.h @@ -18,12 +18,12 @@ #include "quantum/color.h" /* - * Older WS2812s can handle a reset time (TRST) of 50us, but recent + * Older WS2812s can handle a reset time (TRST) of 50us, but recent * component revisions require a minimum of 280us. */ #if !defined(WS2812_TRST_US) -#define WS2812_TRST_US 280 +# define WS2812_TRST_US 280 #endif /* User Interface diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c index 2541d6eb2612..12b0aba9bfea 100644 --- a/quantum/process_keycode/process_ucis.c +++ b/quantum/process_keycode/process_ucis.c @@ -72,8 +72,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { return true; } - bool special = keycode == KC_SPC || keycode == KC_ENT || - keycode == KC_ESC || keycode == KC_BSPC; + bool special = keycode == KC_SPC || keycode == KC_ENT || keycode == KC_ESC || keycode == KC_BSPC; if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !special) { return false; } @@ -82,49 +81,49 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { qk_ucis_state.count++; switch (keycode) { - case KC_BSPC: - if (qk_ucis_state.count >= 2) { - qk_ucis_state.count -= 2; - return true; - } else { - qk_ucis_state.count--; - return false; - } + case KC_BSPC: + if (qk_ucis_state.count >= 2) { + qk_ucis_state.count -= 2; + return true; + } else { + qk_ucis_state.count--; + return false; + } - case KC_SPC: - case KC_ENT: - case KC_ESC: - for (uint8_t i = 0; i < qk_ucis_state.count; i++) { - register_code(KC_BSPC); - unregister_code(KC_BSPC); - wait_ms(UNICODE_TYPE_DELAY); - } + case KC_SPC: + case KC_ENT: + case KC_ESC: + for (uint8_t i = 0; i < qk_ucis_state.count; i++) { + register_code(KC_BSPC); + unregister_code(KC_BSPC); + wait_ms(UNICODE_TYPE_DELAY); + } - if (keycode == KC_ESC) { - qk_ucis_state.in_progress = false; - qk_ucis_cancel(); - return false; - } + if (keycode == KC_ESC) { + qk_ucis_state.in_progress = false; + qk_ucis_cancel(); + return false; + } - uint8_t i; - bool symbol_found = false; - for (i = 0; ucis_symbol_table[i].symbol; i++) { - if (is_uni_seq(ucis_symbol_table[i].symbol)) { - symbol_found = true; - register_ucis(ucis_symbol_table[i].code_points); - break; + uint8_t i; + bool symbol_found = false; + for (i = 0; ucis_symbol_table[i].symbol; i++) { + if (is_uni_seq(ucis_symbol_table[i].symbol)) { + symbol_found = true; + register_ucis(ucis_symbol_table[i].code_points); + break; + } + } + if (symbol_found) { + qk_ucis_success(i); + } else { + qk_ucis_symbol_fallback(); } - } - if (symbol_found) { - qk_ucis_success(i); - } else { - qk_ucis_symbol_fallback(); - } - qk_ucis_state.in_progress = false; - return false; + qk_ucis_state.in_progress = false; + return false; - default: - return true; + default: + return true; } } diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index bea34c31eab7..84c44d987499 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -257,7 +257,7 @@ void send_unicode_string(const char *str) { while (*str) { int32_t code_point = 0; - str = decode_utf8(str, &code_point); + str = decode_utf8(str, &code_point); if (code_point >= 0) { register_unicode(code_point); diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 789a90445bb2..fcf676c24e7c 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -22,7 +22,7 @@ __attribute__((weak)) uint16_t unicodemap_index(uint16_t keycode) { uint16_t index = keycode - QK_UNICODEMAP_PAIR; bool shift = unicode_saved_mods & MOD_MASK_SHIFT; - bool caps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK); + bool caps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK); if (shift ^ caps) { index >>= 7; } diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 22259360868e..37bc20ef5375 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -23,7 +23,7 @@ * be here if shared between boards. */ -#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) +#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) # include "i2c_master.h" @@ -100,9 +100,7 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = IS31FL3737_set_color_all, }; # else -static void flush(void) { - IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); -} +static void flush(void) { IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); } const rgb_matrix_driver_t rgb_matrix_driver = { .init = init, From 0b09189087c580bc8d3aa2bd529a08c7633d3e2b Mon Sep 17 00:00:00 2001 From: Paul Ewers Date: Sun, 21 Jun 2020 23:11:10 -0700 Subject: [PATCH 04/26] [Keymap] New custom 'super alt' keymap for the Drop ALT (#9385) * New custom 'super alt' keymap for the Drop ALT * Improvements to 'super alt' keymap based on PR feedback * Fix flickering LED caps lock bug * Code cleanup from PR feedback * Minor keymap layout cleanup --- .../massdrop/alt/keymaps/ewersp/README.md | 30 +++ .../massdrop/alt/keymaps/ewersp/config.h | 3 + .../massdrop/alt/keymaps/ewersp/keymap.c | 196 ++++++++++++++++++ 3 files changed, 229 insertions(+) create mode 100644 keyboards/massdrop/alt/keymaps/ewersp/README.md create mode 100644 keyboards/massdrop/alt/keymaps/ewersp/config.h create mode 100644 keyboards/massdrop/alt/keymaps/ewersp/keymap.c diff --git a/keyboards/massdrop/alt/keymaps/ewersp/README.md b/keyboards/massdrop/alt/keymaps/ewersp/README.md new file mode 100644 index 000000000000..d2e691a9ef51 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/ewersp/README.md @@ -0,0 +1,30 @@ +## Greetings, Traveler! + +This layout is for the [Massdrop ALT Keyboard](https://drop.com/buy/massdrop-alt-mechanical-keyboard) and targets Windows machines. + +This keymap is very similar to the default keymap for the Drop ALT, but it overloads the left alt key to behave like an additional 'Fn' key while keeping the functionality of the alt key intact. + +### For example: +``` +LeftAlt + 1...N -> F1...FN +LeftAlt + L/R Arrows -> Home/End +LeftAlt + Home -> End +LeftAlt + Backspace -> Delete +LeftAlt + Esc -> Backtick (`) +``` + +The novel part of this keymap is that it **preserves the default functionality** of the left alt key, so ```'alt + tab', 'ctrl + alt + del', 'alt + f4'```, etc. all work as expected without using any janky timers. + +Everything also works with other modifier keys, so ```'alt + L/R' and 'alt + shift + L/R'``` work great for text manipulation to select lines. + +This **'super alt'** keymap will feel very familiar for anyone **coming from macOS** since the Windows alt key is in the same position as CMD on macOS keyboards. + +And finally, the original alt key functionality can be toggled at any time by pressing **```'Fn + period'```** so even if you don't like it, you can turn it off. + +This keymap was based on the 'default' Drop ALT keymap (and _not_ 'default_md') which means it supports all the fancy QMK RGB patterns, and isn't limited to the stock options that come with the board. + +It's also worth noting that this keymap fixes an outstanding issue where the caps lock LED flickers when the RGB mode is keylight or underglow. I could not find a general purpose fix, but the one included here works quite well. + +If you have any questions, feel free to reach out to me at: ewersp [at] gmail [dot] com. + +Enjoy! **<3** diff --git a/keyboards/massdrop/alt/keymaps/ewersp/config.h b/keyboards/massdrop/alt/keymaps/ewersp/config.h new file mode 100644 index 000000000000..1c801d7e3c1c --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/ewersp/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define FORCE_NKRO diff --git a/keyboards/massdrop/alt/keymaps/ewersp/keymap.c b/keyboards/massdrop/alt/keymaps/ewersp/keymap.c new file mode 100644 index 000000000000..483ea3cfb2a1 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/ewersp/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H + +enum alt_keycodes { + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout + ALT_DEL, //Added to map left alt + backspace to delete +}; + +// Friendly layer names +enum alt_layers { + DEF = 0, + ALT, + FUNC, + SUPR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEF] = LAYOUT_65_ansi_blocker( + KC_ESC, 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_DEL, + 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_HOME, + 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_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LGUI, MO(SUPR), KC_SPC, KC_RALT, MO(FUNC),KC_LEFT, KC_DOWN, KC_RGHT + ), + [ALT] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______ + ), + [FUNC] = LAYOUT_65_ansi_blocker( + KC_GRV, 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_MUTE, + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, RGB_TOG, _______, _______, _______, MD_BOOT, NK_TOGG, DBG_TOG, _______, TG(ALT), _______, _______, KC_PGUP, KC_VOLD, + _______, _______, KC_LALT, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + [SUPR] = LAYOUT_65_ansi_blocker( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ALT_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, _______, KC_END + ) +}; + +// If the super alt layer is the active layer +bool super_alt_layer_active = false; + +// If we need to unregister alt when leaving the super alt layer +bool need_to_unregister_alt = false; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +// Taken from 'g_led_config' in config_led.c +#define CAPS_LOCK_LED_ID 30 + +// This runs every matrix scan (every 'frame') +void rgb_matrix_indicators_user(void) { + led_flags_t flags = rgb_matrix_get_flags(); + + // If we're in either keylight or underglow modes (but not both simultaneously) + if (HAS_FLAGS(flags, LED_FLAG_KEYLIGHT) != HAS_FLAGS(flags, LED_FLAG_UNDERGLOW)) { + + // This fixes a bug where the caps lock LED flickers when toggled in either keylight or underglow modes + if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(CAPS_LOCK_LED_ID, RGB_WHITE); + } else { + rgb_matrix_set_color(CAPS_LOCK_LED_ID, 0, 0, 0); + } + } +} + +// This runs code every time that the layers get changed +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case DEF: + // When returning to the default layer, check if we need to unregister the left alt key + if (super_alt_layer_active && need_to_unregister_alt) { + unregister_code(KC_LALT); + } + + super_alt_layer_active = false; + need_to_unregister_alt = false; + break; + case SUPR: + super_alt_layer_active = true; + break; + } + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + // These are the keys we want to 'fall though' and behave as usual when pressed with the alt modifier + case KC_A ... KC_Z: + case KC_TAB: + case KC_DEL: + case KC_UP: + case KC_DOWN: + case MO(FUNC): + if (super_alt_layer_active && record->event.pressed) { + // Only activate the alt modifier for the first key press + if ((get_mods() & MOD_BIT(KC_LALT)) == false) { + register_code(KC_LALT); + need_to_unregister_alt = true; + } + } + // We still want to process the keycode normally + return true; + case ALT_DEL: + if (record->event.pressed) { + register_code(KC_DEL); + } else { + unregister_code(KC_DEL); + } + return false; + case U_T_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; + default: + return true; // Process all other keycodes normally + } +} From 82dc8faaf30a6b77ec715852c3841fde087b6b07 Mon Sep 17 00:00:00 2001 From: AlexOConnorHub <43659595+AlexOConnorHub@users.noreply.github.com> Date: Mon, 22 Jun 2020 03:43:08 -0400 Subject: [PATCH 05/26] Fixing MIDI for ARM without NKRO enabled (#9466) --- tmk_core/protocol/midi/qmk_midi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tmk_core/protocol/midi/qmk_midi.h b/tmk_core/protocol/midi/qmk_midi.h index 0a348d5fde64..819087a405fe 100644 --- a/tmk_core/protocol/midi/qmk_midi.h +++ b/tmk_core/protocol/midi/qmk_midi.h @@ -2,6 +2,7 @@ #ifdef MIDI_ENABLE # include "midi.h" +# include extern MidiDevice midi_device; void setup_midi(void); void send_midi_packet(MIDI_EventPacket_t* event); From 98642ca02878741531105bd879c0d61110198b62 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 22 Jun 2020 01:38:58 -0700 Subject: [PATCH 06/26] Improve keycode handling for RGB (#7677) Co-authored-by: drashna Co-authored-by: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- docs/feature_rgb_matrix.md | 11 +++- docs/feature_rgblight.md | 4 ++ quantum/process_keycode/process_rgb.c | 85 ++++++++++++++++++++++++--- 3 files changed, 91 insertions(+), 9 deletions(-) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index a4f434cbd925..9604bdcc8982 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -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 diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 5921e9941a0e..a81b50e828a9 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -64,6 +64,9 @@ Changing the **Value** sets the overall brightness.
|`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 diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c index 21164b8f9fc6..a1e46e03483f 100644 --- a/quantum/process_keycode/process_rgb.c +++ b/quantum/process_keycode/process_rgb.c @@ -59,78 +59,147 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { uint8_t shifted = get_mods() & MOD_MASK_SHIFT; switch (keycode) { case RGB_TOG: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) rgblight_toggle(); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_toggle(); +#endif return false; case RGB_MODE_FORWARD: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_step, rgblight_step_reverse); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_step, rgb_matrix_step_reverse); +#endif return false; case RGB_MODE_REVERSE: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_step_reverse, rgblight_step); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_step_reverse, rgb_matrix_step); +#endif return false; case RGB_HUI: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_increase_hue, rgblight_decrease_hue); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_increase_hue, rgb_matrix_decrease_hue); +#endif return false; case RGB_HUD: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_decrease_hue, rgblight_increase_hue); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_decrease_hue, rgb_matrix_increase_hue); +#endif return false; case RGB_SAI: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_increase_sat, rgblight_decrease_sat); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_increase_sat, rgb_matrix_decrease_sat); +#endif return false; case RGB_SAD: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_decrease_sat, rgblight_increase_sat); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_decrease_sat, rgb_matrix_increase_sat); +#endif return false; case RGB_VAI: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_increase_val, rgblight_decrease_val); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_increase_val, rgb_matrix_decrease_val); +#endif return false; case RGB_VAD: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_decrease_val, rgblight_increase_val); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_decrease_val, rgb_matrix_increase_val); +#endif return false; case RGB_SPI: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_increase_speed, rgblight_decrease_speed); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_increase_speed, rgb_matrix_decrease_speed); +#endif return false; case RGB_SPD: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_decrease_speed, rgblight_increase_speed); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_decrease_speed, rgb_matrix_increase_speed); +#endif return false; case RGB_MODE_PLAIN: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR); +#endif return false; case RGB_MODE_BREATHE: -#ifdef RGBLIGHT_EFFECT_BREATHING +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_BREATHING) handleKeycodeRGBMode(RGBLIGHT_MODE_BREATHING, RGBLIGHT_MODE_BREATHING_end); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_BREATHING) + rgb_matrix_mode(RGB_MATRIX_BREATHING); #endif return false; case RGB_MODE_RAINBOW: -#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RAINBOW_MOOD) handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_MOOD, RGBLIGHT_MODE_RAINBOW_MOOD_end); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT) + rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); #endif return false; case RGB_MODE_SWIRL: -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RAINBOW_SWIRL) handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_SWIRL, RGBLIGHT_MODE_RAINBOW_SWIRL_end); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_CYCLE_PINWHEEL) + rgb_matrix_mode(RGB_MATRIX_CYCLE_PINWHEEL); #endif return false; case RGB_MODE_SNAKE: -#ifdef RGBLIGHT_EFFECT_SNAKE +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_SNAKE) handleKeycodeRGBMode(RGBLIGHT_MODE_SNAKE, RGBLIGHT_MODE_SNAKE_end); #endif return false; case RGB_MODE_KNIGHT: -#ifdef RGBLIGHT_EFFECT_KNIGHT +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_KNIGHT) handleKeycodeRGBMode(RGBLIGHT_MODE_KNIGHT, RGBLIGHT_MODE_KNIGHT_end); #endif return false; case RGB_MODE_XMAS: -#ifdef RGBLIGHT_EFFECT_CHRISTMAS +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_CHRISTMAS) rgblight_mode(RGBLIGHT_MODE_CHRISTMAS); #endif return false; case RGB_MODE_GRADIENT: -#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_STATIC_GRADIENT) handleKeycodeRGBMode(RGBLIGHT_MODE_STATIC_GRADIENT, RGBLIGHT_MODE_STATIC_GRADIENT_end); #endif return false; case RGB_MODE_RGBTEST: -#ifdef RGBLIGHT_EFFECT_RGB_TEST +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RGB_TEST) rgblight_mode(RGBLIGHT_MODE_RGB_TEST); #endif return false; From 4b13c4957844dfeca3c72c3c8782708081fc22ed Mon Sep 17 00:00:00 2001 From: LucW Date: Mon, 22 Jun 2020 16:45:47 +0800 Subject: [PATCH 07/26] user keymaps for ergodox_ez/dvorak_42_key / atreus/dvorak_42_key (#9429) Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- .../atreus/keymaps/dvorak_42_key/keymap.c | 30 +++- .../ergodox_ez/keymaps/dvorak_42_key/keymap.c | 164 +++++++++--------- 2 files changed, 104 insertions(+), 90 deletions(-) diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c index 0fda245e2ee5..3f769494494f 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c @@ -23,6 +23,7 @@ #define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B)) #define AS_CLOSETAB LCTL(KC_F4) #define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) +#define AS_ALTENTER LALT(KC_ENTER) enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here @@ -35,13 +36,16 @@ enum custom_keycodes { CLOUD9_GOTO_LINE, CLOUD9_NAVIGATE, + // Windows 10 macros + W10_TASKVIEW, + W10_WORKSPACE_LEFT, + W10_WORKSPACE_RIGHT, + }; // building instructions: // make atreus:dvorak_42_key -// flashing instructions: -// avrdude -p atmega32u4 -c avr109 -U flash:w:atreus_dvorak_42_key.hex -P COM7 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( @@ -55,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, AS_GO_IMPLEMENTATION, RCTL(KC_Z), RCTL(KC_S), MEH(KC_A), MEH(KC_B), KC_HOME, KC_UP, KC_END, KC_PGUP, AS_BACK, AS_SYMBOL, RSFT(KC_TAB), KC_TAB, SHELL_DEL_WORD, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), AS_FINDUSAGE, AS_CLASS, AS_TABLEFT, AS_TABRIGHT, AS_CLOSETAB, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, - AS_CLOSETOOLWINDOW, AS_GO_DECLARATION, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) + AS_CLOSETOOLWINDOW, AS_GO_DECLARATION, KC_TRNS, KC_TRNS, AS_ALTENTER, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) ), [KEYSEL] = LAYOUT( @@ -73,10 +77,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [BROWSER_CONTROL] = LAYOUT( - MEH(KC_0), KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, MEH(KC_9), - MEH(KC_1), KC_MS_L, KC_MS_D, KC_MS_R, MEH(KC_6), KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), - MEH(KC_2), MEH(KC_3), MEH(KC_4), MEH(KC_5), MEH(KC_7), MEH(KC_8), RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T), RSFT(RCTL(KC_TAB)), KC_TRNS, KC_TRNS, KC_TRNS + MEH(KC_0), KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, MEH(KC_9), + MEH(KC_1), KC_MS_L, KC_MS_D, KC_MS_R, MEH(KC_6), KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), + MEH(KC_2), W10_TASKVIEW, W10_WORKSPACE_LEFT, W10_WORKSPACE_RIGHT, MEH(KC_7), MEH(KC_8), RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; @@ -108,9 +112,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(SS_LCTRL("e")); return true; break; + case W10_TASKVIEW: + tap_code16(G(KC_TAB)); + return true; + break; + case W10_WORKSPACE_LEFT: + tap_code16(G(C(KC_LEFT))); + return true; + break; + case W10_WORKSPACE_RIGHT: + tap_code16(G(C(KC_RIGHT))); + break; } } return true; } - diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index dc18edac8f23..22b8a9b9e0c9 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -50,30 +50,23 @@ enum custom_keycodes { SHELL_EXPAND_OE_LOGPATTERN, SHELL_EXPAND_OE_TRANPATTERN, - // Cloud9 macros - CLOUD9_TAB_LEFT, - CLOUD9_TAB_RIGHT, - CLOUD9_TAB_CLOSE, - CLOUD9_GOTO_SYMBOL, - CLOUD9_GOTO_LINE, - CLOUD9_NAVIGATE, - // Windows 10 macros, WINDOWS10_WORKSPACE_LEFT, WINDOWS10_WORKSPACE_RIGHT, + WINDOWS10_TASK_VIEW }; #define BASE 0 // base dvorak layer -#define BASE_ALTERNATE 1 // base dvorak layer, with different layer toggling -#define KEYNAV 2 // arrow navigation (right hand) -#define KEYSEL 3 // arrow navigation + shift (allow text selection) -#define SHELL_NAV 4 // bash shortcuts -#define SHELL_SCREEN 5 // linux screen shortcuts -#define SCREEN_NAV 6 // navigate between linux screen tabs -#define BROWSER_CONTROL 7 // control browser and mouse -#define COMBINED 8 // combined numbers and symbols layer -#define ANDROID_STUDIO 9 +#define KEYNAV 1 // arrow navigation (right hand) +#define KEYSEL 2 // arrow navigation + shift (allow text selection) +#define SHELL_NAV 3 // bash shortcuts +#define SHELL_SCREEN 4 // linux screen shortcuts +#define SCREEN_NAV 5 // navigate between linux screen tabs +#define BROWSER_CONTROL 6 // control browser and mouse +#define COMBINED 7 // combined numbers and symbols layer +#define ANDROID_STUDIO 8 // android studio specific layer +#define VSCODE 9 // visual studio code specific layer // macros @@ -117,6 +110,34 @@ enum custom_keycodes { #define AS_CLOSETAB LCTL(KC_F4) #define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) +// visual studio code shortcuts +#define VS_FILE LCTL(KC_P) +#define VS_LINE LCTL(KC_G) +#define VS_SYMBOLEDITOR LCTL(LSFT(KC_O)) +#define VS_DEFINITION KC_F12 +#define VS_IMPLEMENTATION LCTL(KC_F12) +#define VS_REFERENCES LSFT(KC_F12) +#define VS_BACK LALT(KC_LEFT) +#define VS_BRACKET LCTL(LSFT(KC_BSLS)) +#define VS_TABLEFT LCTL(KC_PGUP) +#define VS_TABRIGHT LCTL(KC_PGDN) +#define VS_CLOSETAB LCTL(KC_W) +#define VS_CLOSEPANEL LCTL(LSFT(KC_W)) +#define VS_TERMINAL LCTL(KC_GRAVE) +#define VS_BUILD LCTL(LSFT(KC_B)) +#define VS_COMMANDS LCTL(LSFT(KC_P)) +#define VS_CMT_BLOCK LSFT(LALT(KC_A)) +#define VS_CMT_LINE LCTL(KC_SLSH) +#define VS_DEL_LINE LCTL(LSFT(KC_K)) +#define VS_COPYLINEDOWN LSFT(LALT(KC_DOWN)) +// visual studio bookmark commands +#define VS_BM_LIST LCTL(LALT(KC_L)) +#define VS_BM_LISTALL LCTL(LALT(KC_A)) +#define VS_BM_PREV LCTL(LALT(KC_P)) +#define VS_BM_NEXT LCTL(LALT(KC_N)) +#define VS_BM_TOGGLE LCTL(LALT(KC_K)) +#define VS_BM_LABEL LCTL(LALT(KC_B)) + #define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \ case MACRO_NAME:\ @@ -166,12 +187,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, OSL(SCREEN_NAV), KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MEH(KC_2), OSL(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, - OSL(SHELL_SCREEN), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MEH(KC_3), + OSL(SHELL_SCREEN), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MO(VSCODE), MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), // left thumb cluster WINDOWS10_WORKSPACE_LEFT, WINDOWS10_WORKSPACE_RIGHT, - MEH(KC_6), + WINDOWS10_TASK_VIEW, MO(COMBINED),MO(KEYNAV), OSM(MOD_LALT), // right hand @@ -186,39 +207,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - // alternate base layout - [BASE_ALTERNATE] = LAYOUT_ergodox( - // left hand - 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_TRNS, KC_TRNS, - OSL(ANDROID_STUDIO),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - // bottom row - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - // thumb cluster - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - // right hand - 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_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - // bottom row - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - // thumb cluster - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS - ), - [KEYNAV] = LAYOUT_ergodox( // left hand - KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS,KC_ESC, CLOUD9_GOTO_LINE, RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, - KC_TRNS,KC_LSFT, CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB), KC_TAB, MEH(KC_A), - KC_TRNS,MEH(KC_B), CLOUD9_NAVIGATE, CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, 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_ESC, KC_TRNS, RCTL(KC_Z), RCTL(KC_S), KC_TRNS, KC_TRNS, + KC_TRNS,KC_LSFT, KC_TRNS, RSFT(KC_TAB), KC_TAB, 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, // left thumb cluster KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -242,7 +237,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), KC_TRNS,MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, // bottom row - RESET,DF(BASE),DF(BASE_ALTERNATE),KC_TRNS,KC_TRNS, + RESET,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // thumb cluster KC_TRNS,KC_TRNS, KC_TRNS, @@ -355,10 +350,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, AS_FINDUSAGE, AS_GO_DECLARATION, AS_GO_IMPLEMENTATION, KC_TRNS, - KC_TRNS, AS_TABLEFT, AS_TABRIGHT, AS_SYMBOL, AS_CLASS, AS_BACK, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, AS_CLOSETAB, AS_CLOSETOOLWINDOW, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, AS_FINDUSAGE, AS_GO_DECLARATION, AS_GO_IMPLEMENTATION, KC_TRNS, + AS_CLOSETAB, AS_TABLEFT, AS_TABRIGHT, AS_SYMBOL, AS_CLASS, AS_BACK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, AS_CLOSETOOLWINDOW, KC_TRNS, // bottom row KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // thumb cluster @@ -367,6 +362,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS ), + // vscode shortcuts shortcuts + [VSCODE] = LAYOUT_ergodox( + // left hand + KC_NO, 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_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + VS_CMT_LINE, VS_COPYLINEDOWN, VS_REFERENCES, VS_DEFINITION, VS_IMPLEMENTATION, VS_LINE, VS_BRACKET, + VS_CLOSETAB, VS_TABLEFT, VS_TABRIGHT, VS_SYMBOLEDITOR, VS_FILE, VS_BACK, + VS_CMT_BLOCK, KC_TRNS, VS_BM_PREV, VS_BM_NEXT, VS_BM_LIST, VS_BM_LISTALL, VS_BM_TOGGLE, + // bottom row + VS_COMMANDS, VS_BUILD, VS_TERMINAL, VS_CLOSEPANEL, VS_BM_LABEL, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, VS_DEL_LINE, KC_TRNS + ), + [COMBINED] = LAYOUT_ergodox( // left hand @@ -407,10 +428,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, KC_TRNS, KC_TRNS, - KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), KC_TRNS, + KC_DOWN, RCTL(KC_PGUP), RCTL(KC_PGDN),KC_MS_WH_DOWN, LALT(KC_LEFT), KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, KC_TRNS, // bottom row - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RCTL(LSFT(KC_TAB)), RCTL(KC_TAB), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T) @@ -623,31 +644,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(" | dumptlog - "); return true; break; - // Cloud9 macros - case CLOUD9_TAB_LEFT: - SEND_STRING(SS_LCTRL("[")); - return true; - break; - case CLOUD9_TAB_RIGHT: - SEND_STRING(SS_LCTRL("]")); - return true; - break; - case CLOUD9_TAB_CLOSE: - SEND_STRING(SS_LALT("w")); - return true; - break; - case CLOUD9_GOTO_SYMBOL: - SEND_STRING(SS_LSFT(SS_LCTRL("e"))); - return true; - break; - case CLOUD9_GOTO_LINE: - SEND_STRING(SS_LCTRL("g")); - return true; - break; - case CLOUD9_NAVIGATE: - SEND_STRING(SS_LCTRL("e")); - return true; - break; case WINDOWS10_WORKSPACE_LEFT: SEND_STRING(SS_LGUI(SS_LCTRL(SS_TAP(X_LEFT)))); return true; @@ -655,6 +651,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case WINDOWS10_WORKSPACE_RIGHT: SEND_STRING(SS_LGUI(SS_LCTRL(SS_TAP(X_RIGHT)))); break; + case WINDOWS10_TASK_VIEW: + SEND_STRING(SS_LGUI(SS_TAP(X_TAB))); + break; } } @@ -686,6 +685,7 @@ void matrix_scan_user(void) { case KEYNAV: case KEYSEL: case SCREEN_NAV: + case VSCODE: ergodox_right_led_3_on(); break; case BROWSER_CONTROL: From 5f06fce2c5c003cae0cba88c5f152fbff4e072f6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 22 Jun 2020 18:49:47 +1000 Subject: [PATCH 08/26] Fix info.json for Uni660 (#9489) --- keyboards/sirius/uni660/rev1/info.json | 105 +++++++++++++++++-- keyboards/sirius/uni660/rev2/ansi/info.json | 107 +++++++++++++++++-- keyboards/sirius/uni660/rev2/iso/info.json | 108 ++++++++++++++++++-- 3 files changed, 300 insertions(+), 20 deletions(-) diff --git a/keyboards/sirius/uni660/rev1/info.json b/keyboards/sirius/uni660/rev1/info.json index aa6b01cdf07f..a3be1976c726 100644 --- a/keyboards/sirius/uni660/rev1/info.json +++ b/keyboards/sirius/uni660/rev1/info.json @@ -1,12 +1,105 @@ { "keyboard_name": "Uni660", - "url": "", - "maintainer": "qmk", - "width": 19, - "height": 5, + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0, "w":2}, {"label":"Insert", "x":18, "y":0}, {"label":"F1", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"Delete", "x":18, "y":1}, {"label":"F2", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"\"", "x":14.25, "y":2}, {"label":"Enter", "x":15.25, "y":2, "w":2.25}, {"label":"F3", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":2.25}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":9.75, "y":3}, {"label":"M", "x":10.75, "y":3}, {"label":"<", "x":11.75, "y":3}, {"label":">", "x":12.75, "y":3}, {"label":"?", "x":13.75, "y":3}, {"label":"Shift", "x":14.75, "y":3, "w":2.25}, {"label":"Up", "x":17, "y":3}, {"label":"F4", "x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Win", "x":2.75, "y":4, "w":1.25}, {"label":"Alt", "x":4, "y":4, "w":1.25}, {"x":5.25, "y":4, "w":2.25}, {"label":"Fn", "x":7.5, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Menu", "x":13.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":14.75, "y":4, "w":1.25}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + "layout": [ + {"x": 0, "y": 0}, + + {"x": 1.5, "y": 0}, + {"x": 2.5, "y": 0}, + {"x": 3.5, "y": 0}, + {"x": 4.5, "y": 0}, + {"x": 5.5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + + {"x": 9.5, "y": 0}, + {"x": 10.5, "y": 0}, + {"x": 11.5, "y": 0}, + {"x": 12.5, "y": 0}, + {"x": 13.5, "y": 0}, + {"x": 14.5, "y": 0}, + {"x": 15.5, "y": 0}, + {"x": 16.5, "y": 0}, + + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + + {"x": 1.5, "y": 1, "w": 1.5}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1, "w": 1.5}, + + {"x": 18, "y": 1}, + + {"x": 0, "y": 2}, + + {"x": 1.5, "y": 2, "w": 1.75}, + {"x": 3.25, "y": 2}, + {"x": 4.25, "y": 2}, + {"x": 5.25, "y": 2}, + {"x": 6.25, "y": 2}, + {"x": 7.25, "y": 2}, + + {"x": 9.25, "y": 2}, + {"x": 10.25, "y": 2}, + {"x": 11.25, "y": 2}, + {"x": 12.25, "y": 2}, + {"x": 13.25, "y": 2}, + {"x": 14.25, "y": 2}, + {"x": 15.25, "y": 2, "w": 2.25}, + + {"x": 0, "y": 3}, + + {"x": 1.5, "y": 3, "w": 2.25}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3}, + {"x": 13.75, "y": 3}, + {"x": 14.75, "y": 3, "w": 2.25}, + + {"x": 17, "y": 3}, + + {"x": 0, "y": 4}, + + {"x": 1.5, "y": 4, "w": 1.25}, + {"x": 2.75, "y": 4, "w": 1.25}, + {"x": 4, "y": 4, "w": 1.25}, + {"x": 5.25, "y": 4, "w": 2.25}, + {"x": 7.5, "y": 4}, + + {"x": 9.5, "y": 4, "w": 2.75}, + {"x": 12.25, "y": 4, "w": 1.25}, + {"x": 13.5, "y": 4, "w": 1.25}, + {"x": 14.75, "y": 4, "w": 1.25}, + + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4} + ] } } -} \ No newline at end of file +} diff --git a/keyboards/sirius/uni660/rev2/ansi/info.json b/keyboards/sirius/uni660/rev2/ansi/info.json index 08d21d07755d..24050961cd0c 100644 --- a/keyboards/sirius/uni660/rev2/ansi/info.json +++ b/keyboards/sirius/uni660/rev2/ansi/info.json @@ -1,12 +1,105 @@ { - "keyboard_name": "Uni660", - "url": "", - "maintainer": "qmk", - "width": 19, - "height": 5, + "keyboard_name": "Uni660", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, "layouts": { "LAYOUT_ansi": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0, "w":2}, {"label":"Insert", "x":18, "y":0}, {"label":"F1", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"Delete", "x":18, "y":1}, {"label":"F2", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"\"", "x":14.25, "y":2}, {"label":"Enter", "x":15.25, "y":2, "w":2.25}, {"label":"F3", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":2.25}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":9.75, "y":3}, {"label":"M", "x":10.75, "y":3}, {"label":"<", "x":11.75, "y":3}, {"label":">", "x":12.75, "y":3}, {"label":"?", "x":13.75, "y":3}, {"label":"Shift", "x":14.75, "y":3, "w":2.25}, {"label":"Up", "x":17, "y":3}, {"label":"F4", "x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Win", "x":2.75, "y":4, "w":1.25}, {"label":"Alt", "x":4, "y":4, "w":1.25}, {"x":5.25, "y":4, "w":2.25}, {"label":"Fn", "x":7.5, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Menu", "x":13.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":14.75, "y":4, "w":1.25}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + "layout": [ + {"x": 0, "y": 0}, + + {"x": 1.5, "y": 0}, + {"x": 2.5, "y": 0}, + {"x": 3.5, "y": 0}, + {"x": 4.5, "y": 0}, + {"x": 5.5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + + {"x": 9.5, "y": 0}, + {"x": 10.5, "y": 0}, + {"x": 11.5, "y": 0}, + {"x": 12.5, "y": 0}, + {"x": 13.5, "y": 0}, + {"x": 14.5, "y": 0}, + {"x": 15.5, "y": 0}, + {"x": 16.5, "y": 0}, + + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + + {"x": 1.5, "y": 1, "w": 1.5}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1, "w": 1.5}, + + {"x": 18, "y": 1}, + + {"x": 0, "y": 2}, + + {"x": 1.5, "y": 2, "w": 1.75}, + {"x": 3.25, "y": 2}, + {"x": 4.25, "y": 2}, + {"x": 5.25, "y": 2}, + {"x": 6.25, "y": 2}, + {"x": 7.25, "y": 2}, + + {"x": 9.25, "y": 2}, + {"x": 10.25, "y": 2}, + {"x": 11.25, "y": 2}, + {"x": 12.25, "y": 2}, + {"x": 13.25, "y": 2}, + {"x": 14.25, "y": 2}, + {"x": 15.25, "y": 2, "w": 2.25}, + + {"x": 0, "y": 3}, + + {"x": 1.5, "y": 3, "w": 2.25}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3}, + {"x": 13.75, "y": 3}, + {"x": 14.75, "y": 3, "w": 2.25}, + + {"x": 17, "y": 3}, + + {"x": 0, "y": 4}, + + {"x": 1.5, "y": 4, "w": 1.25}, + {"x": 2.75, "y": 4, "w": 1.25}, + {"x": 4, "y": 4, "w": 1.25}, + {"x": 5.25, "y": 4, "w": 2.25}, + {"x": 7.5, "y": 4}, + + {"x": 9.5, "y": 4, "w": 2.75}, + {"x": 12.25, "y": 4, "w": 1.25}, + {"x": 13.5, "y": 4, "w": 1.25}, + {"x": 14.75, "y": 4, "w": 1.25}, + + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4} + ] } } -} \ No newline at end of file +} diff --git a/keyboards/sirius/uni660/rev2/iso/info.json b/keyboards/sirius/uni660/rev2/iso/info.json index cd32c736905e..faaf217e9db0 100644 --- a/keyboards/sirius/uni660/rev2/iso/info.json +++ b/keyboards/sirius/uni660/rev2/iso/info.json @@ -1,12 +1,106 @@ { - "keyboard_name": "Uni660", - "url": "", - "maintainer": "qmk", - "width": 19, - "height": 5, + "keyboard_name": "Uni660", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, "layouts": { "LAYOUT_iso": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"\u00ac", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"\"", "x":3.5, "y":0}, {"label":"\u00a3", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0, "w":2}, {"label":"Insert", "x":18, "y":0}, {"label":"F1", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"Enter", "x":16.25, "y":1, "w":1.25, "h":2}, {"label":"Delete", "x":18, "y":1}, {"label":"F2", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"@", "x":14.25, "y":2}, {"label":"~", "x":15.25, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":1.25}, {"label":"|", "x":2.75, "y":3}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":9.75, "y":3}, {"label":"M", "x":10.75, "y":3}, {"label":"<", "x":11.75, "y":3}, {"label":">", "x":12.75, "y":3}, {"label":"?", "x":13.75, "y":3}, {"label":"Shift", "x":14.75, "y":3, "w":2.25}, {"label":"Up", "x":17, "y":3}, {"label":"F4", "x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Win", "x":2.75, "y":4, "w":1.25}, {"label":"Alt", "x":4, "y":4, "w":1.25}, {"x":5.25, "y":4, "w":2.25}, {"label":"Fn", "x":7.5, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Menu", "x":13.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":14.75, "y":4, "w":1.25}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + "layout": [ + {"x": 0, "y": 0}, + + {"x": 1.5, "y": 0}, + {"x": 2.5, "y": 0}, + {"x": 3.5, "y": 0}, + {"x": 4.5, "y": 0}, + {"x": 5.5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + + {"x": 9.5, "y": 0}, + {"x": 10.5, "y": 0}, + {"x": 11.5, "y": 0}, + {"x": 12.5, "y": 0}, + {"x": 13.5, "y": 0}, + {"x": 14.5, "y": 0}, + {"x": 15.5, "y": 0}, + {"x": 16.5, "y": 0}, + + {"x": 18, "y": 0}, + + {"x": 0, "y": 1}, + + {"x": 1.5, "y": 1, "w": 1.5}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16.25, "y": 1, "w": 1.25, "h": 2}, + + {"x": 18, "y": 1}, + + {"x": 0, "y": 2}, + + {"x": 1.5, "y": 2, "w": 1.75}, + {"x": 3.25, "y": 2}, + {"x": 4.25, "y": 2}, + {"x": 5.25, "y": 2}, + {"x": 6.25, "y": 2}, + {"x": 7.25, "y": 2}, + + {"x": 9.25, "y": 2}, + {"x": 10.25, "y": 2}, + {"x": 11.25, "y": 2}, + {"x": 12.25, "y": 2}, + {"x": 13.25, "y": 2}, + {"x": 14.25, "y": 2}, + {"x": 15.25, "y": 2}, + + {"x": 0, "y": 3}, + + {"x": 1.5, "y": 3, "w": 1.25}, + {"x": 2.75, "y": 3}, + {"x": 3.75, "y": 3}, + {"x": 4.75, "y": 3}, + {"x": 5.75, "y": 3}, + {"x": 6.75, "y": 3}, + {"x": 7.75, "y": 3}, + + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3}, + {"x": 13.75, "y": 3}, + {"x": 14.75, "y": 3, "w": 2.25}, + + {"x": 17, "y": 3}, + + {"x": 0, "y": 4}, + + {"x": 1.5, "y": 4, "w": 1.25}, + {"x": 2.75, "y": 4, "w": 1.25}, + {"x": 4, "y": 4, "w": 1.25}, + {"x": 5.25, "y": 4, "w": 2.25}, + {"x": 7.5, "y": 4}, + + {"x": 9.5, "y": 4, "w": 2.75}, + {"x": 12.25, "y": 4, "w": 1.25}, + {"x": 13.5, "y": 4, "w": 1.25}, + {"x": 14.75, "y": 4, "w": 1.25}, + + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4} + ] } } -} \ No newline at end of file +} From 924573ece24589869831b7450468971c4dbe980a Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Mon, 22 Jun 2020 20:08:26 +0900 Subject: [PATCH 09/26] [Docs] Japanese translation of docs/feature_macros.md (#9137) * add feature_macros.md translation * update based on comment * update based on comment --- docs/ja/feature_macros.md | 399 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 399 insertions(+) create mode 100644 docs/ja/feature_macros.md diff --git a/docs/ja/feature_macros.md b/docs/ja/feature_macros.md new file mode 100644 index 000000000000..1204fa8ff2ea --- /dev/null +++ b/docs/ja/feature_macros.md @@ -0,0 +1,399 @@ +# マクロ + + + +マクロにより、1つのキーを押すだけで複数のキーストロークを送信することができます。QMK にはマクロを定義し使う方法が幾つかあります。これらはなんでもすることができます: よく使うフレーズの入力、コピーペースト、反復的なゲームの動き、あるいはコードを書くことさえ手助けします。 + +!> **セキュリティの注意**: マクロを使って、パスワード、クレジットカード番号、その他の機密情報のいずれも送信することが可能ですが、それは非常に悪い考えです。あなたのキーボードを手に入れた人は誰でもテキストエディタを開いてその情報にアクセスすることができます。 + +## 新しい方法: `SEND_STRING()` と `process_record_user` + +単語またはフレーズを入力するキーが欲しい時があります。最も一般的な状況のために `SEND_STRING()` を提供しています。これは文字列(つまり、文字のシーケンス)を入力します。簡単にキーコードに変換することができる全ての ASCII 文字がサポートされています (例えば、`\n\t`)。 + +以下は2キーのキーボードのための `keymap.c` の例です: + +```c +enum custom_keycodes { + QMKBEST = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // キーコード QMKBEST が押された時 + SEND_STRING("QMK is the best thing ever!"); + } else { + // キーコード QMKBEST が放された時 + } + break; + + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = { + {QMKBEST, KC_ESC} + } +}; +``` + +ここで起きることは以下の通りです: +最初に他のキーコードで使用されていない範囲で新しいカスタムキーコードを定義します。 +次に、`process_record_user` 関数を使います。これはキーが押されるか放されるたびに呼び出され、カスタムキーコードがアクティブかどうかを確認します。 +アクティブな場合、`SEND_STRING` マクロ (これは C プロセッサのマクロで、QMK のマクロと混同しないでください)を介して文字列 `"QMK is the best thing ever!"` をコンピュータに送信します。 +呼び出し元に、処理したばかりのキー押下を通常通り(機能を置き換えたり変更したりしなかったので)処理し続けるよう指示するため、`true` を返します。 +最後に、最初のボタンがマクロをアクティブにし、2番目のボタンが単なるエスケープボタンになるようにキーマップを定義します。 + +複数のマクロを追加することもできます。 +以下のように、別のキーコードを追加し、switch 文に別の case ラベルを追加することで、それを行うことができます: + +```c +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL, + MY_OTHER_MACRO +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // キーコード QMKBEST が押された時 + SEND_STRING("QMK is the best thing ever!"); + } else { + // キーコード QMKBEST が放された時 + } + break; + case QMKURL: + if (record->event.pressed) { + // キーコード QMKURL が押された場合 + SEND_STRING("https://qmk.fm/\n"); + } else { + // キーコード QMKURL が放された場合 + } + break; + case MY_OTHER_MACRO: + if (record->event.pressed) { + SEND_STRING(SS_LCTL("ac")); // 全てを選択しコピーします + } + break; + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = { + {MY_CUSTOM_MACRO, MY_OTHER_MACRO} + } +}; +``` + +### 高度なマクロ + +`process_record_user()` 関数のほかに、`post_process_record_user()` 関数があります。これは `process_record` の後に実行され、キーストロークが送信された後の処理に使用できます。これは例えば、通常のキーの前に押され、通常のキーの後で放されるキーがほしい場合に便利です。 + +この例では、通常のキー入力を変更して、キーストロークが通常送信される前に `F22` が押されるようにし、キーが放された__後にのみ__ `F22` キーを放します。 + +```c +static uint8_t f22_tracker; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_A ... KC_F21: // F22 をスキップする方法に注意してください + case KC_F23 ... KC_EXSEL: //exsel は修飾キーの直前のキーです + if (record->event.pressed) { + register_code(KC_F22); //これは F22 を押したことを送信することを意味します + 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: // F22 をスキップする方法に注意してください + case KC_F23 ... KC_EXSEL: //exsel は修飾キーの直前のキーです + if (!record->event.pressed) { + f22_tracker--; + if (!f22_tracker) { + unregister_code(KC_F22); //これは F22 を放したことを送信することを意味します + } + } + break; + } +} +``` + + +### タップ、ダウン、アップ + +`Ctrl` あるいは `Home` など、ソースコードに文字列として表記できないキーをマクロで使うこともできます。 +以下のようにラップすることで任意のコードを送信することができます: + +* `SS_TAP()` キーを押して放します。 +* `SS_DOWN()` キーを押します (ただし、放しません)。 +* `SS_UP()` キーを放します。 + +例えば: + + SEND_STRING(SS_TAP(X_HOME)); + +`KC_HOME` をタップします - プリフィックスが `X_` で `KC_` ではないことに注意してください。以下のように、他の文字列と組み合わせることもできます: + + SEND_STRING("VE"SS_TAP(X_HOME)"LO"); + +これは "VE" に続けて `KC_HOME` をタップ、そして "LO" (新しい行の場合は "LOVE" と綴る)を送信します。 + +文字列に遅延を追加することもできます: + +* `SS_DELAY(msecs)` は指定されたミリ秒だけ遅らせます。 + +例えば: + + SEND_STRING("VE" SS_DELAY(1000) SS_TAP(X_HOME) "LO"); + +これは "VE" 、1秒の遅延、`KC_HOME` をタップ、"LO" (新しい行の場合は "LOVE" と綴るが、中間に遅延がある) を送信します。 + +使用できるモッドショートカットもいくつかあります: + +* `SS_LCTL(文字列)` +* `SS_LSFT(文字列)` +* `SS_LALT(文字列)`、`SS_LOPT(文字列)` +* `SS_LGUI(文字列)`、`SS_LCMD(文字列)`、`SS_LWIN(文字列)` +* `SS_RCTL(文字列)` +* `SS_RSFT(文字列)` +* `SS_RALT(文字列)`、`SS_ROPT(文字列)`、`SS_ALGR(文字列)` +* `SS_RGUI(文字列)`、`SS_RCMD(文字列)`、`SS_RWIN(文字列)` + +これらはそれぞれの修飾キーを押し、指定された文字列を送信してから、修飾キーを解放します。 +それらは以下のように使うことができます: + + SEND_STRING(SS_LCTL("a")); + +これは、左 Control +`a` (左 Control をダウンし、`a`、左 Control をアップ)を送信します - それらは文字列(例えば `"k"`)であり、`X_K` キーコードでは無いことに注意してください。 + +### 代替キーマップ + +デフォルトでは、QWERTY レイアウトの US キーマップを想定しています; それを変更したい場合(例えば OS がソフトウェア Colemak を使う場合)、キーマップのどこかに以下を含めます: + + #include + +### メモリ内の文字列 + +何らかの理由で文字列を操作していて、(リテラル、文字列定数の代わりに)生成したばかりのものを出力する必要がある場合は、以下のように `send_string()` を使うことができます: + +```c +char my_str[4] = "ok."; +send_string(my_str); +``` + +上で定義したショートカットは `send_string()` では動作しないですが、必要に応じて別の行に分けることができます: + +```c +char my_str[4] = "ok."; +SEND_STRING("I said: "); +send_string(my_str); +SEND_STRING(".."SS_TAP(X_END)); +``` + + +## 高度なマクロ関数 + +マクロの生成に役立つ関数が幾つかあります。マクロの中にかなり高度なコードを書くことができますが、機能が複雑になりすぎる場合は、代わりにカスタムキーコードを定義することをお勧めします。マクロはシンプルにしなければなりません。 + +?> 追加の機能として、[便利な関数](ja/ref_functions.md) の中で説明される関数を使うこともできます。例えば `reset_keyboard()` によりマクロの一部としてキーボードをリセットすることができます。 + +### `record->event.pressed` + +これでスイッチが押されているか放されているかどうかをテストすることができます。以下が例です。 + +```c + if (record->event.pressed) { + // キーダウン時 + } else { + // キーアップ時 + } +``` + +### `register_code();` + +これはコンピュータに `` キーダウンイベントを送信します。例として `KC_ESC`、`KC_C`、`KC_4` や、`KC_LSFT` と `KC_LGUI` のような修飾キーなどもあります。 + +### `unregister_code();` + +`register_code` 関数と対応して、これは `` キーアップイベントをコンピュータに送信します。これを使わない場合、キーは送信されるまで押し続けられます。 + +### `tap_code();` + +これは `register_code()` を送信し、その後 `unregister_code()` を送信します。押下とリリースイベントの両方を送信する場合に便利です (押し続けるのではなく、キーを"タップ"する)。 + +タップの登録(解除)に問題がある場合、`config.h` ファイルで `#define TAP_CODE_DELAY 100` を設定することで、登録イベントと解除イベントの間に遅延を追加することができます。値はミリ秒です。 + +### `register_code16();`、`unregister_code16();`、`tap_code16();` + +これらの関数は対応する通常の関数と同様に機能しますが、修飾キーで修飾されたキーコードを使うことができます (Shift、Alt、Control、GUI を適用)。 + +例えば、修飾キーを押して(`register_code()`して)、キーコードを押す(`register_code()`する)代わりに、`register_code16(S(KC_5));` を使うことができます。 + +### `clear_keyboard();` + +これは現在押されている全ての修飾キーとキーをクリアします。 + +### `clear_mods();` + +これは現在押されている全ての修飾キーをクリアします。 + +### `clear_keyboard_but_mods();` + +これは現在押されている修飾キー以外の全てのキーをクリアします。 + +## 高度な例: + +### スーパー ALT↯TAB + +このマクロは `KC_LALT` を登録し、`KC_TAB` をタップして、1000ms 待ちます。キーが再度タップされると、別の `KC_TAB` が送信されます; タップが無い場合、`KC_LALT` が登録解除され、ウィンドウを切り替えることができます。 + +```c +bool is_alt_tab_active = false; # keymap.c の先頭付近にこれを追加します +uint16_t alt_tab_timer = 0; # すぐにそれらを使います + +enum custom_keycodes { # 素晴らしいキーコードを用意してください + ALT_TAB = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { # これはキーコードを利用したつまらない作業のほとんどを行います。 + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +void matrix_scan_user(void) { # とても重要なタイマー + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } +} +``` + +--- + +## **(非推奨)** 古い方法: `MACRO()` と `action_get_macro` + +!> これは TMK から継承されており、更新されていません - 代わりに `SEND_STRING` と `process_record_user` を使うことをお勧めします。 + +デフォルトでは、QMK はマクロが無いことを前提としています。マクロを定義するには、`action_get_macro()` 関数を作成します。例えば: + +```c +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END); + case 1: + return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END); + } + } + return MACRO_NONE; +}; +``` + +これは割り当てられているキーが押された時に実行される2つのマクロを定義します。キーが放された時にそれらを実行したい場合は、if 文を変更することができます。 + + if (!record->event.pressed) { + +### マクロコマンド + +マクロは以下のコマンドを含めることができます: + +* I() はストロークの間隔をミリ秒単位で変更します。 +* D() はキーを押します。 +* U() はキーを放します。 +* T() はキーをタイプ(押して放す)します。 +* W() は待ちます (ミリ秒)。 +* END 終了マーク。 + +### マクロをキーにマッピングする + +マクロを呼び出すにはキーマップ内で `M()` 関数を使います。例えば、2キーのキーボードのキーマップは以下の通りです: + +```c +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + M(0), M(1) + ), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END); + case 1: + return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END); + } + } + return MACRO_NONE; +}; +``` + +左側のキーを押すと、"Hi!" を入力し、右側のキーを押すと "Bye!" を入力します。 + +### マクロに名前を付ける + +キーマップを読みやすくしながらキーマップから参照したいマクロがたくさんある場合は、ファイルの先頭で `#define` を使って名前を付けることができます。 + +```c +#define M_HI M(0) +#define M_BYE M(1) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + M_HI, M_BYE + ), +}; +``` + + +## 高度な例: + +### 単一キーのコピーと貼り付け + +この例は、押された時に `Ctrl-C` を送信し、放される時に `Ctrl-V` を送信するマクロを定義します。 + +```c +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case 0: { + if (record->event.pressed) { + return MACRO( D(LCTL), T(C), U(LCTL), END ); + } else { + return MACRO( D(LCTL), T(V), U(LCTL), END ); + } + break; + } + } + return MACRO_NONE; +}; +``` From c7cc20918b0048184d489d691ba60ce9316c15bb Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Mon, 22 Jun 2020 20:11:49 +0900 Subject: [PATCH 10/26] [Docs] Japanese translation of docs/feature_userspace.md (#9253) * add feature_userspace.md translation * update based on comment --- docs/ja/feature_userspace.md | 260 +++++++++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 docs/ja/feature_userspace.md diff --git a/docs/ja/feature_userspace.md b/docs/ja/feature_userspace.md new file mode 100644 index 000000000000..69381324717e --- /dev/null +++ b/docs/ja/feature_userspace.md @@ -0,0 +1,260 @@ +# ユーザスペース: キーマップ間でのコードの共有 + + + +似たキーマップを複数のキーボードで使う場合、それらの間でコードを共有できるという利点が得られることがあります。`users/`に以下の構造でキーマップ(理想的には GitHub のユーザ名、``)と同じ名前の独自のフォルダを作成します: + +* `/users//` (パスに自動的に追加されます) + * `readme.md` (オプション、推奨) + * `rules.mk` (自動的に含まれます) + * `config.h` (自動的に含まれます) + * `.h` (オプション) + * `.c` (オプション) + * `cool_rgb_stuff.c` (オプション) + * `cool_rgb_stuff.h` (オプション) + + +以下のように、`` という名前のキーマップをビルドする時のみ、これが全て起きます: + + make planck: + +例えば、 + + make planck:jack + +は、`/users/jack/rules.mk` に加えて、パスに `/users/jack/` フォルダを含めます。 + +!> この `name` は必要に応じて[上書き](#override-default-userspace)することができます。 + +## `Rules.mk` + +`rules.mk` は自動的に処理される2つファイルのうちの1つです。これにより、コンパイル時に追加のソースファイル( `.c` など)を追加できます。 + +追加されるデフォルトのソースファイルとして `.c` を使うことを強くお勧めします。それを追加するために、以下のように `rules.mk` に SRC を追加する必要があります: + + SRC += .c + +追加のファイルも同じ方法で追加できます - ただし、``.c/.h という名前のファイルを最初に用意することをお勧めします。 + +ビルド時に `/users//rules.mk` ファイルはキーマップの `rules.mk` の_後_でインクルードされます。これにより、キーボードによっては利用できないことのある個々の QMK 機能を利用する機能をユーザスペース `rules.mk` に持つことができます。 + +例えば、RGB ライトをサポートする全てのキーボード間で RGB 制御機能を共有する場合、RGBLIGHT 機能が有効であればサポートを追加することができます: +```make +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + # ここにファンシーな rgb 関数のソースを含める + SRC += cool_rgb_stuff.c +endif +``` + +別のやり方として、キーマップの `rules.mk` で `define RGB_ENABLE` と定義し、以下のようにユーザスペースの `rules.mk` で変数をチェックすることができます: +```make +ifdef RGB_ENABLE + # ここにファンシーな rgb 関数のソースを含める + SRC += cool_rgb_stuff.c +endif +``` + +### デフォルトのユーザスペースの上書き :id=override-default-userspace + +デフォルトでは、使用されるユーザスペース名はキーマップ名と同じです。状況によってはこれは望ましくありません。例えば、[レイアウト](ja/feature_layouts.md)機能を使う場合、異なるキーマップに同じ名前 (例えば、ANSI および ISO) を使うことができません。レイアウトに `mylayout-ansi` や `mylayout-iso` という名前を付け、以下の行をレイアウトの `rules.mk` に追加します: + +``` +USER_NAME := mylayout +``` + +これは、基板上に物理的に異なる機能を備えた、複数の異なるキーボード(RGBライトを備えたキーボード、オーディオを備えたキーボード、LEDの数が異なる、コントローラ上の異なるPINに接続されているなど)がある場合にも役立ちます。 + +## 設定オプション (`config.h`) + +さらに、ここにある `config.h` はキーマップフォルダ内の同名のファイルと同じように処理されます。これは `.h` ファイルとは別個に処理されます。 + +この理由は、`.h` は (`#define TAPPING_TERM 100` などのような)設定を追加する時には追加されず、`config.h` ファイル内の `` ファイルを含めるとコンパイルの問題を引き起こすからです。 + +!>`config.h` は[設定オプション](ja/config_options.md)のために使い、`.h` ファイルはユーザあるいは(レイヤーあるいはキーコードのための enum のような)キーマップ固有の設定のために使うべきです + + +## Readme (`readme.md`) + +作者情報 (あなたの名前、GitHub ユーザ名、eメール)およびオプションで[GPL 互換のライセンス](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses)を含めてください。 + +以下をテンプレートとして使うことができます: +``` +Copyright @ + +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 . +``` + +年、名前、eメールおよび GitHub ユーザ名をあなたの情報に置き換えます。 + +さらに、コードを他の人に共有したい場合、ここはコードを文章化するのに適した場所です。 + +## 特定のキーマップをサポートする全てのキーボードをビルドする + +1つのコマンドで全てのキーマップのビルドを確認したいですか?以下で実行することができます: + + make all: + +例えば、 + + make all:jack + +これは、[_プルリクエスト_](https://github.com/qmk/qmk_firmware/pulls) を準備する時に全てが正常にコンパイルされることを確認したい場合に最適です。 + +## 例 + +簡単な例については、[`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna) を調べてください。 +より複雑な例については、[`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna) のユーザスペースを調べてください。 + + +### カスタマイズされた関数 :id=customized-functions + +QMK には、[`_quantum`、`_kb` および `_user` バージョン](ja/custom_quantum_functions.md#a-word-on-core-vs-keyboards-vs-keymap)を持つ使用可能な[関数](custom_quantum_functions.md)が山ほどあります。 ほとんどの場合、これらの関数のユーザバージョンを使う必要があります。しかし問題はそれらをユーザスペースで使う場合、キーマップで使うことができるバージョンが無いことです。 + +しかし、実際にはキーマップバージョンのサポートを追加し、ユーザスペースとキーマップの両方で使うことができます。 + + +例えば、`layer_state_set_user()` 関数を見てみましょう。全てのキーボードで [Tri Layer State](ja/ref_functions.md#olkb-tri-layers) 機能を有効にしながら、`keymap.c` ファイルで Tri Layer 機能を保持することができます。 + +`` ファイル内で、以下を追加する必要があります: +```c +__attribute__ ((weak)) +layer_state_t layer_state_set_keymap (layer_state_t state) { + return state; +} + +layer_state_t layer_state_set_user (layer_state_t state) { + state = update_tri_layer_state(state, 2, 3, 5); + return layer_state_set_keymap (state); +} +``` +`__attribute__ ((weak))` 部分は、コンパイラにこれが `keymap.c` 内のバージョンに置き換えられるプレースホルダ関数であることを伝えます。そうすれば、`keymap.c` に追加する必要はありませんが、追加しても関数が同じ名前を持つため競合することはありません。 + +ここでの `_keymap` 部分は重要では無く、`_quantum`、`_kb` あるいは `_user` は既に使われているため、それら以外のものである必要があります。`layer_state_set_mine`、`layer_state_set_fn` などを使うことができます。 + +[`users/drashna`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna) 内の [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) でこのリストと他の一般的な関数を見つけることができます。 + +### カスタム機能 + +ユーザスペース機能は膨大な数のキーボードをサポートすることができるため、特定の機能は有効にしたいが、他のキーボードでは有効にしたくないかもしれません。そして実際に自分のユーザスペースで有効あるいは無効にすることができる「機能」を作成することができます。 + +例えば、(スペースを節約するために)特定のキーボードでのみたくさんのマクロを利用したい場合、それらを `#ifdef MACROS_ENABLED` して「見えないように」してから、キーボードごとに有効にすることができます。これを行うには、以下を rules.mk に追加します。 +```make +ifeq ($(strip $(MACROS_ENABLED)), yes) + OPT_DEFS += -DMACROS_ENABLED +endif +``` +`OPT_DEFS` 設定は `MACROS_ENABLED` がキーボード用に定義されるようにし(名前の前に `-D` があることに注意してください)、c/h ファイルで状態をチェックするために `#ifdef MACROS_ENABLED` を使うことができ、それに基づいてそのコードを処理します。 + +次にキーマップの `rules.mk` に `MACROS_ENABLED = yes` を追加し、ユーザスペースでこの機能とコードを有効にします。 + +そして `process_record_user` 関数の中で、以下のようなことを行います: +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +#ifdef MACROS_ENABLED + case MACRO1: + if (!record->event.pressed) { + SEND_STRING("This is macro 1!"); + } + break; + case MACRO2: + if (!record->event.pressed) { + SEND_STRING("This is macro 2!"); + } + break; +#endif + } + return true; +} +``` + + +### 結合マクロ + +全てのキーマップについてユーザスペースにマクロやそのほかの関数を統合したい場合は、そうすることができます。これは上記の[カスタマイズ関数](#customized-functions)の例に基づいています。これは異なるキーボード間で共有される大量のマクロを維持し、キーボード固有のマクロも可能です。 + +最初に、全ての `keymap.c` ファイルを調べ、代わりに `process_record_user` を `process_record_keymap` に置き換えます。この方法では、これらのキーボードでキーボード固有のコードを使用でき、カスタムの "global" キーコードも使うことができます。また、`SAFE_RANGE` を `NEW_SAFE_RANGE` に置き換えて、キーコードが重複しないようにすることもできます。 + +次に、全ての keymap.c ファイルに `#include ` を追加します。これにより、各キーマップでそれらを再定義することなく新しいキーコードを使うことができます。 + +それが完了したら、必要なキーコードの定義を `.h` ファイルに設定します。例えば: +```c +#pragma once + +#include "quantum.h" +#include "action.h" +#include "version.h" + +// 全てを定義 +enum custom_keycodes { + KC_MAKE = SAFE_RANGE, + NEW_SAFE_RANGE // キーマップ固有のコードについては "NEW_SAFE_RANGE" を使用 +}; +``` + +ここで、`.c` ファイルを作成し、この内容をそれに追加します: + +```c +#include ".h" + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_MAKE: // ファームウェアをコンパイルし、キーボードのブートローダに基づく書き込みコマンドを追加します + if (!record->event.pressed) { + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); clear_oneshot_mods(); + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); + #ifndef FLASH_BOOTLOADER + if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) + #endif + { + SEND_STRING(":flash"); + } + if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { + SEND_STRING(" -j8 --output-sync"); + } + tap_code(KC_ENT); + set_mods(temp_mod); + } + break; + + } + return process_record_keymap(keycode, record); +} +``` + +(マクロパッドのような) Shift ボタンを持たないキーボードについては、ブートローダオプションを常に含める方法が必要です。これを行うには、以下をユーザスペースフォルダ内の `rules.mk` に追加します: + +```make +ifeq ($(strip $(FLASH_BOOTLOADER)), yes) + OPT_DEFS += -DFLASH_BOOTLOADER +endif +``` + +これは任意のキーマップで使うことができる新しい `KC_MAKE` キーコードを追加します。そして、このキーコードは、`make :` を出力するため、頻繁なコンパイルを簡単にします。そして、これは現在のキーボードの情報を出力するため、全てのキーボードとキーマップで動作します。そのため毎回これを入力する必要はありません。 + +また、Shift を押したままにすると書き込みの対象 (`:flash`) をコマンドに追加します。Control を押したままにすると、複数のファイルを一度に処理することでコンパイル時間を短縮する幾つかのコマンドを追加します。 + +そして Shift キーが無いキーボード、あるいは常に書き込みを試したいキーボードについては、キーマップの `rules.mk` に `FLASH_BOOTLOADER = yes` を追加することができます。 + +?> これはブートローダの設定に基づいて正しいユーティリティを使って新しくコンパイルされたファームウェアを自動的に書き込むはずです (あるいはデフォルトで HEX ファイルを生成するだけ)。ただし、これは全てのシステムで動作するわけではないことに注意してください。はっきり言うと、AVRDUDE は WSL では動作しません。そして、これは BootloadHID あるいは mdloader をサポートしません。 From 58af0305f57baa83d7233ff5eee1930396989fca Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Mon, 22 Jun 2020 20:13:01 +0900 Subject: [PATCH 11/26] [Update] Japanese translation of newbs.md (#9388) * update docs/ja/newbs.md * Update docs/ja/newbs.md Co-authored-by: shela * Update docs/ja/newbs.md Co-authored-by: shela * Update docs/ja/newbs.md Co-authored-by: shela Co-authored-by: shela --- docs/ja/newbs.md | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/docs/ja/newbs.md b/docs/ja/newbs.md index 465b82106d27..b582bc425672 100644 --- a/docs/ja/newbs.md +++ b/docs/ja/newbs.md @@ -2,40 +2,47 @@ -QMK は、メカニカルキーボード用の強力なオープンソースファームウェアです。 -QMK を使用して、シンプルかつ強力な方法でキーボードをカスタマイズできます。 -完全な初心者からプログラマーに至るまで、あらゆるスキルレベルの人々が QMK を使用してキーボードをカスタマイズしています。 -このガイドは、あなたのスキルにかかわらず、同じことを行う手助けをします。 +キーボードには、コンピュータ入っているものと似たようなプロセッサが入っています。 +このプロセッサでは、キーボードのボタンの押し下げの検出を担当し、キーが押されたときにコンピュータに通知するソフトウェアが動作しています。 +QMK Firmware は、そのソフトウェアの役割を果たし、ボタンの押下を検出しその情報をホストコンピュータに渡します。 +カスタムキーマップを作るということは、キーボード上で動くプログラムを作るということなのです。 + +QMK は、簡単なことは簡単に、そして、難しいことを可能なことにすることで、あなたの手にたくさんのパワーをもたらします。 +パワフルなキーマップを作るためにプログラムを作成する方法を知る必要はありません。いくつかのシンプルな文法に従うだけで OK です。 お使いのキーボードで QMK を実行できるかどうか不明ですか? もし作成したキーボードがメカニカルキーボードの場合、実行できる可能性が高いです。 -QMK は[多くの趣味のキーボード](http://qmk.fm/keyboards/)をサポートしているため、もし現在のキーボードで QMK を実行できない場合でも、ニーズに合ったキーボードを見つけるのに問題はないはずです。 +QMK は[多くの趣味のキーボード](http://qmk.fm/keyboards/)をサポートしています。 +現在使用しているキーボードが QMK を実行できない場合、QMK を実行できるキーボードの選択肢はたくさんあります。 + +## このガイドは私のためにあるのでしょうか? + +このガイドは、ソースコードを使ってキーボードのファームウェアを構築したいと考えている人に適しています。 +もしあなたがすでにプログラマーであれば、このプロセスはとても身近で簡単に理解できるでしょう。 +もし、プログラミングの考え方に抵抗があるのであれば、代わりに[私たちのオンラインGUI](ja/newbs_building_firmware_configurator.md)を見てみてください。 ## 概要 -このガイドには7つの主要なセクションがあります。 +このガイドには4つの主要なセクションがあります。 -* [はじめに](ja/newbs_getting_started.md) -* [コマンドラインを使用して初めてのファームウェアを構築する](ja/newbs_building_firmware.md) -* [オンライン GUI を使用して初めてのファームウェアを構築する](ja/newbs_building_firmware_configurator.md) -* [ファームウェアを書きこむ](ja/newbs_flashing.md) -* [テストとデバッグ](ja/newbs_testing_debugging.md) -* [QMK における Git 運用作法](ja/newbs_git_best_practices.md) -* [さらに学ぶための学習リソース](ja/newbs_learn_more_resources.md) +1. [環境設定](ja/newbs_getting_started.md) +2. [コマンドラインを使用して初めてのファームウェアを構築する](ja/newbs_building_firmware.md) +3. [ファームウェアを書きこむ](ja/newbs_flashing.md) +4. [テストとデバッグ](ja/newbs_testing_debugging.md) このガイドは、これまでソフトウェアをコンパイルしたことがない人を支援することに特化しています。 その観点から選択と推奨を行います。 これらの手順の多くには代替方法があり、これらの代替方法のほとんどをサポートしています。 タスクを達成する方法について疑問がある場合は、[案内を求めることができます](ja/getting_started_getting_help.md)。 -## 追加のリソース(英語) +## 追加のリソース -* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 新規ユーザ視点から見た QMK ファームウェアの基本的な使用方法をカバーしたユーザ作成のブログ。 +このガイドの他にも、QMK の学習に役立つリソースがいくつかあります。[学習リソース](ja/newbs_learn_more_resources.md)のページにまとめました。 -## 追加のリソース(日本語) +## オープンソース -_日本語のリソース情報を募集中です。_ +QMKは GNU General Public License でリリースされているオープンソース・ソフトウェアです。 From 1ab8f969f6a8a804241a64a8df40c49daab409a7 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Mon, 22 Jun 2020 20:24:33 +0900 Subject: [PATCH 12/26] [Update] Japanese Translation of docs/faq_build.md (#9458) * update docs/ja/faq_build.md * update docs/ja/faq_build.md to 0.9.10 * Update docs/ja/faq_build.md Co-authored-by: shela Co-authored-by: shela --- docs/ja/faq_build.md | 46 ++++++++++++++++---------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/docs/ja/faq_build.md b/docs/ja/faq_build.md index 9b4ce12a4863..2b63cef85a9b 100644 --- a/docs/ja/faq_build.md +++ b/docs/ja/faq_build.md @@ -1,8 +1,8 @@ # よくあるビルドの質問 このページは 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 ``` From 24b0cda3e877c28c53c1aca02ef6e0eaa66fad91 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Mon, 22 Jun 2020 15:25:56 -0400 Subject: [PATCH 13/26] [Keyboard] add h60 PCB (#9242) * add h60 initial files * add h60 image * updated per PR request * Update keyboards/hineybush/h60/keymaps/default/keymap.c * Update keyboards/hineybush/h60/keymaps/kei/keymap.c * Update keyboards/hineybush/h60/keymaps/via/keymap.c * Update keyboards/hineybush/h60/h60.h * Update keyboards/hineybush/h60/h60.h * Update keyboards/hineybush/h60/rules.mk --- keyboards/hineybush/h60/config.h | 89 ++++++++++++++ keyboards/hineybush/h60/h60.c | 31 +++++ keyboards/hineybush/h60/h60.h | 111 ++++++++++++++++++ .../hineybush/h60/keymaps/default/keymap.c | 28 +++++ .../hineybush/h60/keymaps/default/readme.md | 1 + keyboards/hineybush/h60/keymaps/kei/keymap.c | 26 ++++ keyboards/hineybush/h60/keymaps/kei/readme.md | 1 + keyboards/hineybush/h60/keymaps/via/keymap.c | 40 +++++++ keyboards/hineybush/h60/keymaps/via/readme.md | 1 + keyboards/hineybush/h60/keymaps/via/rules.mk | 1 + keyboards/hineybush/h60/readme.md | 15 +++ keyboards/hineybush/h60/rules.mk | 25 ++++ 12 files changed, 369 insertions(+) create mode 100644 keyboards/hineybush/h60/config.h create mode 100644 keyboards/hineybush/h60/h60.c create mode 100644 keyboards/hineybush/h60/h60.h create mode 100644 keyboards/hineybush/h60/keymaps/default/keymap.c create mode 100644 keyboards/hineybush/h60/keymaps/default/readme.md create mode 100644 keyboards/hineybush/h60/keymaps/kei/keymap.c create mode 100644 keyboards/hineybush/h60/keymaps/kei/readme.md create mode 100644 keyboards/hineybush/h60/keymaps/via/keymap.c create mode 100644 keyboards/hineybush/h60/keymaps/via/readme.md create mode 100644 keyboards/hineybush/h60/keymaps/via/rules.mk create mode 100644 keyboards/hineybush/h60/readme.md create mode 100644 keyboards/hineybush/h60/rules.mk diff --git a/keyboards/hineybush/h60/config.h b/keyboards/hineybush/h60/config.h new file mode 100644 index 000000000000..ef14fdd4f89e --- /dev/null +++ b/keyboards/hineybush/h60/config.h @@ -0,0 +1,89 @@ +/* +Copyright 2020 hineybush + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEBBE +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush keyboards +#define PRODUCT h60 +#define DESCRIPTION A 60% PCB. + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B6, B5, B4, D7, E6 } +#define MATRIX_COL_PINS { B3, D0, D1, D2, D3, D5, D6, C7, F0, F1, F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// leaving this here if I decide to add RGB down the line + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/h60/h60.c b/keyboards/hineybush/h60/h60.c new file mode 100644 index 000000000000..c3f13824796f --- /dev/null +++ b/keyboards/hineybush/h60/h60.c @@ -0,0 +1,31 @@ +/* Copyright 2020 hineybush + * + * 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 . + */ + +#include "h60.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(C6); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(C6, !led_state.caps_lock); + } + return true; +} + diff --git a/keyboards/hineybush/h60/h60.h b/keyboards/hineybush/h60/h60.h new file mode 100644 index 000000000000..0a19ffbf3bd1 --- /dev/null +++ b/keyboards/hineybush/h60/h60.h @@ -0,0 +1,111 @@ +/* Copyright 2020 hineybush + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k400, k401, k402, k403, k406, k408, k409, k410, k411, k412 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO}, \ + { k400, k401, k402, k403, KC_NO,KC_NO,k406, KC_NO,k408, k409, k410, k411, k412, KC_NO} \ +} + +#define LAYOUT_60_ansi(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, \ + k400, k401, k402, k406, k409, k410, k411, k412 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO}, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, KC_NO,KC_NO}, \ + { k400, k401, k402, KC_NO,KC_NO,KC_NO,k406, KC_NO,KC_NO,k409, k410, k411, k412, KC_NO} \ +} + +#define LAYOUT_60_ansi_split_bs_rshift(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k400, k401, k402, k406, k409, k410, k411, k412 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO}, \ + { k400, k401, k402, KC_NO,KC_NO,KC_NO,k406, KC_NO,KC_NO,k409, k410, k411, k412, KC_NO} \ +} + +#define LAYOUT_60_hhkb(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k401, k402, k406, k410, k411 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO}, \ + { KC_NO,k401, k402, KC_NO,KC_NO,KC_NO,k406, KC_NO,KC_NO,KC_NO,k410, k411, KC_NO,KC_NO} \ +} + +#define LAYOUT_60_tsangan_hhkb(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k400, k401, k402, k406, k410, k411, k412 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO}, \ + { k400, k401, k402, KC_NO,KC_NO,KC_NO,k406, KC_NO,KC_NO,KC_NO,k410, k411, k412, KC_NO} \ +} + +#define LAYOUT_60_tsangan_split_rshift(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k400, k401, k402, k406, k410, k411, k412 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO}, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO}, \ + { k400, k401, k402, KC_NO,KC_NO,KC_NO,k406, KC_NO,KC_NO,KC_NO,k410, k411, k412, KC_NO} \ +} diff --git a/keyboards/hineybush/h60/keymaps/default/keymap.c b/keyboards/hineybush/h60/keymaps/default/keymap.c new file mode 100644 index 000000000000..9195da4b8587 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2020 hineybush + + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + [_BASE] = LAYOUT_60_ansi( + KC_ESC, 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_RGUI, KC_RCTL), + + [_FN] = LAYOUT_60_ansi( + KC_TRNS, BL_TOGG, BL_DEC, BL_INC, 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, RESET, 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_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_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/hineybush/h60/keymaps/default/readme.md b/keyboards/hineybush/h60/keymaps/default/readme.md new file mode 100644 index 000000000000..08aa4a5c8fe2 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for h60 diff --git a/keyboards/hineybush/h60/keymaps/kei/keymap.c b/keyboards/hineybush/h60/keymaps/kei/keymap.c new file mode 100644 index 000000000000..528e1ac970d5 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/kei/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 hineybush + + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_60_hhkb( + KC_ESC, 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_BSLS, KC_GRV, + 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_DEL, + KC_LCTL, 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, MO(1), + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT), + [_FN] = LAYOUT_60_hhkb( + KC_TRNS, BL_TOGG, BL_DEC, BL_INC, 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, RESET, 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_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_TRNS, KC_MPLY, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/hineybush/h60/keymaps/kei/readme.md b/keyboards/hineybush/h60/keymaps/kei/readme.md new file mode 100644 index 000000000000..c7b8dd630121 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/kei/readme.md @@ -0,0 +1 @@ +# The default keymap for the Kei keyboard diff --git a/keyboards/hineybush/h60/keymaps/via/keymap.c b/keyboards/hineybush/h60/keymaps/via/keymap.c new file mode 100644 index 000000000000..75c9ac2dd2c5 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/via/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 hineybush + + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_all( + KC_ESC, 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_TRNS, + 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_TRNS, + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_RALT, MO(1), KC_RGUI, KC_RCTL), + [_FN1] = LAYOUT_all( + KC_TRNS, BL_TOGG, BL_DEC, BL_INC, 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, RESET, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_FN2] = LAYOUT_all( + 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_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_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_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_FN3] = LAYOUT_all( + 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_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_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_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/hineybush/h60/keymaps/via/readme.md b/keyboards/hineybush/h60/keymaps/via/readme.md new file mode 100644 index 000000000000..a8d6e39e1513 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for h60 diff --git a/keyboards/hineybush/h60/keymaps/via/rules.mk b/keyboards/hineybush/h60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hineybush/h60/readme.md b/keyboards/hineybush/h60/readme.md new file mode 100644 index 000000000000..3bc38cc0adaf --- /dev/null +++ b/keyboards/hineybush/h60/readme.md @@ -0,0 +1,15 @@ +# h60 + +![h60](https://live.staticflickr.com/65535/49952697531_2efeaa0bd6_k.jpg) + +A GH60 form factor PCB for 60% keyboards. Uses a USB Type C connector. + +* Keyboard Maintainer: [hineybush](https://github.com/hineybush) +* Hardware Supported: h60 +* Hardware Availability: [hiney.cc](https://hiney.cc) + +Make example for this keyboard (after setting up your build environment): + + make hineybush/h60: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). diff --git a/keyboards/hineybush/h60/rules.mk b/keyboards/hineybush/h60/rules.mk new file mode 100644 index 000000000000..92da9c653f92 --- /dev/null +++ b/keyboards/hineybush/h60/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # 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 = yes # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_tsangan_hhkb From f0bde7906d35c1955a39251659e80d41caccbc54 Mon Sep 17 00:00:00 2001 From: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Date: Tue, 23 Jun 2020 15:30:05 +1000 Subject: [PATCH 14/26] Update miryoku (#9442) - Add mouse buttons overlay layer - Change button order - Remove crkbd hardware specifics - Add alternative base layer alphas - Change title - Add logo - Reword intro text - Add dev branch and new commits links - Replace manual toc and remove anchors - Unindent lists - Reduce headings - Update docs - Build keymap as object instead of including .c file - Add kle subset mapping images - Add alternative mapping support - Change default mapping for ortho_4x12 - Add split mapping for ortho_4x12 - Add contact section - Add #pragma once to layout and keyboard config.h --- .../keymaps/manna-harbour_miryoku/config.h | 26 +- .../keymaps/manna-harbour_miryoku/keymap.c | 53 -- .../keymaps/manna-harbour_miryoku/rules.mk | 7 - .../ergodox/manna-harbour_miryoku/config.h | 20 + .../ergodox/manna-harbour_miryoku/keymap.c | 19 - .../ortho_4x12/manna-harbour_miryoku/config.h | 31 + .../ortho_4x12/manna-harbour_miryoku/keymap.c | 15 - users/manna-harbour_miryoku/config.h | 15 + .../manna-harbour_miryoku.c | 61 +- .../manna-harbour_miryoku.h | 19 + users/manna-harbour_miryoku/miryoku.org | 559 +++++++++++------- users/manna-harbour_miryoku/rules.mk | 17 +- 12 files changed, 513 insertions(+), 329 deletions(-) delete mode 100644 keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk create mode 100644 layouts/community/ergodox/manna-harbour_miryoku/config.h create mode 100644 layouts/community/ortho_4x12/manna-harbour_miryoku/config.h create mode 100644 users/manna-harbour_miryoku/manna-harbour_miryoku.h diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h b/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h index e2fe1824da34..a3d430b1e82f 100644 --- a/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h +++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h @@ -2,17 +2,15 @@ #pragma once -#define EE_HANDS - -#ifdef RGB_MATRIX_ENABLE -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. -#define RGB_MATRIX_HUE_STEP 8 -#define RGB_MATRIX_SAT_STEP 8 -#define RGB_MATRIX_VAL_STEP 8 -#define RGB_MATRIX_SPD_STEP 10 -#endif - -#define SSD1306OLED // old oled driver +#define LAYOUT_miryoku( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \ +) \ +LAYOUT( \ +KC_NO, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, KC_NO, \ +KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ +KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, \ + K32, K33, K34, K35, K36, K37 \ +) diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c index f5be6844f8c4..a852ddd05cd4 100644 --- a/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c +++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c @@ -1,54 +1 @@ // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -#define LAYOUT_miryoku( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ - N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \ -) \ -LAYOUT( \ -KC_NO, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, KC_NO, \ -KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ -KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, \ - K32, K33, K34, K35, K36, K37 \ -) - -#include "manna-harbour_miryoku.c" - - -#ifdef SSD1306OLED - -#include "ssd1306.h" - -void matrix_init_user(void) { - iota_gfx_init(!has_usb()); // turns on the display -} - -// When add source files to SRC in rules.mk, you can use functions. -const char *read_logo(void); - -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (host_keyboard_leds() & (1<display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} - -#endif //SSD1306OLED diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk b/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk deleted file mode 100644 index c4fb15f34263..000000000000 --- a/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -# generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -RGB_MATRIX_ENABLE = WS2812 - -# old oled driver -SRC += ./lib/glcdfont.c \ - ./lib/logo_reader.c diff --git a/layouts/community/ergodox/manna-harbour_miryoku/config.h b/layouts/community/ergodox/manna-harbour_miryoku/config.h new file mode 100644 index 000000000000..0f20409c2e84 --- /dev/null +++ b/layouts/community/ergodox/manna-harbour_miryoku/config.h @@ -0,0 +1,20 @@ +// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- + +#pragma once + +#define LAYOUT_miryoku(\ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ergodox_pretty( \ +KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ +KC_NO, K00, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09, KC_NO, \ +KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ +KC_NO, K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29, KC_NO, \ +KC_NO, KC_NO, KC_NO, KC_NO, K32, K37, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, \ + K33, K34, KC_NO, KC_NO, K35, K36 \ +) diff --git a/layouts/community/ergodox/manna-harbour_miryoku/keymap.c b/layouts/community/ergodox/manna-harbour_miryoku/keymap.c index 1c715a68f7ae..a852ddd05cd4 100644 --- a/layouts/community/ergodox/manna-harbour_miryoku/keymap.c +++ b/layouts/community/ergodox/manna-harbour_miryoku/keymap.c @@ -1,20 +1 @@ // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -#define LAYOUT_miryoku(\ -K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ -K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ -K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ -N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ -)\ -LAYOUT_ergodox_pretty( \ -KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ -KC_NO, K00, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09, KC_NO, \ -KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ -KC_NO, K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29, KC_NO, \ -KC_NO, KC_NO, KC_NO, KC_NO, K32, K37, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, \ - K33, K34, KC_NO, KC_NO, K35, K36 \ -) - -#include "manna-harbour_miryoku.c" diff --git a/layouts/community/ortho_4x12/manna-harbour_miryoku/config.h b/layouts/community/ortho_4x12/manna-harbour_miryoku/config.h new file mode 100644 index 000000000000..772b510ef6f1 --- /dev/null +++ b/layouts/community/ortho_4x12/manna-harbour_miryoku/config.h @@ -0,0 +1,31 @@ +// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- + +#pragma once + +#if defined MIRYOKU_MAPPING_SPLIT +#define LAYOUT_miryoku(\ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ortho_4x12(\ +KC_NO, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, KC_NO,\ +K00, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K09,\ +K10, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K19,\ +K20, KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO, K29\ +) +#else +#define LAYOUT_miryoku(\ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ortho_4x12(\ +K00, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29,\ +KC_NO, KC_NO, K32, K33, K34, K34, K35, K35, K36, K37, KC_NO, KC_NO\ +) +#endif diff --git a/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c b/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c index 07bc15c2af41..a852ddd05cd4 100644 --- a/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c +++ b/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c @@ -1,16 +1 @@ // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -#define LAYOUT_miryoku(\ -K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ -K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ -K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ -N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ -)\ -LAYOUT_ortho_4x12(\ -KC_NO, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, KC_NO,\ -K00, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K09,\ -K10, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K19,\ -K20, KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO, K29\ -) - -#include "manna-harbour_miryoku.c" diff --git a/users/manna-harbour_miryoku/config.h b/users/manna-harbour_miryoku/config.h index 5ac3208c90cb..db16088158ff 100644 --- a/users/manna-harbour_miryoku/config.h +++ b/users/manna-harbour_miryoku/config.h @@ -2,6 +2,9 @@ #pragma once +// default but important +#define TAPPING_TERM 200 + // Prevent normal rollover on alphas from accidentally triggering mods. #define IGNORE_MOD_TAP_INTERRUPT @@ -10,3 +13,15 @@ // Recommended for heavy chording. #define QMK_KEYS_PER_SCAN 4 + +// Mouse key speed and acceleration. +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 16 +#undef MOUSEKEY_WHEEL_DELAY +#define MOUSEKEY_WHEEL_DELAY 0 +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 6 +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 64 diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.c b/users/manna-harbour_miryoku/manna-harbour_miryoku.c index 8ae38c25c8f8..9bc0f17e6330 100644 --- a/users/manna-harbour_miryoku/manna-harbour_miryoku.c +++ b/users/manna-harbour_miryoku/manna-harbour_miryoku.c @@ -1,28 +1,51 @@ // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- -#include QMK_KEYBOARD_H - -#define KC_NP KC_NO // key is not present -#define KC_NA KC_NO // present but not available for use -#define KC_NU KC_NO // available but not used - -// non-KC_ keycodes -#define KC_RST RESET -#define KC_TOG RGB_TOG -#define KC_MOD RGB_MOD -#define KC_HUI RGB_HUI -#define KC_SAI RGB_SAI -#define KC_VAI RGB_VAI - -enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; +#include "manna-harbour_miryoku.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +#if defined MIRYOKU_ALPHAS_QWERTY + [BASE] = LAYOUT_miryoku( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, LSFT_T(KC_J), LCTL_T(KC_K), LALT_T(KC_L), LGUI_T(KC_QUOT), + KC_Z, ALGR_T(KC_X), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), +#elif defined MIRYOKU_ALPHAS_DVORAK + [BASE] = LAYOUT_miryoku( + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, + LGUI_T(KC_A), LALT_T(KC_O), LCTL_T(KC_E), LSFT_T(KC_U), KC_I, KC_D, LSFT_T(KC_H), LCTL_T(KC_T), LALT_T(KC_N), LGUI_T(KC_S), + KC_SLSH, ALGR_T(KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, ALGR_T(KC_V), KC_Z, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), +#elif defined MIRYOKU_ALPHAS_COLEMAK + [BASE] = LAYOUT_miryoku( + KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_D, KC_H, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), + KC_Z, ALGR_T(KC_X), KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), +#elif defined MIRYOKU_ALPHAS_COLEMAKDH + [BASE] = LAYOUT_miryoku( + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_K, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), + KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), +#elif defined MIRYOKU_ALPHAS_WORKMAN + [BASE] = LAYOUT_miryoku( + KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_H), LSFT_T(KC_T), KC_G, KC_Y, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_O), LGUI_T(KC_I), + KC_Z, ALGR_T(KC_X), KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), +#else [BASE] = LAYOUT_miryoku( KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP ), +#endif [NAVR] = LAYOUT_miryoku( KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_AGIN, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, @@ -33,7 +56,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_NU, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, - KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_BTN3, KC_BTN1, KC_BTN2, KC_NP, KC_NP + KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_BTN1, KC_BTN3, KC_BTN2, KC_NP, KC_NP + ), + [MBO] = LAYOUT_miryoku( + 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_NP, KC_NP, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN3, KC_BTN2, KC_NP, KC_NP ), [MEDR] = LAYOUT_miryoku( KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_TOG, KC_MOD, KC_HUI, KC_SAI, KC_VAI, diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.h b/users/manna-harbour_miryoku/manna-harbour_miryoku.h new file mode 100644 index 000000000000..5f543cb0f6ce --- /dev/null +++ b/users/manna-harbour_miryoku/manna-harbour_miryoku.h @@ -0,0 +1,19 @@ +// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- + +#pragma once + +#include QMK_KEYBOARD_H + +#define KC_NP KC_NO // key is not present +#define KC_NA KC_NO // present but not available for use +#define KC_NU KC_NO // available but not used + +// non-KC_ keycodes +#define KC_RST RESET +#define KC_TOG RGB_TOG +#define KC_MOD RGB_MOD +#define KC_HUI RGB_HUI +#define KC_SAI RGB_SAI +#define KC_VAI RGB_VAI + +enum layers { BASE, MBO, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; diff --git a/users/manna-harbour_miryoku/miryoku.org b/users/manna-harbour_miryoku/miryoku.org index 692321d01ebc..011e43455a29 100644 --- a/users/manna-harbour_miryoku/miryoku.org +++ b/users/manna-harbour_miryoku/miryoku.org @@ -1,68 +1,75 @@ -#+Title: miryoku.org +# After making changes to code or tables call org-babel-tangle (C-c C-v t). + +#+Title: Miryoku [[https://raw.githubusercontent.com/manna-harbour/miryoku/master/miryoku-roa-32.png]] [[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-keycodes.png]] -The miryoku layout is an ergonomic, minimal, orthogonal layout for ergo or ortho -keyboards, implemented as part of the QMK firmware. The layout is maintained in -emacs org-mode tables and converted to QMK keymap data structures using embedded -python scripts. The layout is mapped onto keyboards with different physical -layouts as a subset without code duplication using the QMK userspace feature and -C macros. Versions of the layout can also be seen outside of the QMK source at -[[https://github.com/manna-harbour/miryoku/]]. +Miryoku is an ergonomic, minimal, orthogonal layout for ergo or ortho keyboards, +implemented as part of the QMK firmware. -After making changes here call org-babel-tangle (C-c C-v t). +The layout is maintained in emacs org-mode tables and converted to QMK keymap +data structures using embedded python scripts. It is mapped onto keyboards with +different physical layouts as a subset without code duplication using the QMK +userspace feature and C macros. -* Contents +Please see the [[https://github.com/manna-harbour/qmk_firmware/blob/miryoku/users/manna-harbour_miryoku/miryoku.org][development branch]] for any [[https://github.com/qmk/qmk_firmware/compare/master...manna-harbour:miryoku][updates not yet merged into QMK]]. +Additional visualisations are provided outside QMK in the [[https://github.com/manna-harbour/miryoku/blob/master/README.org][Miryoku (Extras) repository]]. +* Contents :TOC: - [[#layout][Layout]] + - [[#general-principles][General Principles]] + - [[#details][Details]] + - [[#layers][Layers]] - [[#code-generation][Code Generation]] + - [[#table-conversion-scripts][Table Conversion Scripts]] + - [[#data][Data]] - [[#subset-mapping][Subset Mapping]] -- [[#related-documentation][Related Documentation]] - + - [[#userspace][Userspace]] + - [[#layouts][Layouts]] + - [[#keyboards][Keyboards]] +- [[#documentation][Documentation]] + - [[#qmk][QMK]] + - [[#org-mode][Org Mode]] +- [[#contact][Contact]] * Layout -:PROPERTIES: -:CUSTOM_ID: layout -:END: - -** Info - -*** General Principles - - - Use layers instead of reaching. - - Use both hands instead of contortions. - - Use the home positions as much as possible. - - Make full use of the thumbs. - - Avoid unnecessary complication. - - -*** Specifics - - - 5 columns, 3 rows, 3 thumb keys, 2 hands. - - Can be used on almost any split or non-split ergo or ortho keyboard. - - Includes all keys found on a US layout TKL keyboard, plus media keys and - mouse emulation. - - Home row is the middle row, home thumb key is the middle thumb key. - - Maximum 1-u movement from home position for fingers and thumbs, and only - along one axis (except for the inner index finger column which is - deprioritised compared with the home columns). - - Dual-function modifiers on home row, mirrored on both hands. - - Dual-function layer change on thumbs. - - Layers are designed orthogonally with a single purpose per hand and are - accessed by holding a thumb key on the opposite hand. - - All layers on the same hand are based on the same basic key arrangement. - - Holding layer change and modifiers on one hand combined with a single key - press on the other hand can produce any combination of modifiers and - single keys without any finger contortions. - - Single function mods are also defined on layers on the same hand as the - layer change thumb key so layer change and mods can be held in any order - or simultaneously without race conditions. - - As mods are only enabled on the opposite hand, auto-repeat is available on - the home row on layers for use with cursor and mouse keys. - - Tap-hold auto-repeat is disabled to permit faster tap-hold switching on - thumbs, but thumb tap keys are mirrored onto some layers for use with - auto-repeat. On other layers thumb keys are redefined with important - functions for that layer. + +** General Principles + +- Use layers instead of reaching. +- Use both hands instead of contortions. +- Use the home positions as much as possible. +- Make full use of the thumbs. +- Avoid unnecessary complication. + + +** Details + +- 5 columns, 3 rows, 3 thumb keys, 2 hands. +- Can be used on almost any split or non-split ergo or ortho keyboard. +- Includes all keys found on a US layout TKL keyboard, plus media keys and mouse + emulation. +- Home row is the middle row, home thumb key is the middle thumb key. +- Maximum 1-u movement from home position for fingers and thumbs, and only along + one axis (except for the inner index finger column which is deprioritised + compared with the home columns). +- Dual-function modifiers on home row, mirrored on both hands. +- Dual-function layer change on thumbs. +- Layers are designed orthogonally with a single purpose per hand and are + accessed by holding a thumb key on the opposite hand. +- All layers on the same hand are based on the same basic key arrangement. +- Holding layer change and modifiers on one hand combined with a single key + press on the other hand can produce any combination of modifiers and single + keys without any finger contortions. +- Single function mods are also defined on layers on the same hand as the layer + change thumb key so layer change and mods can be held in any order or + simultaneously without race conditions. +- As mods are only enabled on the opposite hand, auto-repeat is available on the + home row on layers for use with cursor and mouse keys. +- Tap-hold auto-repeat is disabled to permit faster tap-hold switching on + thumbs, but thumb tap keys are mirrored onto some layers for use with + auto-repeat. On other layers thumb keys are redefined with important + functions for that layer. ** Layers @@ -86,16 +93,21 @@ into the corresponding tap-hold keycodes for mods and layer change. RST and mods will be available on sub layers on the same hand as the layer change thumb key. Unknown names are considered to be layer names. -Base layer alphas are Colemak DHm. Thumb keys are backspace, enter, delete on +Base layer alphas are Colemak-DHm. Thumb keys are backspace, enter, delete on the right and space, tab, escape on the left. Dot, comma and apostrophe are included for prose, dot and slash for file and directory names. -#+NAME: tap +**** Tap + +#+NAME: colemakdhm | Q | W | F | P | B | J | L | U | Y | ' | | A | R | S | T | G | M | N | E | I | O | | Z | X | C | D | V | K | H | , | . | / | | NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + +**** Hold + #+NAME: hold | RST | | | | | | | | | RST | | LGUI | LALT | LCTL | LSFT | | | LSFT | LCTL | LALT | LGUI | @@ -103,6 +115,52 @@ included for prose, dot and slash for file and directory names. | NP | NP | MEDR | NAVR | MOUR | NSSL | NSL | FUNL | NP | NP | +**** Alternative Base Layer Alphas + +Alternative base layer alphas are provided. To select, append +e.g. ~MIRYOKU_ALPHAS=QWERTY~ to the make command line when building. + +***** QWERTY (QWERTY) +#+NAME: qwerty +| Q | W | E | R | T | Y | U | I | O | P | +| A | S | D | F | G | H | J | K | L | ' | +| Z | X | C | V | B | N | M | , | . | / | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + + +***** Dvorak (DVORAK) +#+NAME: dvorak +| ' | , | . | P | Y | F | G | C | R | L | +| A | O | E | U | I | D | H | T | N | S | +| / | Q | J | K | X | B | M | W | V | Z | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + + +***** Colemak (COLEMAK) +#+NAME: colemak +| Q | W | F | P | G | J | L | U | Y | ' | +| A | R | S | T | D | H | N | E | I | O | +| Z | X | C | V | B | K | M | , | . | / | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + + +***** Colemak Mod-DH (COLEMAKDH) +#+NAME: colemakdh +| Q | W | F | P | B | J | L | U | Y | ' | +| A | R | S | T | G | K | N | E | I | O | +| Z | X | C | D | V | M | H | , | . | / | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + + +***** Workman (WORKMAN) +#+NAME: workman +| Q | D | R | W | B | J | F | U | P | ' | +| A | S | H | T | G | Y | N | E | O | I | +| Z | X | M | C | V | K | L | , | . | / | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + + + *** Navigation (NAVR) Primary right-hand layer (left home thumb) is navigation and editing. Cursor @@ -120,15 +178,27 @@ layer to avoid having to layer change mid edit and to enable auto-repeat. *** Mouse (MOUR) Secondary RH layer is mouse emulation. Mouse movement mirrors cursor navigation -on home and wheel mirrors line / page movement below. Buttons are on the -thumbs. Mouse movement, click, and drag with modifiers can be performed from +on home and wheel mirrors line / page movement below. Buttons are on the thumbs +(L, M, R). Mouse movement, click, and drag with modifiers can be performed from the home position. Unused keys are available for other related functions. #+NAME: mour | | | | | | | | MS_L | MS_D | MS_U | MS_R | | | WH_L | WH_D | WH_U | WH_R | -| BTN3 | BTN1 | BTN2 | NP | NP | +| BTN1 | BTN3 | BTN2 | NP | NP | + + +**** Mouse Buttons Overlay (MBO) + +Available for automatic activation depending on keyboard hardware and +configuration. Not activated manually. + +#+NAME: mbo +| | | | | | | | | | | +| | | | | | | | | | | +| | | | | | | | | | | +| NP | NP | | | | BTN1 | BTN3 | BTN2 | NP | NP | *** Media (MEDR) @@ -211,9 +281,6 @@ Duplicate base layer tap keys on thumbs rather than trans to enable auto-repeat. * Code Generation -:PROPERTIES: -:CUSTOM_ID: code-generation -:END: ** Table Conversion Scripts @@ -222,14 +289,14 @@ Duplicate base layer tap keys on thumbs rather than trans to enable auto-repeat. Produce base layer from separate tap and hold tables. #+NAME: table-layout-taphold -#+BEGIN_SRC python :var tap_table=tap :var hold_table=hold :var symbol_names_table=symbol-names :var mods_list=mods :tangle no :results verbatim +#+BEGIN_SRC python :var layer_name="BASE" :var tap_table=colemakdhm :var hold_table=hold :var symbol_names_table=symbol-names :var mods_list=mods :tangle no :results verbatim width = 19 mods_dict = dict.fromkeys(mods_list) symbol_names_dict = {} for symbol, name, shifted_symbol, shifted_name in symbol_names_table: symbol_names_dict[symbol] = name symbol_names_dict[shifted_symbol] = shifted_name -results = ' [BASE] = LAYOUT_miryoku(\n' +results = ' [' + layer_name + '] = LAYOUT_miryoku(\n' for tap_row, hold_row in map(None, tap_table, hold_table): results += ' ' for tap, hold in map(None, tap_row, hold_row): @@ -254,7 +321,7 @@ return results : [BASE] = LAYOUT_miryoku( : KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, : LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), -: KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, +: KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, : KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP : ) @@ -314,6 +381,43 @@ return results : ) +*** table-layout-full + +Produce full layer from single table. Fill for unused keys is configurable. + +#+NAME: table-layout-full +#+BEGIN_SRC python :var table=mbo :var layer_name="MBO" :var fill="TRNS" :var symbol_names_table=symbol-names :tangle no :results verbatim +width = 9 +symbol_names_dict = {} +for symbol, name, shifted_symbol, shifted_name in symbol_names_table: + symbol_names_dict[symbol] = name + symbol_names_dict[shifted_symbol] = shifted_name +results = ' [' + layer_name + '] = LAYOUT_miryoku(\n' +for row in table: + results += ' ' + for key in row: + if key == '': + code = fill + elif key in symbol_names_dict: + code = symbol_names_dict[key] + else: + code = key + code = 'KC_' + str(code) + results += (code + ', ').ljust(width) + results = results.rstrip(' ') + '\n' +results = results.rstrip('\n, ') + '\n )' +return results +#+END_SRC + +#+RESULTS: table-layout-full +: [MBO] = LAYOUT_miryoku( +: 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_TRNS, KC_TRNS, +: KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +: KC_NP, KC_NP, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN3, KC_BTN2, KC_NP, KC_NP +: ) + + *** table-enums Produce layer enums from layer names in hold table. @@ -321,7 +425,7 @@ Produce layer enums from layer names in hold table. #+NAME: table-enums #+BEGIN_SRC python :var hold_table=hold :var mods_list=mods :tangle no mods_dict = dict.fromkeys(mods_list) -results = 'enum layers { BASE, ' +results = 'enum layers { BASE, MBO, ' for hold_row in hold_table: for hold in hold_row: if hold not in mods_dict and hold != '' and hold != 'NP' and hold != 'RST': @@ -331,7 +435,7 @@ return results #+END_SRC #+RESULTS: table-enums -: enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; +: enum layers { BASE, MBO, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; ** Data @@ -376,8 +480,6 @@ Modifiers usable in hold table. Need to have the same name for KC_ and _T versi - ALGR -** Other - *** header Header for tangled src files. @@ -389,25 +491,27 @@ generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t * Subset Mapping -:PROPERTIES: -:CUSTOM_ID: subset-mapping -:END: + +The keymap, build options, and configuration are shared between keyboards. The +layout is mapped onto keyboards with different physical layouts as a subset. ** Userspace -The keymap and configuration are shared between keyboards. The keymap is -defined for LAYOUT_miryoku which is 10x4, with the outer 2 positions on the -bottom row unused and the rest of the bottom row are the thumb keys. +The keymap is defined for LAYOUT_miryoku which is 10x4, with the outer 2 +positions on the bottom row unused and the rest of the bottom row being the +thumb keys. +*** manna-harbour_miryoku.h -*** manna-harbour_miryoku.c +Keymap-related definitions. Included from manna-harbour_miryoku.c. Can be +included from keymap or layout keymap.c if needed. -Contains the keymap. Included from keymap.c - -[[./manna-harbour_miryoku.c][users/manna-harbour_miryoku/manna-harbour_miryoku.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle manna-harbour_miryoku.c +[[./manna-harbour_miryoku.h][users/manna-harbour_miryoku/manna-harbour_miryoku.h]] +#+BEGIN_SRC C :noweb yes :padline no :tangle manna-harbour_miryoku.h // <
> +#pragma once + #include QMK_KEYBOARD_H #define KC_NP KC_NO // key is not present @@ -423,11 +527,36 @@ Contains the keymap. Included from keymap.c #define KC_VAI RGB_VAI <> +#+END_SRC + + +*** manna-harbour_miryoku.c + +Contains the keymap. Added from rules.mk. + +[[./manna-harbour_miryoku.c][users/manna-harbour_miryoku/manna-harbour_miryoku.c]] +#+BEGIN_SRC C :noweb yes :padline no :tangle manna-harbour_miryoku.c +// <
> + +#include "manna-harbour_miryoku.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -<>, +#if defined MIRYOKU_ALPHAS_QWERTY +<>, +#elif defined MIRYOKU_ALPHAS_DVORAK +<>, +#elif defined MIRYOKU_ALPHAS_COLEMAK +<>, +#elif defined MIRYOKU_ALPHAS_COLEMAKDH +<>, +#elif defined MIRYOKU_ALPHAS_WORKMAN +<>, +#else +<>, +#endif <>, <>, +<>, <>, <>, <>, @@ -446,6 +575,9 @@ Config options. Automatically included. #pragma once +// default but important +#define TAPPING_TERM 200 + // Prevent normal rollover on alphas from accidentally triggering mods. #define IGNORE_MOD_TAP_INTERRUPT @@ -455,6 +587,18 @@ Config options. Automatically included. // Recommended for heavy chording. #define QMK_KEYS_PER_SCAN 4 +// Mouse key speed and acceleration. +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 16 +#undef MOUSEKEY_WHEEL_DELAY +#define MOUSEKEY_WHEEL_DELAY 0 +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 6 +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 64 + #+END_SRC @@ -466,10 +610,20 @@ Build options. Automatically included. #+BEGIN_SRC makefile :noweb yes :padline no :tangle rules.mk # <
> -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -EXTRAFLAGS += -flto # Link Time Optimization to reduce code size, 31358->28034/28672 +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +SRC += manna-harbour_miryoku.c # keymap + +# select alternative base layer alphas +ifneq ($(strip $(MIRYOKU_ALPHAS)),) + OPT_DEFS += -DMIRYOKU_ALPHAS_$(MIRYOKU_ALPHAS) +endif + +# select alternative subset mappings +ifneq ($(strip $(MIRYOKU_MAPPING)),) + OPT_DEFS += -DMIRYOKU_MAPPING_$(MIRYOKU_MAPPING) +endif #+END_SRC @@ -477,7 +631,9 @@ EXTRAFLAGS += -flto # Link Time Optimization to reduce code size, 31358->28 To use the keymap on a keyboard supporting the layouts feature, LAYOUT_miryoku is defined as a macro mapping onto the layout's own LAYOUT macro, leaving the -unused keys as KC_NO. The userspace keymap is then included. +unused keys as KC_NO. + +The following are example layouts. *** ergodox @@ -486,10 +642,26 @@ secondary thumb keys are the inner and outer 2u thumb keys and the tertiary thumb key is the innermost key of the partial bottom row. The remaining keys are unused. -[[../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c][layouts/community/ergodox/manna-harbour_miryoku/keymap.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-mapping-ergodox.png]] + +To build for any keyboard using the this layout (ergodone, ergodox_ez, +ergodox_infinity, hotdox) e.g. the ergodox_ez, + +#+BEGIN_SRC sh :tangle no +make ergodox_ez:manna-harbour_miryoku:flash +#+END_SRC + + +**** config.h + +Contains subset mapping. + +[[../../layouts/community/ergodox/manna-harbour_miryoku/config.h][layouts/community/ergodox/manna-harbour_miryoku/config.h]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ergodox/manna-harbour_miryoku/config.h // <
> +#pragma once + #define LAYOUT_miryoku(\ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ @@ -506,32 +678,62 @@ KC_NO, KC_NO, KC_NO, KC_NO, K32, K37, KC_NO, KC_ KC_NO, KC_NO, \ K33, K34, KC_NO, KC_NO, K35, K36 \ ) +#+END_SRC + + +**** keymap.c -#include "manna-harbour_miryoku.c" +Required by the build system. +[[../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c][layouts/community/ergodox/manna-harbour_miryoku/keymap.c]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c +// <
> #+END_SRC -To build for any keyboard using the this layout (ergodone, ergodox_ez, -ergodox_infinity, hotdox) e.g. the ergodox_ez, + +*** ortho_4x12 + +For the ortho_4x12 layout, the middle two columns, and the 2 keys on each end of +the bottom row are unused. This allows the hands to be positioned without ulnar +deviation of the wrists. + +In the implementation, the 2 unused middle columns bottom row keys are mapped as +duplicates of their adjacent keys to support alternative bottom row physical +layouts including 1x2uC (MIT), 1x2uR, 1x2uL, and 2x2u. + +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-mapping-ortho_4x12.png]] + +For split keyboards using this layout the halves can be positioned and rotated +for each hand and so an alternative mapping is provided. The right half is as +follows: The rightmost column bottom 3 keys is the pinkie column. The middle 4 +columns top 3 rows are for the remaining fingers. The pinkie column is one row +lower than the other columns to provide some column stagger. The bottom row +left 3 keys are the thumb keys. The remaining keys are unused. To select this +mapping, append ~MIRYOKU_MAPPING=SPLIT~ to the make command line when building. + +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-mapping-ortho_4x12-split.png]] + +To build for any keyboard using this layout (4x4, nori, chimera_ls, contra, +divergetm2, jj40, lets_split, lets_split_eh, meira, niu_mini, planck, telophase, +vitamins_included, zinc, zlant, ortho48, kbd4x, levinson, wavelet, plaid): #+BEGIN_SRC sh :tangle no -cd ../.. && make ergodox_ez:manna-harbour_miryoku:teensy +make planck/rev6:manna-harbour_miryoku:flash # planck +make keebio/levinson:manna-harbour_miryoku:flash MIRYOKU_MAPPING=SPLIT # levinson #+END_SRC +**** config.h -*** ortho_4x12 - -For the ortho_4x12 layout, the right half as is as follows: The rightmost column -bottom 3 rows is the pinkie column. The middle 4 columns top 3 rows are for the -remaining fingers. The pinkie column is one row lower than the other columns to -provide some column stagger on ortho keyboards. The bottom row left 3 columns -are the thumb keys. The remaining keys are unused. +Contains subset mapping. -[[../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c][layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c +[[../../layouts/community/ortho_4x12/manna-harbour_miryoku/config.h][layouts/community/ortho_4x12/manna-harbour_miryoku/config.h]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ortho_4x12/manna-harbour_miryoku/config.h // <
> +#pragma once + +#if defined MIRYOKU_MAPPING_SPLIT #define LAYOUT_miryoku(\ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ @@ -544,18 +746,30 @@ K00, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K09 K10, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K19,\ K20, KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO, K29\ ) +#else +#define LAYOUT_miryoku(\ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ortho_4x12(\ +K00, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29,\ +KC_NO, KC_NO, K32, K33, K34, K34, K35, K35, K36, K37, KC_NO, KC_NO\ +) +#endif +#+END_SRC -#include "manna-harbour_miryoku.c" -#+END_SRC +**** keymap.c -To build for any keyboard using this layout (4x4, nori, chimera_ls, contra, -divergetm2, jj40, lets_split, lets_split_eh, meira, niu_mini, planck, telophase, -vitamins_included, zinc, zlant, ortho48, kbd4x, levinson, wavelet, plaid) -e.g. the levinson, +Required by the build system. -#+BEGIN_SRC sh :tangle no -make keebio/levinson:manna-harbour_miryoku:avrdude +[[../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c][layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c +// <
> #+END_SRC @@ -563,18 +777,30 @@ make keebio/levinson:manna-harbour_miryoku:avrdude To use the keymap on a keyboard which does not support the layouts feature, LAYOUT_miryoku is defined as a macro mapping onto the keyboard's own LAYOUT -macro, leaving the unused keys as KC_NO. The userspace keymap is then included. +macro, leaving the unused keys as KC_NO. + +The following are example keyboards. *** crkbd The outer columns are unused. -**** keymap.c +To build for this keyboard, -[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c][keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c +#+BEGIN_SRC sh :tangle no +make crkbd:manna-harbour_miryoku:flash +#+END_SRC + +**** config.h + +Contains subset mapping. + +[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h][keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h // <
> +#pragma once + #define LAYOUT_miryoku( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ @@ -587,114 +813,33 @@ KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_ KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, \ K32, K33, K34, K35, K36, K37 \ ) - -#include "manna-harbour_miryoku.c" - - -#ifdef SSD1306OLED - -#include "ssd1306.h" - -void matrix_init_user(void) { - iota_gfx_init(!has_usb()); // turns on the display -} - -// When add source files to SRC in rules.mk, you can use functions. -const char *read_logo(void); - -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (host_keyboard_leds() & (1<display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} - -#endif //SSD1306OLED - #+END_SRC -**** config.h - -[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h][keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h -// <
> - -#pragma once - -#define EE_HANDS - -#ifdef RGB_MATRIX_ENABLE -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. -#define RGB_MATRIX_HUE_STEP 8 -#define RGB_MATRIX_SAT_STEP 8 -#define RGB_MATRIX_VAL_STEP 8 -#define RGB_MATRIX_SPD_STEP 10 -#endif - -#define SSD1306OLED // old oled driver - -#+END_SRC - - -**** rules.mk - -[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk][keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk -# <
> - -RGB_MATRIX_ENABLE = WS2812 - -# old oled driver -SRC += ./lib/glcdfont.c \ - ./lib/logo_reader.c - -#+END_SRC - +**** keymap.c -To build for this keyboard, +Required by the build system. -#+BEGIN_SRC sh :tangle no -cd ../.. && make crkbd:manna-harbour_miryoku:flash +[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c][keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c +// <
> #+END_SRC -* Related Documentation -:PROPERTIES: -:CUSTOM_ID: related-documentation -:END: - +* Documentation ** QMK - https://qmk.fm/ - https://docs.qmk.fm/#/getting_started_introduction -- https://docs.qmk.fm/#/hardware_keyboard_guidelines - https://docs.qmk.fm/#/config_options - https://docs.qmk.fm/#/keycodes - https://docs.qmk.fm/#/feature_advanced_keycodes +- https://docs.qmk.fm/#/feature_layers +- https://docs.qmk.fm/#/mod_tap - https://docs.qmk.fm/#/feature_layouts - https://docs.qmk.fm/#/feature_userspace +- https://docs.qmk.fm/#/feature_mouse_keys - https://docs.qmk.fm/#/getting_started_make_guide @@ -703,3 +848,13 @@ cd ../.. && make crkbd:manna-harbour_miryoku:flash - https://orgmode.org/ - https://orgmode.org/manual/Tables.html - https://orgmode.org/manual/Working-with-Source-Code.html + + +* Contact + +For issues with this branch, or to request support for additional base layer +alphas, layouts, or keyboards, please [[https://github.com/manna-harbour/qmk_firmware/issues/new][open an issue]]. + +For more general discussion, please join a relevant [[https://www.reddit.com/user/manna_harbour/posts/?sort=new][recent thread]] or [[https://www.reddit.com/message/compose/?to=manna_harbour][send a PM]]. + +[[https://github.com/manna-harbour][https://raw.githubusercontent.com/manna-harbour/miryoku/master/manna-harbour-boa-32.png]] diff --git a/users/manna-harbour_miryoku/rules.mk b/users/manna-harbour_miryoku/rules.mk index a54616b47aaa..ca135af07aee 100644 --- a/users/manna-harbour_miryoku/rules.mk +++ b/users/manna-harbour_miryoku/rules.mk @@ -1,5 +1,16 @@ # generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -LTO_ENABLE = yes +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control + +SRC += manna-harbour_miryoku.c # keymap + +# select alternative base layer alphas +ifneq ($(strip $(MIRYOKU_ALPHAS)),) + OPT_DEFS += -DMIRYOKU_ALPHAS_$(MIRYOKU_ALPHAS) +endif + +# select alternative subset mappings +ifneq ($(strip $(MIRYOKU_MAPPING)),) + OPT_DEFS += -DMIRYOKU_MAPPING_$(MIRYOKU_MAPPING) +endif From d353fcb99cfe345cde29cb7dc94cceaab82c610b Mon Sep 17 00:00:00 2001 From: Rozakiin <6567067+Rozakiin@users.noreply.github.com> Date: Tue, 23 Jun 2020 07:08:36 +0100 Subject: [PATCH 15/26] Add VIA support to Noxary x268 (#9450) * Update USB descriptors * Update default keymap for readability * Update readme description * Update rules.mk build options, enable bootmagic and mousekey * Add commented modern led code * Add VIA keymap * Update default keymap readme.md layout image * Update keyboards/noxary/x268/rules.mk remove incorrect comment * Update keyboards/noxary/x268/x268.c remove commented setPinOutput(B1) * Update keyboards/noxary/x268/keymaps/default/readme.md Flip order of layout image and title * Update keyboards/noxary/x268/keymaps/via/readme.md Flip order of layout image and title * Update LED function to led_update_kb() --- keyboards/noxary/x268/config.h | 8 +- .../noxary/x268/keymaps/default/keymap.c | 142 +++++++++++------- .../noxary/x268/keymaps/default/readme.md | 2 + keyboards/noxary/x268/keymaps/via/keymap.c | 111 ++++++++++++++ keyboards/noxary/x268/keymaps/via/readme.md | 3 + keyboards/noxary/x268/keymaps/via/rules.mk | 5 + keyboards/noxary/x268/readme.md | 3 +- keyboards/noxary/x268/rules.mk | 10 +- keyboards/noxary/x268/x268.c | 39 ++--- 9 files changed, 226 insertions(+), 97 deletions(-) create mode 100644 keyboards/noxary/x268/keymaps/via/keymap.c create mode 100644 keyboards/noxary/x268/keymaps/via/readme.md create mode 100644 keyboards/noxary/x268/keymaps/via/rules.mk diff --git a/keyboards/noxary/x268/config.h b/keyboards/noxary/x268/config.h index 0604f6529b30..c342da505851 100644 --- a/keyboards/noxary/x268/config.h +++ b/keyboards/noxary/x268/config.h @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x4E58 -#define PRODUCT_ID 0x0044 -#define DEVICE_VER 0x00F2 +#define VENDOR_ID 0x4E58 //"NX" +#define PRODUCT_ID 0x010C //268 +#define DEVICE_VER 0x0078 //"x" #define MANUFACTURER Noxary #define PRODUCT x268 -#define DESCRIPTION QMK keyboard firmware for x268 +#define DESCRIPTION A fully customizable RGB 65% keyboard. /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/noxary/x268/keymaps/default/keymap.c b/keyboards/noxary/x268/keymaps/default/keymap.c index ae07f5213d7d..7f26a6c10ecd 100644 --- a/keyboards/noxary/x268/keymaps/default/keymap.c +++ b/keyboards/noxary/x268/keymaps/default/keymap.c @@ -1,83 +1,111 @@ +/* Copyright 2020 Rozakiin + * + * 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 . + */ #include QMK_KEYBOARD_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. -#define _BL 0 -#define _FL1 1 -#define _FL2 2 +enum layer_names { + _BL, + _FL1, + _FL2, + _FL3 +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* _BL: Base Layer(Default) - For ISO enter use ANSI enter - * ,----------------------------------------------------------------. - * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| Grv| - * |----------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Del| - * |----------------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent|PgUp| - * |----------------------------------------------------------------| - * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| - * |----------------------------------------------------------------| - * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow|Rght| - * `----------------------------------------------------------------' + /* Base Layer - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │Bsp│ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Ent │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Sft │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │Ctrl│Win │Alt │ Space │Alt │M(1)│Ctrl│ ← │ ↓ │ → │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ */ [_BL] = LAYOUT( KC_ESC, 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_BSLS, KC_BSPC, KC_GRV, 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_DEL, 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_NUHS, KC_ENT, KC_PGUP, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - /* _FL1: Function Layer 1 - For ISO enter use ANSI enter - * ,----------------------------------------------------------------. - * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |PScr| | - * |----------------------------------------------------------------| - * | | | | |RST| | | | | | | | | | Ins| - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | |Home| - * |----------------------------------------------------------------| - * | | | | | | | | | |Bl-|Bl+| |Mute|Vol+| End| - * |----------------------------------------------------------------| - * | | | | BL_Toggle | | | | |Vol-| | - * `----------------------------------------------------------------' + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Function Layer 1 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │Psc│ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │RST│ │ │ │ │ │ │ │ │ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Hme│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │Bl-│Bl+│ │ Mute │Vl+│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ BL_Toggle │ │ │ │ │Vl-│ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ */ [_FL1] = LAYOUT( KC_GRV, 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_PSCR, _______, RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, KC_VOLU, KC_END, - _______, _______, _______, BL_TOGG, _______, _______, _______, _______, KC_VOLD, _______), - /* _FL2: Function Layer 2 - For ISO enter use ANSI enter - * ,----------------------------------------------------------------. - * | | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | - * `----------------------------------------------------------------' + _______, _______, _______, BL_TOGG, _______, _______, _______, _______, KC_VOLD, _______ + ), + /* Function Layer 2 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ */ [_FL2] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - -}; - - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* Function Layer 3 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/keyboards/noxary/x268/keymaps/default/readme.md b/keyboards/noxary/x268/keymaps/default/readme.md index 5d5bd69592ca..3540b3905042 100644 --- a/keyboards/noxary/x268/keymaps/default/readme.md +++ b/keyboards/noxary/x268/keymaps/default/readme.md @@ -1 +1,3 @@ # The default keymap for x268 + +![x268 Layout Image](https://i.imgur.com/D9jQz6g.png) diff --git a/keyboards/noxary/x268/keymaps/via/keymap.c b/keyboards/noxary/x268/keymaps/via/keymap.c new file mode 100644 index 000000000000..7f26a6c10ecd --- /dev/null +++ b/keyboards/noxary/x268/keymaps/via/keymap.c @@ -0,0 +1,111 @@ +/* Copyright 2020 Rozakiin + * + * 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 . + */ +#include QMK_KEYBOARD_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_names { + _BL, + _FL1, + _FL2, + _FL3 +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base Layer - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │Bsp│ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Ent │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Sft │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │Ctrl│Win │Alt │ Space │Alt │M(1)│Ctrl│ ← │ ↓ │ → │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_BL] = LAYOUT( + KC_ESC, 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_BSLS, KC_BSPC, KC_GRV, + 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_DEL, + 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_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Function Layer 1 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │Psc│ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │RST│ │ │ │ │ │ │ │ │ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Hme│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │Bl-│Bl+│ │ Mute │Vl+│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ BL_Toggle │ │ │ │ │Vl-│ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL1] = LAYOUT( + KC_GRV, 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_PSCR, _______, + RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + _______, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, KC_VOLU, KC_END, + _______, _______, _______, BL_TOGG, _______, _______, _______, _______, KC_VOLD, _______ + ), + /* Function Layer 2 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* Function Layer 3 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/keyboards/noxary/x268/keymaps/via/readme.md b/keyboards/noxary/x268/keymaps/via/readme.md new file mode 100644 index 000000000000..e0e0b9f92d02 --- /dev/null +++ b/keyboards/noxary/x268/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The VIA keymap for x268 + +![x268 Layout Image](https://i.imgur.com/D9jQz6g.png) diff --git a/keyboards/noxary/x268/keymaps/via/rules.mk b/keyboards/noxary/x268/keymaps/via/rules.mk new file mode 100644 index 000000000000..c2e96d233b21 --- /dev/null +++ b/keyboards/noxary/x268/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +LTO_ENABLE = yes diff --git a/keyboards/noxary/x268/readme.md b/keyboards/noxary/x268/readme.md index c1c05c34d584..4dd1a7c78a61 100644 --- a/keyboards/noxary/x268/readme.md +++ b/keyboards/noxary/x268/readme.md @@ -2,11 +2,10 @@ ![x268](https://geekhack.org/index.php?action=dlattach;topic=96377.0;attach=198826;image) -A fully customizable 65% keyboard. +A fully customizable RGB 65% keyboard. * Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) * Hardware Supported: x268 PCB - * rev1 * Hardware Availability: * [Noxary - 268](https://geekhack.org/index.php?topic=92066.0) * [LZ - CLS ms](https://geekhack.org/index.php?topic=96377) diff --git a/keyboards/noxary/x268/rules.mk b/keyboards/noxary/x268/rules.mk index a8654dc912f4..c4b8c21177e2 100644 --- a/keyboards/noxary/x268/rules.mk +++ b/keyboards/noxary/x268/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # 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 = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/noxary/x268/x268.c b/keyboards/noxary/x268/x268.c index 3921270acc6f..589d59deff8b 100644 --- a/keyboards/noxary/x268/x268.c +++ b/keyboards/noxary/x268/x268.c @@ -1,4 +1,4 @@ -/* Copyright 2018 Rozakiin +/* Copyright 2020 Rozakiin * * 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 @@ -15,39 +15,20 @@ */ #include "x268.h" +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - + setPinOutput(B0); matrix_init_user(); } -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 0); PORTB |= (1 << 0); - } - else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, led_state.caps_lock); } + return true; } From a8bb5840ad3e093b82e5c08fd594ab35c554a876 Mon Sep 17 00:00:00 2001 From: Rozakiin <6567067+Rozakiin@users.noreply.github.com> Date: Tue, 23 Jun 2020 07:24:33 +0100 Subject: [PATCH 16/26] Update VIA support for Noxary 268.2 (#9451) * Update readme.md description * Enable bootmagic lite * Update USB descriptor * Add modern led code * Update default keymap for readability * Update default keymap readme with layout image * Add VIA keymap * Update keyboards/noxary/268_2/keymaps/default/readme.md Flip order of layout image and title * Update keyboards/noxary/268_2/keymaps/via/readme.md Flip order of layout image and title * Update keyboards/noxary/268_2/readme.md bullet point keyboard maintainer * Update keyboards/noxary/268_2/readme.md Change list style --- keyboards/noxary/268_2/268_2.c | 19 +-- keyboards/noxary/268_2/config.h | 34 +----- .../noxary/268_2/keymaps/default/keymap.c | 68 ++++++++++- .../noxary/268_2/keymaps/default/readme.md | 4 +- keyboards/noxary/268_2/keymaps/via/keymap.c | 110 ++++++++++++++++++ keyboards/noxary/268_2/keymaps/via/readme.md | 3 + keyboards/noxary/268_2/keymaps/via/rules.mk | 5 + keyboards/noxary/268_2/readme.md | 8 +- keyboards/noxary/268_2/rules.mk | 2 +- 9 files changed, 202 insertions(+), 51 deletions(-) create mode 100644 keyboards/noxary/268_2/keymaps/via/keymap.c create mode 100644 keyboards/noxary/268_2/keymaps/via/readme.md create mode 100644 keyboards/noxary/268_2/keymaps/via/rules.mk diff --git a/keyboards/noxary/268_2/268_2.c b/keyboards/noxary/268_2/268_2.c index 5af56a386d67..9a2b4432d3d8 100644 --- a/keyboards/noxary/268_2/268_2.c +++ b/keyboards/noxary/268_2/268_2.c @@ -15,13 +15,16 @@ */ #include "268_2.h" -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - setPinOutput(B0); - writePinHigh(B0); - } else { - setPinInput(B0); - } +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(B0); + matrix_init_user(); +} - led_set_user(usb_led); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, led_state.caps_lock); + } + return true; } diff --git a/keyboards/noxary/268_2/config.h b/keyboards/noxary/268_2/config.h index fbfb97f02bf6..1d6681595bbc 100644 --- a/keyboards/noxary/268_2/config.h +++ b/keyboards/noxary/268_2/config.h @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x4E58 -#define PRODUCT_ID 0x0044 +#define VENDOR_ID 0x4E58 //"NX" +#define PRODUCT_ID 0x010C //268 #define DEVICE_VER 0x0002 #define MANUFACTURER Noxary #define PRODUCT 268.2 -#define DESCRIPTION QMK keyboard firmware for 268.2 +#define DESCRIPTION A fully customizable 65% keyboard. /* key matrix size */ #define MATRIX_ROWS 5 @@ -57,34 +57,6 @@ along with this program. If not, see . //define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 -// #define RGB_DI_PIN E2 -// #ifdef RGB_DI_PIN -// #define RGBLED_NUM 16 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// /*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// /*== customize breathing effect ==*/ -// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ -// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 -// /*==== use exp() and sin() ====*/ -// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 -// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 -// #endif - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/noxary/268_2/keymaps/default/keymap.c b/keyboards/noxary/268_2/keymaps/default/keymap.c index 01d5613cac4e..90e392deb857 100644 --- a/keyboards/noxary/268_2/keymaps/default/keymap.c +++ b/keyboards/noxary/268_2/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 Rozakiin + * + * 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 . + */ #include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -6,7 +21,9 @@ // entirely and just use numbers. enum layer_names { _BL, - _FL + _FL1, + _FL2, + _FL3 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -28,10 +45,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_DEL, 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_PGUP, 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_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_LEFT, KC_DOWN, KC_RGHT ), - - /* Function Layer + /* Function Layer 1 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ PScr │ │ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ @@ -44,11 +60,51 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ │ BL Toggle │ │ │ │ │Vl-│ │ * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ */ - [_FL] = LAYOUT_65_ansi_blocker( + [_FL1] = LAYOUT_65_ansi_blocker( KC_GRV, 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_PSCR, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, KC_MUTE, KC_VOLU, KC_END, _______, _______, _______, BL_TOGG, _______, _______, _______, KC_VOLD, _______ - ) + ), + /* Function Layer 2 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_FL2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* Function Layer 3 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_FL3] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/noxary/268_2/keymaps/default/readme.md b/keyboards/noxary/268_2/keymaps/default/readme.md index c4c832cc645d..2dfcc984e742 100644 --- a/keyboards/noxary/268_2/keymaps/default/readme.md +++ b/keyboards/noxary/268_2/keymaps/default/readme.md @@ -1 +1,3 @@ -# The default keymap for 268_2 +# The default keymap for 268.2 + +![Noxary 268.2 Layout Image](https://i.imgur.com/oIQiqcy.png) diff --git a/keyboards/noxary/268_2/keymaps/via/keymap.c b/keyboards/noxary/268_2/keymaps/via/keymap.c new file mode 100644 index 000000000000..c4f044e4fe0b --- /dev/null +++ b/keyboards/noxary/268_2/keymaps/via/keymap.c @@ -0,0 +1,110 @@ +/* Copyright 2020 Rozakiin + * + * 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 . + */ +#include QMK_KEYBOARD_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_names { + _BL, + _FL1, + _FL2, + _FL3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bspc │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│Win │Alt │ Space │Alt │ Fn │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_BL] = LAYOUT_65_ansi_blocker( + KC_ESC, 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_GRV, + 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_DEL, + 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_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Function Layer 1 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ PScr │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │RST│ │ │ │ │ │ │ │ │ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │Hom│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │Bl-│Bl+│ Mute │Vl+│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ BL Toggle │ │ │ │ │Vl-│ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_FL1] = LAYOUT_65_ansi_blocker( + KC_GRV, 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_PSCR, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, KC_MUTE, KC_VOLU, KC_END, + _______, _______, _______, BL_TOGG, _______, _______, _______, KC_VOLD, _______ + ), + /* Function Layer 2 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_FL2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* Function Layer 3 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_FL3] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/noxary/268_2/keymaps/via/readme.md b/keyboards/noxary/268_2/keymaps/via/readme.md new file mode 100644 index 000000000000..0918bfb97c8d --- /dev/null +++ b/keyboards/noxary/268_2/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The VIA keymap for 268.2 + +![Noxary 268.2 Layout Image](https://i.imgur.com/oIQiqcy.png) diff --git a/keyboards/noxary/268_2/keymaps/via/rules.mk b/keyboards/noxary/268_2/keymaps/via/rules.mk new file mode 100644 index 000000000000..1974f5d3f591 --- /dev/null +++ b/keyboards/noxary/268_2/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/noxary/268_2/readme.md b/keyboards/noxary/268_2/readme.md index 075a1d26c7d7..5689594c0bcd 100644 --- a/keyboards/noxary/268_2/readme.md +++ b/keyboards/noxary/268_2/readme.md @@ -1,12 +1,12 @@ # Noxary 268.2 -![268.2](https://www.keebtalk.com/uploads/db8059/original/2X/6/65b93c83cadd98bbf8e3b1d739621d54b682609a.jpg) +![Noxary 268.2](https://www.keebtalk.com/uploads/db8059/original/2X/6/65b93c83cadd98bbf8e3b1d739621d54b682609a.jpg) A fully customizable 65% keyboard. -Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) -Hardware Supported: 268.2 PCB -Hardware Availability: [Noxary](https://shop.noxary.co/collections/268-2/products/noxary-268-2-polycarbonate) +* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) +* Hardware Supported: Noxary 268.2 PCB +* Hardware Availability: [Noxary](https://shop.noxary.co/collections/268-2/products/noxary-268-2-polycarbonate) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/noxary/268_2/rules.mk b/keyboards/noxary/268_2/rules.mk index 230ecc453810..168d3a2c120a 100644 --- a/keyboards/noxary/268_2/rules.mk +++ b/keyboards/noxary/268_2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug From 9ae8a451978dac09365a95f1e0173166fca3d096 Mon Sep 17 00:00:00 2001 From: shela Date: Tue, 23 Jun 2020 16:24:23 +0900 Subject: [PATCH 17/26] fixed the layer limit of LT() (#9492) --- docs/feature_layers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_layers.md b/docs/feature_layers.md index c6ffb24053b6..d3ee747e69f6 100644 --- a/docs/feature_layers.md +++ b/docs/feature_layers.md @@ -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. From b3b617633c0df8e38145d6efb8d64cc4760559ef Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Tue, 23 Jun 2020 16:42:01 +0900 Subject: [PATCH 18/26] [Docs] Japanese translation of docs/feature_layers.md (#9252) * add feature_layers.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/feature_advanced_keycodes.md | 57 +++------------- docs/ja/feature_layers.md | 99 ++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 48 deletions(-) create mode 100644 docs/ja/feature_layers.md diff --git a/docs/ja/feature_advanced_keycodes.md b/docs/ja/feature_advanced_keycodes.md index c6e21feb9463..502a67f80c43 100644 --- a/docs/ja/feature_advanced_keycodes.md +++ b/docs/ja/feature_advanced_keycodes.md @@ -1,53 +1,10 @@ -# レイヤーの切り替えとトグル :id=switching-and-toggling-layers +# 修飾キー :id=modifier-keys -これらの機能により、様々な方法でレイヤーをアクティブ化することができます。レイヤーは一般的に独立したレイアウトでは無いことに注意してください -- 複数のレイヤーを一度にアクティブ化することができ、レイヤーが `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) diff --git a/docs/ja/feature_layers.md b/docs/ja/feature_layers.md new file mode 100644 index 000000000000..b855172094b0 --- /dev/null +++ b/docs/ja/feature_layers.md @@ -0,0 +1,99 @@ +# レイヤー :id=layers + + + +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-16 に制限されている理由です)。モッドタップも同じですが、識別子に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がオンになっているかどうかを確認する時に誤った値が返されることがあります。 From 146873fd8e6f3ca08ba1c0a283f70cb2e72c0c83 Mon Sep 17 00:00:00 2001 From: Brandon Schlack Date: Tue, 23 Jun 2020 01:27:34 -0700 Subject: [PATCH 19/26] Add more community layout support to Discipline (#8540) --- keyboards/coseyfannitutti/discipline/discipline.h | 8 ++++++-- keyboards/coseyfannitutti/discipline/rules.mk | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/keyboards/coseyfannitutti/discipline/discipline.h b/keyboards/coseyfannitutti/discipline/discipline.h index 3369d7efb416..61ac086c8cdf 100644 --- a/keyboards/coseyfannitutti/discipline/discipline.h +++ b/keyboards/coseyfannitutti/discipline/discipline.h @@ -34,7 +34,7 @@ { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ } -#define LAYOUT_65_ansi_2_right_mods( \ +#define LAYOUT_65_ansi_blocker( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ @@ -48,6 +48,8 @@ { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, _x_, K4C, K4D, K4E} \ } +#define LAYOUT_65_ansi_2_right_mods LAYOUT_65_ansi_blocker + #define LAYOUT_wkl_ansi_2_right_mods( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ @@ -90,7 +92,7 @@ { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ } -#define LAYOUT_65_iso_2_right_mods( \ +#define LAYOUT_65_iso_blocker( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E, \ @@ -104,6 +106,8 @@ { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, _x_, K4C, K4D, K4E} \ } +#define LAYOUT_65_iso_2_right_mods LAYOUT_65_iso_blocker + #define LAYOUT_wkl_iso_2_right_mods( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ diff --git a/keyboards/coseyfannitutti/discipline/rules.mk b/keyboards/coseyfannitutti/discipline/rules.mk index 5cf0b039655d..f556cb1d4463 100644 --- a/keyboards/coseyfannitutti/discipline/rules.mk +++ b/keyboards/coseyfannitutti/discipline/rules.mk @@ -35,4 +35,4 @@ 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 -LAYOUTS = 65_ansi 65_iso +LAYOUTS = 65_ansi 65_ansi_blocker 65_iso 65_iso_blocker From b0e30862d6d9d0d748ee9861e5751d5e9a885bfb Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 23 Jun 2020 10:28:05 +0200 Subject: [PATCH 20/26] bm43a stevexyz keymap (#9468) Co-authored-by: Joel Challis Co-authored-by: steve --- keyboards/bm43a/keymaps/stevexyz/keymap.c | 40 ++++++++++++++++++++++ keyboards/bm43a/keymaps/stevexyz/readme.md | 25 ++++++++++++++ keyboards/bm43a/keymaps/stevexyz/rules.mk | 8 +++++ 3 files changed, 73 insertions(+) create mode 100644 keyboards/bm43a/keymaps/stevexyz/keymap.c create mode 100644 keyboards/bm43a/keymaps/stevexyz/readme.md create mode 100644 keyboards/bm43a/keymaps/stevexyz/rules.mk diff --git a/keyboards/bm43a/keymaps/stevexyz/keymap.c b/keyboards/bm43a/keymaps/stevexyz/keymap.c new file mode 100644 index 000000000000..04df426ba994 --- /dev/null +++ b/keyboards/bm43a/keymaps/stevexyz/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 Stefano Maragò + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 12+11+11+9 + [0] = LAYOUT( + MT(MOD_LGUI,KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_DOT, + KC_LCTL, TT(1), KC_LALT, KC_SPC, MT(MOD_RSFT,KC_SPC), TT(1), KC_LEFT, KC_DOWN, KC_RGHT ), + [1] = LAYOUT( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_LSFT, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_PGUP, KC_SLSH, + KC_LCTL, LT(2,KC_APP), KC_LALT, KC_SPC, MT(MOD_RSFT,KC_SPC), LT(2,KC_INS), KC_HOME, KC_PGDN, KC_END ), + [2] = LAYOUT( + DF(0), KC_PSCR, KC_SLCK, KC_PAUS, KC_PSLS, KC_PAST, KC_7, KC_8, KC_9, KC_PMNS, KC_PEQL, KC_BSPC, + KC_CAPS, KC_MPLY, KC_STOP, KC_MPRV, KC_MNXT, XXXXXXX, KC_4, KC_5, KC_6, KC_PPLS, KC_PENT, + DF(2), KC_MUTE, KC_VOLD, KC_VOLU, KC_COMM, KC_1, KC_2, KC_3, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, + DF(3), XXXXXXX, XXXXXXX, KC_SPC, KC_0, KC_DOT, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT ), + [3] = LAYOUT( + DF(0), KC_SLEP, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, BL_TOGG, BL_DEC, BL_INC, BL_STEP, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), +}; + diff --git a/keyboards/bm43a/keymaps/stevexyz/readme.md b/keyboards/bm43a/keymaps/stevexyz/readme.md new file mode 100644 index 000000000000..9e4da10d2ad4 --- /dev/null +++ b/keyboards/bm43a/keymaps/stevexyz/readme.md @@ -0,0 +1,25 @@ +This is a full-featured bm43a layout inspired by the smaller "Super Micro gherkin" and "jj28" sisters. + +In addition to the default key layer, there is a function/numbers/symbols layer easily activated with either one of the two "meta" (red) keys and containing almost all keyset missing. + +On top of this, activated with both meta keys, there a system layer where are placed media keys, mouse emulation, and Numpad in addition to the PrintScreen/ScrLock/Pause keys. + +The below picture show all layers on the actual keys (if someone would be able to print these labels let me know! :)). + +![layout](https://raw.githubusercontent.com/stevexyz/qmk_firmware/master/keyboards/bm43a/keymaps/stevexyz/layout.jpeg) + +Notes: +- The Windows/OS key is overlayed with the Esc one +- To activate permanently the function/number/symbols layer you can use the "layer tap toggle" functionality (now set to the default 5 presses). For the system layer to be activated permanently is enough to hit shift in this layer (so with the two meta keys pressed) +- From the System Layer you can "jump" to an additional Lights layer pressing the control key +- Meta-Esc (or simply Esc from the System and Lights layers) and the keyboard is coming back to default key layer in case they are activated permanently + + +And a view on the actual build: + +![layout](https://raw.githubusercontent.com/stevexyz/qmk_firmware/master/keyboards/bm43a/keymaps/stevexyz/actualbuild.jpeg) + +In order to compile the module from qmk root directory use the command 'make bm43a:stevexyz' + +And in order to upload the new firmware use the command: 'bin/qmk flash -kb bm43a -km stevexyz' (you can initiate programming with keyboard RESET key, that in this keymap has been moved on the backspace button in the "lights" layer) + diff --git a/keyboards/bm43a/keymaps/stevexyz/rules.mk b/keyboards/bm43a/keymaps/stevexyz/rules.mk new file mode 100644 index 000000000000..fa2ef5c2b28a --- /dev/null +++ b/keyboards/bm43a/keymaps/stevexyz/rules.mk @@ -0,0 +1,8 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug + +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow From a502ce43c3073325f7273e400f5524a3e8a61cdc Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Tue, 23 Jun 2020 16:32:45 +0800 Subject: [PATCH 21/26] create maja info json (#9472) --- keyboards/kbdfans/maja/info.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 keyboards/kbdfans/maja/info.json diff --git a/keyboards/kbdfans/maja/info.json b/keyboards/kbdfans/maja/info.json new file mode 100644 index 000000000000..94760fb2a6ec --- /dev/null +++ b/keyboards/kbdfans/maja/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "maja", + "url": "", + "maintainer": "KBDFANS", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "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}, {"x":15, "y":0}, {"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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":2.5, "y":4, "w":1.5}, {"label":"Alt", "x":4, "y":4, "w":2}, {"x":6, "y":4, "w":1.25}, {"label":"Alt", "x":7.25, "y":4, "w":2.75}, {"label":"Win", "x":10, "y":4, "w":1.5}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}, {"x":15, "y":4}] + } + } +} From aea2d6845a99973d7a1663382bcc7a0d0e6067e0 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 23 Jun 2020 18:40:00 +1000 Subject: [PATCH 22/26] Fix error_log complaint about Big Series boards (#9510) --- keyboards/bigseries/1key/info.json | 20 ++++++++++--------- keyboards/bigseries/1key/rules.mk | 32 +++++++++++++++++++++++++++++- keyboards/bigseries/2key/info.json | 21 +++++++++++--------- keyboards/bigseries/2key/rules.mk | 32 +++++++++++++++++++++++++++++- keyboards/bigseries/3key/info.json | 22 +++++++++++--------- keyboards/bigseries/3key/rules.mk | 32 +++++++++++++++++++++++++++++- keyboards/bigseries/4key/info.json | 24 +++++++++++++--------- keyboards/bigseries/4key/rules.mk | 32 +++++++++++++++++++++++++++++- keyboards/bigseries/rules.mk | 27 ------------------------- 9 files changed, 175 insertions(+), 67 deletions(-) delete mode 100755 keyboards/bigseries/rules.mk diff --git a/keyboards/bigseries/1key/info.json b/keyboards/bigseries/1key/info.json index ff2fd54c575f..a289e122d175 100644 --- a/keyboards/bigseries/1key/info.json +++ b/keyboards/bigseries/1key/info.json @@ -1,12 +1,14 @@ { - "keyboard_name": "Big Series 1-Key", - "url": "", - "maintainer": "qmk", - "width": 4, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0, "w":4, "h":4}] + "keyboard_name": "Big Series 1-Key", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "w": 4, "h": 4} + ] + } } - } } diff --git a/keyboards/bigseries/1key/rules.mk b/keyboards/bigseries/1key/rules.mk index 772d56beb6df..111ac42f9f8a 100755 --- a/keyboards/bigseries/1key/rules.mk +++ b/keyboards/bigseries/1key/rules.mk @@ -1 +1,31 @@ -# Dummy file to make the QMK build system happy \ No newline at end of file +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/bigseries/2key/info.json b/keyboards/bigseries/2key/info.json index 2aea4d200568..faa5ac8545f8 100644 --- a/keyboards/bigseries/2key/info.json +++ b/keyboards/bigseries/2key/info.json @@ -1,12 +1,15 @@ { - "keyboard_name": "Big Series 2-Key", - "url": "", - "maintainer": "qmk", - "width": 8, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0, "w":4, "h":4}, {"x":4, "y":0, "w":4, "h":4}] + "keyboard_name": "Big Series 2-Key", + "url": "", + "maintainer": "qmk", + "width": 8, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "w": 4, "h": 4}, + {"x": 4, "y": 0, "w": 4, "h": 4} + ] + } } - } } diff --git a/keyboards/bigseries/2key/rules.mk b/keyboards/bigseries/2key/rules.mk index 772d56beb6df..111ac42f9f8a 100755 --- a/keyboards/bigseries/2key/rules.mk +++ b/keyboards/bigseries/2key/rules.mk @@ -1 +1,31 @@ -# Dummy file to make the QMK build system happy \ No newline at end of file +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/bigseries/3key/info.json b/keyboards/bigseries/3key/info.json index 8f0b8c55c203..4e48ca47e66a 100644 --- a/keyboards/bigseries/3key/info.json +++ b/keyboards/bigseries/3key/info.json @@ -1,12 +1,16 @@ { - "keyboard_name": "Big Series 3-Key", - "url": "", - "maintainer": "qmk", - "width": 12, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0, "w":4, "h":4}, {"x":4, "y":0, "w":4, "h":4}, {"x":8, "y":0, "w":4, "h":4}] + "keyboard_name": "Big Series 3-Key", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "w": 4, "h": 4}, + {"x": 4, "y": 0, "w": 4, "h": 4}, + {"x": 8, "y": 0, "w": 4, "h": 4} + ] + } } - } } diff --git a/keyboards/bigseries/3key/rules.mk b/keyboards/bigseries/3key/rules.mk index 772d56beb6df..111ac42f9f8a 100755 --- a/keyboards/bigseries/3key/rules.mk +++ b/keyboards/bigseries/3key/rules.mk @@ -1 +1,31 @@ -# Dummy file to make the QMK build system happy \ No newline at end of file +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/bigseries/4key/info.json b/keyboards/bigseries/4key/info.json index 0bdee578a731..f31e4826a7dc 100644 --- a/keyboards/bigseries/4key/info.json +++ b/keyboards/bigseries/4key/info.json @@ -1,12 +1,18 @@ { - "keyboard_name": "Big Series 4-Key", - "url": "", - "maintainer": "qmk", - "width": 8, - "height": 8, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0, "w":4, "h":4}, {"x":4, "y":0, "w":4, "h":4}, {"x":0, "y":4, "w":4, "h":4}, {"x":4, "y":4, "w":4, "h":4}] + "keyboard_name": "Big Series 4-Key", + "url": "", + "maintainer": "qmk", + "width": 8, + "height": 8, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "w": 4, "h": 4}, + {"x": 4, "y": 0, "w": 4, "h": 4}, + + {"x": 0, "y": 4, "w": 4, "h": 4}, + {"x": 4, "y": 4, "w": 4, "h": 4} + ] + } } - } } diff --git a/keyboards/bigseries/4key/rules.mk b/keyboards/bigseries/4key/rules.mk index 772d56beb6df..111ac42f9f8a 100755 --- a/keyboards/bigseries/4key/rules.mk +++ b/keyboards/bigseries/4key/rules.mk @@ -1 +1,31 @@ -# Dummy file to make the QMK build system happy \ No newline at end of file +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/bigseries/rules.mk b/keyboards/bigseries/rules.mk deleted file mode 100755 index 2f52d9558623..000000000000 --- a/keyboards/bigseries/rules.mk +++ /dev/null @@ -1,27 +0,0 @@ -# MCU name -MCU = atmega32u2 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled -AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below -RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. - From 3028662fa3b86be55e13875e82ec81969fca03be Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 23 Jun 2020 05:05:44 -0400 Subject: [PATCH 23/26] [Keyboard] Add KBO-5000 keyboard (#9381) * Initial fork of Sinc * Setup keymaps, layouts, and encoders * Add ANSI configurator layout * Add ISO layout for configurator * Add all layout option for configurator * Fix spacing * Remove extra line * Remove unneeded ifdef --- keyboards/keebio/kbo5000/config.h | 21 ++ keyboards/keebio/kbo5000/info.json | 339 ++++++++++++++++++ keyboards/keebio/kbo5000/kbo5000.c | 1 + keyboards/keebio/kbo5000/kbo5000.h | 7 + .../keebio/kbo5000/keymaps/default/keymap.c | 58 +++ keyboards/keebio/kbo5000/keymaps/iso/keymap.c | 58 +++ keyboards/keebio/kbo5000/keymaps/via/config.h | 3 + keyboards/keebio/kbo5000/keymaps/via/keymap.c | 58 +++ keyboards/keebio/kbo5000/keymaps/via/rules.mk | 3 + keyboards/keebio/kbo5000/readme.md | 20 ++ keyboards/keebio/kbo5000/rev1/config.h | 65 ++++ keyboards/keebio/kbo5000/rev1/rev1.c | 32 ++ keyboards/keebio/kbo5000/rev1/rev1.h | 73 ++++ keyboards/keebio/kbo5000/rev1/rules.mk | 3 + keyboards/keebio/kbo5000/rules.mk | 34 ++ 15 files changed, 775 insertions(+) create mode 100644 keyboards/keebio/kbo5000/config.h create mode 100644 keyboards/keebio/kbo5000/info.json create mode 100644 keyboards/keebio/kbo5000/kbo5000.c create mode 100644 keyboards/keebio/kbo5000/kbo5000.h create mode 100644 keyboards/keebio/kbo5000/keymaps/default/keymap.c create mode 100644 keyboards/keebio/kbo5000/keymaps/iso/keymap.c create mode 100644 keyboards/keebio/kbo5000/keymaps/via/config.h create mode 100644 keyboards/keebio/kbo5000/keymaps/via/keymap.c create mode 100644 keyboards/keebio/kbo5000/keymaps/via/rules.mk create mode 100644 keyboards/keebio/kbo5000/readme.md create mode 100644 keyboards/keebio/kbo5000/rev1/config.h create mode 100644 keyboards/keebio/kbo5000/rev1/rev1.c create mode 100644 keyboards/keebio/kbo5000/rev1/rev1.h create mode 100644 keyboards/keebio/kbo5000/rev1/rules.mk create mode 100644 keyboards/keebio/kbo5000/rules.mk diff --git a/keyboards/keebio/kbo5000/config.h b/keyboards/keebio/kbo5000/config.h new file mode 100644 index 000000000000..cfb6bf4ffccd --- /dev/null +++ b/keyboards/keebio/kbo5000/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/keebio/kbo5000/info.json b/keyboards/keebio/kbo5000/info.json new file mode 100644 index 000000000000..222587c26b3f --- /dev/null +++ b/keyboards/keebio/kbo5000/info.json @@ -0,0 +1,339 @@ +{ + "keyboard_name": "KBO-5000", + "url": "https://keeb.io", + "maintainer": "nooges", + "width": 20.5, + "height": 6.25, + "layouts": { + "LAYOUT_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + + {"label":"F7", "x":10, "y":0}, + {"label":"F8", "x":11, "y":0}, + {"label":"F9", "x":12.5, "y":0}, + {"label":"F10", "x":13.5, "y":0}, + {"label":"F11", "x":14.5, "y":0}, + {"label":"F12", "x":15.5, "y":0}, + {"label":"Prt Sc", "x":17.5, "y":0}, + {"label":"Scr Lk", "x":18.5, "y":0}, + {"label":"Pause", "x":19.5, "y":0}, + + {"label":"F13", "x":0, "y":1.25}, + {"label":"~", "x":1.5, "y":1.25}, + {"label":"!", "x":2.5, "y":1.25}, + {"label":"@", "x":3.5, "y":1.25}, + {"label":"#", "x":4.5, "y":1.25}, + {"label":"$", "x":5.5, "y":1.25}, + {"label":"%", "x":6.5, "y":1.25}, + {"label":"^", "x":7.5, "y":1.25}, + + {"label":"&", "x":10, "y":1.25}, + {"label":"*", "x":11, "y":1.25}, + {"label":"(", "x":12, "y":1.25}, + {"label":")", "x":13, "y":1.25}, + {"label":"_", "x":14, "y":1.25}, + {"label":"+", "x":15, "y":1.25}, + {"label":"Del", "x":16, "y":1.25}, + {"label":"Bksp", "x":17, "y":1.25}, + {"label":"Ins", "x":18.5, "y":1.25}, + {"label":"Pg Up", "x":19.5, "y":1.25}, + + {"label":"F14", "x":0, "y":2.25}, + {"label":"Tab", "x":1.5, "y":2.25, "w":1.5}, + {"label":"Q", "x":3, "y":2.25}, + {"label":"W", "x":4, "y":2.25}, + {"label":"E", "x":5, "y":2.25}, + {"label":"R", "x":6, "y":2.25}, + {"label":"T", "x":7, "y":2.25}, + + {"label":"Y", "x":9.5, "y":2.25}, + {"label":"U", "x":10.5, "y":2.25}, + {"label":"I", "x":11.5, "y":2.25}, + {"label":"O", "x":12.5, "y":2.25}, + {"label":"P", "x":13.5, "y":2.25}, + {"label":"{", "x":14.5, "y":2.25}, + {"label":"}", "x":15.5, "y":2.25}, + {"label":"|", "x":16.5, "y":2.25, "w":1.5}, + {"label":"Del", "x":18.5, "y":2.25}, + {"label":"Pg Dn", "x":19.5, "y":2.25}, + + {"label":"F15", "x":0, "y":3.25}, + {"label":"Caps Lock", "x":1.5, "y":3.25, "w":1.75}, + {"label":"A", "x":3.25, "y":3.25}, + {"label":"S", "x":4.25, "y":3.25}, + {"label":"D", "x":5.25, "y":3.25}, + {"label":"F", "x":6.25, "y":3.25}, + {"label":"G", "x":7.25, "y":3.25}, + + {"label":"H", "x":9.75, "y":3.25}, + {"label":"J", "x":10.75, "y":3.25}, + {"label":"K", "x":11.75, "y":3.25}, + {"label":"L", "x":12.75, "y":3.25}, + {"label":":", "x":13.75, "y":3.25}, + {"label":"\"", "x":14.75, "y":3.25}, + {"label":"Enter", "x":15.75, "y":3.25, "w":2.25}, + {"label":"Home", "x":18.5, "y":3.25}, + {"label":"End", "x":19.5, "y":3.25}, + + {"label":"F16", "x":0, "y":4.25}, + {"label":"Shift", "x":1.5, "y":4.25, "w":2.25}, + {"label":"Z", "x":3.75, "y":4.25}, + {"label":"X", "x":4.75, "y":4.25}, + {"label":"C", "x":5.75, "y":4.25}, + {"label":"V", "x":6.75, "y":4.25}, + {"label":"B", "x":7.75, "y":4.25}, + {"label":"N", "x":10.25, "y":4.25}, + {"label":"M", "x":11.25, "y":4.25}, + {"label":"<", "x":12.25, "y":4.25}, + {"label":">", "x":13.25, "y":4.25}, + {"label":"?", "x":14.25, "y":4.25}, + {"label":"Shift", "x":15.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":18.5, "y":4.25}, + + {"label":"F17", "x":0, "y":5.25}, + {"label":"Ctrl", "x":1.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.75, "y":5.25}, + {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":5, "y":5.25, "w":1.25}, + {"label":"Space", "x":6.25, "y":5.25}, + {"label":"Fn", "x":7.25, "y":5.25, "w":1.25}, + {"label":"Fn", "x":10, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.25, "y":5.25, "w":2.25}, + {"label":"Alt", "x":13.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":14.75, "y":5.25}, + {"label":"Ctrl", "x":15.75, "y":5.25, "w":1.25}, + {"label":"Left", "x":17.5, "y":5.25}, + {"label":"Down", "x":18.5, "y":5.25}, + {"label":"Right", "x":19.5, "y":5.25} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + + {"label":"F7", "x":10, "y":0}, + {"label":"F8", "x":11, "y":0}, + {"label":"F9", "x":12.5, "y":0}, + {"label":"F10", "x":13.5, "y":0}, + {"label":"F11", "x":14.5, "y":0}, + {"label":"F12", "x":15.5, "y":0}, + {"label":"Prt Sc", "x":17.5, "y":0}, + {"label":"Scr Lk", "x":18.5, "y":0}, + {"label":"Pause", "x":19.5, "y":0}, + + {"label":"F13", "x":0, "y":1.25}, + {"label":"~", "x":1.5, "y":1.25}, + {"label":"!", "x":2.5, "y":1.25}, + {"label":"@", "x":3.5, "y":1.25}, + {"label":"#", "x":4.5, "y":1.25}, + {"label":"$", "x":5.5, "y":1.25}, + {"label":"%", "x":6.5, "y":1.25}, + {"label":"^", "x":7.5, "y":1.25}, + + {"label":"&", "x":10, "y":1.25}, + {"label":"*", "x":11, "y":1.25}, + {"label":"(", "x":12, "y":1.25}, + {"label":")", "x":13, "y":1.25}, + {"label":"_", "x":14, "y":1.25}, + {"label":"+", "x":15, "y":1.25}, + {"label":"Del", "x":16, "y":1.25}, + {"label":"Bksp", "x":17, "y":1.25}, + {"label":"Ins", "x":18.5, "y":1.25}, + {"label":"Pg Up", "x":19.5, "y":1.25}, + + {"label":"F14", "x":0, "y":2.25}, + {"label":"Tab", "x":1.5, "y":2.25, "w":1.5}, + {"label":"Q", "x":3, "y":2.25}, + {"label":"W", "x":4, "y":2.25}, + {"label":"E", "x":5, "y":2.25}, + {"label":"R", "x":6, "y":2.25}, + {"label":"T", "x":7, "y":2.25}, + + {"label":"Y", "x":9.5, "y":2.25}, + {"label":"U", "x":10.5, "y":2.25}, + {"label":"I", "x":11.5, "y":2.25}, + {"label":"O", "x":12.5, "y":2.25}, + {"label":"P", "x":13.5, "y":2.25}, + {"label":"{", "x":14.5, "y":2.25}, + {"label":"}", "x":15.5, "y":2.25}, + {"label":"Del", "x":18.5, "y":2.25}, + {"label":"Pg Dn", "x":19.5, "y":2.25}, + + {"label":"F15", "x":0, "y":3.25}, + {"label":"Caps Lock", "x":1.5, "y":3.25, "w":1.75}, + {"label":"A", "x":3.25, "y":3.25}, + {"label":"S", "x":4.25, "y":3.25}, + {"label":"D", "x":5.25, "y":3.25}, + {"label":"F", "x":6.25, "y":3.25}, + {"label":"G", "x":7.25, "y":3.25}, + + {"label":"H", "x":9.75, "y":3.25}, + {"label":"J", "x":10.75, "y":3.25}, + {"label":"K", "x":11.75, "y":3.25}, + {"label":"L", "x":12.75, "y":3.25}, + {"label":":", "x":13.75, "y":3.25}, + {"label":"\"", "x":14.75, "y":3.25}, + {"label":"#", "x":15.75, "y":3.25}, + {"label":"Enter", "x":16.75, "y":2.25, "w":1.25, "h":2}, + {"label":"Home", "x":18.5, "y":3.25}, + {"label":"End", "x":19.5, "y":3.25}, + + {"label":"F16", "x":0, "y":4.25}, + {"label":"Shift", "x":1.5, "y":4.25, "w":1.25}, + {"label":"\\", "x":2.75, "y":4.25}, + {"label":"Z", "x":3.75, "y":4.25}, + {"label":"X", "x":4.75, "y":4.25}, + {"label":"C", "x":5.75, "y":4.25}, + {"label":"V", "x":6.75, "y":4.25}, + {"label":"B", "x":7.75, "y":4.25}, + {"label":"N", "x":10.25, "y":4.25}, + {"label":"M", "x":11.25, "y":4.25}, + {"label":"<", "x":12.25, "y":4.25}, + {"label":">", "x":13.25, "y":4.25}, + {"label":"?", "x":14.25, "y":4.25}, + {"label":"Shift", "x":15.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":18.5, "y":4.25}, + + {"label":"F17", "x":0, "y":5.25}, + {"label":"Ctrl", "x":1.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.75, "y":5.25}, + {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":5, "y":5.25, "w":1.25}, + {"label":"Space", "x":6.25, "y":5.25}, + {"label":"Fn", "x":7.25, "y":5.25, "w":1.25}, + {"label":"Fn", "x":10, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.25, "y":5.25, "w":2.25}, + {"label":"Alt", "x":13.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":14.75, "y":5.25}, + {"label":"Ctrl", "x":15.75, "y":5.25, "w":1.25}, + {"label":"Left", "x":17.5, "y":5.25}, + {"label":"Down", "x":18.5, "y":5.25}, + {"label":"Right", "x":19.5, "y":5.25} + ] + }, + "LAYOUT_all": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + + {"label":"F7", "x":10, "y":0}, + {"label":"F8", "x":11, "y":0}, + {"label":"F9", "x":12.5, "y":0}, + {"label":"F10", "x":13.5, "y":0}, + {"label":"F11", "x":14.5, "y":0}, + {"label":"F12", "x":15.5, "y":0}, + {"label":"Prt Sc", "x":17.5, "y":0}, + {"label":"Scr Lk", "x":18.5, "y":0}, + {"label":"Pause", "x":19.5, "y":0}, + + {"label":"F13", "x":0, "y":1.25}, + {"label":"~", "x":1.5, "y":1.25}, + {"label":"!", "x":2.5, "y":1.25}, + {"label":"@", "x":3.5, "y":1.25}, + {"label":"#", "x":4.5, "y":1.25}, + {"label":"$", "x":5.5, "y":1.25}, + {"label":"%", "x":6.5, "y":1.25}, + {"label":"^", "x":7.5, "y":1.25}, + + {"label":"&", "x":10, "y":1.25}, + {"label":"*", "x":11, "y":1.25}, + {"label":"(", "x":12, "y":1.25}, + {"label":")", "x":13, "y":1.25}, + {"label":"_", "x":14, "y":1.25}, + {"label":"+", "x":15, "y":1.25}, + {"label":"Del", "x":16, "y":1.25}, + {"label":"Bksp", "x":17, "y":1.25}, + {"label":"Ins", "x":18.5, "y":1.25}, + {"label":"Pg Up", "x":19.5, "y":1.25}, + + {"label":"F14", "x":0, "y":2.25}, + {"label":"Tab", "x":1.5, "y":2.25, "w":1.5}, + {"label":"Q", "x":3, "y":2.25}, + {"label":"W", "x":4, "y":2.25}, + {"label":"E", "x":5, "y":2.25}, + {"label":"R", "x":6, "y":2.25}, + {"label":"T", "x":7, "y":2.25}, + + {"label":"Y", "x":9.5, "y":2.25}, + {"label":"U", "x":10.5, "y":2.25}, + {"label":"I", "x":11.5, "y":2.25}, + {"label":"O", "x":12.5, "y":2.25}, + {"label":"P", "x":13.5, "y":2.25}, + {"label":"{", "x":14.5, "y":2.25}, + {"label":"}", "x":15.5, "y":2.25}, + {"label":"|", "x":16.5, "y":2.25, "w":1.5}, + {"label":"Del", "x":18.5, "y":2.25}, + {"label":"Pg Dn", "x":19.5, "y":2.25}, + + {"label":"F15", "x":0, "y":3.25}, + {"label":"Caps Lock", "x":1.5, "y":3.25, "w":1.75}, + {"label":"A", "x":3.25, "y":3.25}, + {"label":"S", "x":4.25, "y":3.25}, + {"label":"D", "x":5.25, "y":3.25}, + {"label":"F", "x":6.25, "y":3.25}, + {"label":"G", "x":7.25, "y":3.25}, + + {"label":"H", "x":9.75, "y":3.25}, + {"label":"J", "x":10.75, "y":3.25}, + {"label":"K", "x":11.75, "y":3.25}, + {"label":"L", "x":12.75, "y":3.25}, + {"label":":", "x":13.75, "y":3.25}, + {"label":"\"", "x":14.75, "y":3.25}, + {"label":"#", "x":15.75, "y":3.25}, + {"label":"Enter", "x":16.75, "y":3.25, "w":1.25}, + {"label":"Home", "x":18.5, "y":3.25}, + {"label":"End", "x":19.5, "y":3.25}, + + {"label":"F16", "x":0, "y":4.25}, + {"label":"Shift", "x":1.5, "y":4.25, "w":1.25}, + {"label":"\\", "x":2.75, "y":4.25}, + {"label":"Z", "x":3.75, "y":4.25}, + {"label":"X", "x":4.75, "y":4.25}, + {"label":"C", "x":5.75, "y":4.25}, + {"label":"V", "x":6.75, "y":4.25}, + {"label":"B", "x":7.75, "y":4.25}, + {"label":"N", "x":10.25, "y":4.25}, + {"label":"M", "x":11.25, "y":4.25}, + {"label":"<", "x":12.25, "y":4.25}, + {"label":">", "x":13.25, "y":4.25}, + {"label":"?", "x":14.25, "y":4.25}, + {"label":"Shift", "x":15.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":18.5, "y":4.25}, + + {"label":"F17", "x":0, "y":5.25}, + {"label":"Ctrl", "x":1.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.75, "y":5.25}, + {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":5, "y":5.25, "w":1.25}, + {"label":"Space", "x":6.25, "y":5.25}, + {"label":"Fn", "x":7.25, "y":5.25, "w":1.25}, + {"label":"Fn", "x":10, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.25, "y":5.25, "w":2.25}, + {"label":"Alt", "x":13.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":14.75, "y":5.25}, + {"label":"Ctrl", "x":15.75, "y":5.25, "w":1.25}, + {"label":"Left", "x":17.5, "y":5.25}, + {"label":"Down", "x":18.5, "y":5.25}, + {"label":"Right", "x":19.5, "y":5.25} + ] + } + } +} diff --git a/keyboards/keebio/kbo5000/kbo5000.c b/keyboards/keebio/kbo5000/kbo5000.c new file mode 100644 index 000000000000..c46093537e05 --- /dev/null +++ b/keyboards/keebio/kbo5000/kbo5000.c @@ -0,0 +1 @@ +#include "kbo5000.h" diff --git a/keyboards/keebio/kbo5000/kbo5000.h b/keyboards/keebio/kbo5000/kbo5000.h new file mode 100644 index 000000000000..33f1998eb005 --- /dev/null +++ b/keyboards/keebio/kbo5000/kbo5000.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_keebio_kbo5000_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/keebio/kbo5000/keymaps/default/keymap.c b/keyboards/keebio/kbo5000/keymaps/default/keymap.c new file mode 100644 index 000000000000..00e2189891bd --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +enum encoder_names { + LEFT_HALF_ENC = 0, + RIGHT_HALF_ENC1 = 2, + RIGHT_HALF_ENC2, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_F13, KC_GRV, 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_DEL, KC_BSPC, KC_INS, KC_PGUP, + KC_F14, 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_DEL, KC_PGDN, + KC_F15, 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_HOME, KC_END, + KC_F16, 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_UP, + KC_F17, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi( + BL_STEP, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == LEFT_HALF_ENC) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == RIGHT_HALF_ENC1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == RIGHT_HALF_ENC2) { + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/keebio/kbo5000/keymaps/iso/keymap.c b/keyboards/keebio/kbo5000/keymaps/iso/keymap.c new file mode 100644 index 000000000000..e2c334672b8c --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/iso/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +enum encoder_names { + LEFT_HALF_ENC = 0, + RIGHT_HALF_ENC1 = 2, + RIGHT_HALF_ENC2, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_iso( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_F13, KC_GRV, 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_DEL, KC_BSPC, KC_INS, KC_PGUP, + KC_F14, 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_DEL, KC_PGDN, + KC_F15, 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_NUHS, KC_ENT, KC_HOME, KC_END, + KC_F16, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_F17, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_iso( + BL_STEP, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == LEFT_HALF_ENC) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == RIGHT_HALF_ENC1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == RIGHT_HALF_ENC2) { + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/keebio/kbo5000/keymaps/via/config.h b/keyboards/keebio/kbo5000/keymaps/via/config.h new file mode 100644 index 000000000000..a3b77a5b4d0b --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/via/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/keebio/kbo5000/keymaps/via/keymap.c b/keyboards/keebio/kbo5000/keymaps/via/keymap.c new file mode 100644 index 000000000000..692358c4855c --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +enum encoder_names { + LEFT_HALF_ENC = 0, + RIGHT_HALF_ENC1 = 2, + RIGHT_HALF_ENC2, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_F13, KC_GRV, 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_DEL, KC_BSPC, KC_INS, KC_PGUP, + KC_F14, 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_DEL, KC_PGDN, + KC_F15, 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_NUHS, KC_ENT, KC_HOME, KC_END, + KC_F16, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_F17, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_all( + BL_STEP, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == LEFT_HALF_ENC) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == RIGHT_HALF_ENC1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == RIGHT_HALF_ENC2) { + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/keebio/kbo5000/keymaps/via/rules.mk b/keyboards/keebio/kbo5000/keymaps/via/rules.mk new file mode 100644 index 000000000000..4b1bcabda81a --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/keebio/kbo5000/readme.md b/keyboards/keebio/kbo5000/readme.md new file mode 100644 index 000000000000..1f1f63889e27 --- /dev/null +++ b/keyboards/keebio/kbo5000/readme.md @@ -0,0 +1,20 @@ +# KBO-5000 + +A split staggered keyboard designed to be like the G80-5000, made and sold by Keebio. [More info at Keebio](https://keeb.io). + +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Availability: [Keebio](https://keeb.io/) + +Make example for this keyboard (after setting up your build environment): + + make keebio/kbo5000/rev1:default + +Example of flashing this keyboard: + + make keebio/kbo5000/rev1:default:flash + +Handedness detection is already hardwired onto the PCB, so no need to deal with `EE_HANDS` or flashing .eep files. + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. + +A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/keebio/kbo5000/rev1/config.h b/keyboards/keebio/kbo5000/rev1/config.h new file mode 100644 index 000000000000..085bfa47b071 --- /dev/null +++ b/keyboards/keebio/kbo5000/rev1/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x126A +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT KBO-5000 Rev. 1 +#define DESCRIPTION Split staggered keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 10 + +#define DIODE_DIRECTION COL2ROW +// wiring of each half +#define MATRIX_ROW_PINS { B1, B2, C7, B4, D7, B0 } +#define MATRIX_COL_PINS { F4, NO_PIN, F0, B7, B3, D2, D3, D5, D4, NO_PIN } +#define MATRIX_ROW_PINS_RIGHT { B3, B2, B6, B4, D7, B0 } +#define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, D5, D2, D3, B7, B1 } +#define SPLIT_HAND_PIN F7 +#define ENCODERS_PAD_A { F5, NO_PIN } +#define ENCODERS_PAD_B { F6, NO_PIN } +#define ENCODERS_PAD_A_RIGHT { D6, C7 } +#define ENCODERS_PAD_B_RIGHT { D4, C6 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define BACKLIGHT_PIN B5 +#define CAPS_LOCK_LED_PIN B6 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN E6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 // Number of LEDs +#define RGBLED_SPLIT { 8, 8 } +#define RGBLIGHT_LED_MAP { 1, 2, 3, 12, 13, 14, 15, 0, 7, 6, 5, 4, 11, 10, 9, 8 } diff --git a/keyboards/keebio/kbo5000/rev1/rev1.c b/keyboards/keebio/kbo5000/rev1/rev1.c new file mode 100644 index 000000000000..fafad9b6ab1a --- /dev/null +++ b/keyboards/keebio/kbo5000/rev1/rev1.c @@ -0,0 +1,32 @@ +#include "kbo5000.h" +#include "split_util.h" + +void matrix_init_kb(void) { + setPinOutput(CAPS_LOCK_LED_PIN); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + // Only update if left half + if (isLeftHand && led_update_user(led_state)) { + writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + } + return true; +} + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(3); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/kbo5000/rev1/rev1.h b/keyboards/keebio/kbo5000/rev1/rev1.h new file mode 100644 index 000000000000..63239d3463ea --- /dev/null +++ b/keyboards/keebio/kbo5000/rev1/rev1.h @@ -0,0 +1,73 @@ +#pragma once + +#include "kbo5000.h" +#include "quantum.h" + +#define LAYOUT_ansi( \ + LF1, LF4, LF5, LF6, LF7, LF8, LF9, RF1, RF2, RF4, RF5, RF6, RF7, RF8, RF9, RF10, \ + LA1, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10, \ + LB1, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, RB10, \ + LC1, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, RC10, \ + LD1, LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD9, \ + LE1, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE7, RE8, RE9, RE10 \ + ) \ + { \ + { LA1, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9, KC_NO }, \ + { LB1, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO, KC_NO }, \ + { LC1, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO, KC_NO }, \ + { LD1, KC_NO, LD3, KC_NO, LD5, LD6, LD7, LD8, LD9, KC_NO }, \ + { LE1, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO, KC_NO }, \ + { LF1, KC_NO, KC_NO, LF4, LF5, LF6, LF7, LF8, LF9, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, RB10 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, RC9, RC10 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, KC_NO, RD9, KC_NO }, \ + { RE1, RE2, RE3, RE4, KC_NO, KC_NO, RE7, RE8, RE9, RE10 }, \ + { RF1, RF2, KC_NO, RF4, RF5, RF6, RF7, RF8, RF9, RF10 } \ + } + +#define LAYOUT_iso( \ + LF1, LF4, LF5, LF6, LF7, LF8, LF9, RF1, RF2, RF4, RF5, RF6, RF7, RF8, RF9, RF10, \ + LA1, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10, \ + LB1, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB9, RB10, \ + LC1, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, RC10, \ + LD1, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD9, \ + LE1, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE7, RE8, RE9, RE10 \ + ) \ + { \ + { LA1, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9, KC_NO }, \ + { LB1, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO, KC_NO }, \ + { LC1, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO, KC_NO }, \ + { LD1, KC_NO, LD3, LD4, LD5, LD6, LD7, LD8, LD9, KC_NO }, \ + { LE1, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO, KC_NO }, \ + { LF1, KC_NO, KC_NO, LF4, LF5, LF6, LF7, LF8, LF9, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, RB9, RB10 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, RC10 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, KC_NO, RD9, KC_NO }, \ + { RE1, RE2, RE3, RE4, KC_NO, KC_NO, RE7, RE8, RE9, RE10 }, \ + { RF1, RF2, KC_NO, RF4, RF5, RF6, RF7, RF8, RF9, RF10 } \ + } + +#define LAYOUT_all( \ + LF1, LF4, LF5, LF6, LF7, LF8, LF9, RF1, RF2, RF4, RF5, RF6, RF7, RF8, RF9, RF10, \ + LA1, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10, \ + LB1, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, RB10, \ + LC1, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, RC10, \ + LD1, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD9, \ + LE1, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE7, RE8, RE9, RE10 \ + ) \ + { \ + { LA1, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9, KC_NO }, \ + { LB1, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO, KC_NO }, \ + { LC1, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO, KC_NO }, \ + { LD1, KC_NO, LD3, LD4, LD5, LD6, LD7, LD8, LD9, KC_NO }, \ + { LE1, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO, KC_NO }, \ + { LF1, KC_NO, KC_NO, LF4, LF5, LF6, LF7, LF8, LF9, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, RB10 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, RC10 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, KC_NO, RD9, KC_NO }, \ + { RE1, RE2, RE3, RE4, KC_NO, KC_NO, RE7, RE8, RE9, RE10 }, \ + { RF1, RF2, KC_NO, RF4, RF5, RF6, RF7, RF8, RF9, RF10 } \ + } diff --git a/keyboards/keebio/kbo5000/rev1/rules.mk b/keyboards/keebio/kbo5000/rev1/rules.mk new file mode 100644 index 000000000000..32e788159916 --- /dev/null +++ b/keyboards/keebio/kbo5000/rev1/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/keebio/kbo5000/rules.mk b/keyboards/keebio/kbo5000/rules.mk new file mode 100644 index 000000000000..5292231d581c --- /dev/null +++ b/keyboards/keebio/kbo5000/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +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 +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +LTO_ENABLE = yes +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = keebio/kbo5000/rev1 From bd1b51cbd106518882341fdde1c1e7d941840911 Mon Sep 17 00:00:00 2001 From: Keebz Dot Net <64744703+keebzdotnet@users.noreply.github.com> Date: Tue, 23 Jun 2020 02:07:15 -0700 Subject: [PATCH 24/26] Wazowski fixed keymap placement (#9408) - online configurator keys were in the wrong location and needed to be fixed - fixed a key being to high on the y position --- keyboards/keebzdotnet/wazowski/info.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/keebzdotnet/wazowski/info.json b/keyboards/keebzdotnet/wazowski/info.json index 26d0da54b299..5c27a3ddca9c 100644 --- a/keyboards/keebzdotnet/wazowski/info.json +++ b/keyboards/keebzdotnet/wazowski/info.json @@ -1,25 +1,25 @@ { "keyboard_name": "wazowski", - "url": "", + "url": "https://www.keebz.net/shop/wazoski-pcb", "maintainer": "keebzdotnet", "width": 9, "height": 5, "layouts": { "LAYOUT": { "layout": [ - {"label":"k00", "x":0, "y":3}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":1, "y":4}, - {"label":"k03", "x":2, "y":3}, + {"label":"k01", "x":1, "y":1}, {"label":"k04", "x":3, "y":2}, - {"label":"k05", "x":3, "y":4}, {"label":"k06", "x":4, "y":2}, - {"label":"k07", "x":4, "y":3}, {"label":"k08", "x":5, "y":2}, + {"label":"k12", "x":7, "y":3}, + {"label":"k00", "x":0, "y":3}, + {"label":"k03", "x":2, "y":3}, + {"label":"k07", "x":4, "y":3}, {"label":"k09", "x":5, "y":3}, {"label":"k10", "x":6, "y":2}, + {"label":"k02", "x":1, "y":4}, + {"label":"k05", "x":3, "y":4}, {"label":"k11", "x":7, "y":1}, - {"label":"k12", "x":7, "y":3}, {"label":"k13", "x":8, "y":2} ] } From 8d792cfb5fe671cd35f22c319d1f5b4948f0271b Mon Sep 17 00:00:00 2001 From: -k Date: Tue, 23 Jun 2020 03:28:54 -0700 Subject: [PATCH 25/26] [Keymap] Add personal keymap for Planck (#9424) * Create readme.md * Add personal keymap * Edit readme * Reorganize layouts * Update config.h * Edit beep settings * Apply suggestions from code review * More suggestions from code review --- .../planck/keymaps/charlesrocket/config.h | 38 ++++ .../planck/keymaps/charlesrocket/keymap.c | 203 ++++++++++++++++++ .../planck/keymaps/charlesrocket/readme.md | 55 +++++ .../planck/keymaps/charlesrocket/rules.mk | 8 + 4 files changed, 304 insertions(+) create mode 100644 keyboards/planck/keymaps/charlesrocket/config.h create mode 100644 keyboards/planck/keymaps/charlesrocket/keymap.c create mode 100644 keyboards/planck/keymaps/charlesrocket/readme.md create mode 100644 keyboards/planck/keymaps/charlesrocket/rules.mk diff --git a/keyboards/planck/keymaps/charlesrocket/config.h b/keyboards/planck/keymaps/charlesrocket/config.h new file mode 100644 index 000000000000..21d65d8f5dc9 --- /dev/null +++ b/keyboards/planck/keymaps/charlesrocket/config.h @@ -0,0 +1,38 @@ +#pragma once + +#ifdef AUDIO_ENABLE +#define STARTUP_SONG SONG(PLANCK_SOUND) +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC +#define AUDIO_CLICKY +#define AUDIO_CLICKY_FREQ_DEFAULT 2360.0f +#define AUDIO_CLICKY_FREQ_MAX 9500.0f +#define AUDIO_CLICKY_FREQ_RANDOMNESS 0.05f +#define DAC_SAMPLE_MAX 9754U + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 +#define ORYX_CONFIGURATOR \ No newline at end of file diff --git a/keyboards/planck/keymaps/charlesrocket/keymap.c b/keyboards/planck/keymaps/charlesrocket/keymap.c new file mode 100644 index 000000000000..f82819c58e23 --- /dev/null +++ b/keyboards/planck/keymaps/charlesrocket/keymap.c @@ -0,0 +1,203 @@ +#include QMK_KEYBOARD_H +#ifdef AUDIO_ENABLE +#include "muse.h" +#endif +#include "eeprom.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define ES_LESS_MAC KC_GRAVE +#define ES_GRTR_MAC LSFT(KC_GRAVE) +#define ES_BSLS_MAC ALGR(KC_6) +#define NO_PIPE_ALT KC_GRAVE +#define NO_BSLS_ALT KC_EQUAL +#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) + +enum planck_keycodes { + RGB_SLD = EZ_SAFE_RANGE, +}; + +enum planck_layers { + _BASE, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, + KC_ESCAPE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_ENTER, + WEBUSB_PAIR, KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPACE, KC_NO, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + [_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_DELETE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NONUS_HASH, KC_NONUS_BSLASH, KC_HOME, KC_END, _______, + KC_COMMA, _______, _______, _______, _______, _______, KC_NO, _______, KC_MEDIA_NEXT_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE + ), + + [_RAISE] = LAYOUT_planck_grid( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_DELETE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINUS, KC_EQUAL, KC_LBRACKET, KC_RBRACKET, KC_BSLASH, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NONUS_HASH, KC_NONUS_BSLASH, KC_PGUP, KC_PGDOWN, _______, + _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_MEDIA_NEXT_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE + ), + + [_ADJUST] = LAYOUT_planck_grid( + _______, CK_UP, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, + KC_DELETE, CK_TOGG, AU_ON, AU_OFF, AU_TOG, _______, _______, _______, RGB_VAI,RGB_VAD , _______, RESET, + _______, CK_DOWN, MU_ON, MU_OFF, MU_TOG, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, _______, _______ + ), + +}; + +extern bool g_suspend_state; +extern rgb_config_t rgb_matrix_config; + +void keyboard_post_init_user(void) { + rgb_matrix_enable(); +} + +const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { + [0] = { {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255} }, + + [1] = { {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255} }, + + [2] = { {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255} }, + + [3] = { {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255} }, + +}; + +void set_layer_color(int layer) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + HSV hsv = { + .h = pgm_read_byte(&ledmap[layer][i][0]), + .s = pgm_read_byte(&ledmap[layer][i][1]), + .v = pgm_read_byte(&ledmap[layer][i][2]), + }; + if (!hsv.h && !hsv.s && !hsv.v) { + rgb_matrix_set_color( i, 0, 0, 0 ); + } else { + RGB rgb = hsv_to_rgb( hsv ); + float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX; + rgb_matrix_set_color( i, f * rgb.r, f * rgb.g, f * rgb.b ); + } + } +} + +void rgb_matrix_indicators_user(void) { + if (g_suspend_state || keyboard_config.disable_layer_led) { return; } + switch (biton32(layer_state)) { + case 0: + set_layer_color(0); + break; + case 1: + set_layer_color(1); + break; + case 2: + set_layer_color(2); + break; + case 3: + set_layer_color(3); + break; + default: + if (rgb_matrix_get_flags() == LED_FLAG_NONE) + rgb_matrix_set_color_all(0, 0, 0); + break; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + } + return true; +} + +#ifdef AUDIO_ENABLE +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/planck/keymaps/charlesrocket/readme.md b/keyboards/planck/keymaps/charlesrocket/readme.md new file mode 100644 index 000000000000..9e9f0d255142 --- /dev/null +++ b/keyboards/planck/keymaps/charlesrocket/readme.md @@ -0,0 +1,55 @@ +# Red Planck EZ (Glow) with beeps + +QWERTY layout with colored layers (red, purple, green and white) for Planck EZ Glow. Soft beep feedback is On by default. Sound level is hardcoded with `DAC_SAMPLE_MAX` and tone settings (`CK`) are in Adjust (WHITE) layer. + +``` +RED Base + ,-----------------------------------------------------------------------------------. + | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Esc | A | S | D | F | G | H | J | K | L | ; | " | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------| + | QMK | Ctrl | Alt | OS |Lower | Space |Raise | Left | Down | Up |Right | + `-----------------------------------------------------------------------------------' +``` + +``` +PURPLE Lower + ,-----------------------------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | |Lower | |Raise | Next | Vol- | Vol+ | Play | + `-----------------------------------------------------------------------------------' +``` + +``` +GREEN Raise + ,-----------------------------------------------------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | |Lower | |Raise | Next | Vol- | Vol+ | Play | + `-----------------------------------------------------------------------------------' +``` + +``` +WHITE (Lower + Raise) + ,-----------------------------------------------------------------------------------. + | | CkUp | | | | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Del | CkTg |Aud On|AudOff|AudTog| | | |BRGTH+|BRGTH-| | Reset| + |------+------+------+------+------+------+------+------+------+------+------+------| + | | CkDn |Mus On|MusOff|MusTog| | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | |Lower | |Raise | | | | | + `-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/planck/keymaps/charlesrocket/rules.mk b/keyboards/planck/keymaps/charlesrocket/rules.mk new file mode 100644 index 000000000000..6e4985a8b171 --- /dev/null +++ b/keyboards/planck/keymaps/charlesrocket/rules.mk @@ -0,0 +1,8 @@ +SRC += muse.c +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LTO_ENABLE = yes +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no +WEBUSB_ENABLE = yes +ORYX_ENABLE = yes From 88ebf921847e2bf744ff035d8091ad6826d59a1f Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 24 Jun 2020 03:25:20 +1000 Subject: [PATCH 26/26] Fix info.json for Suihankey (#9490) --- keyboards/suihankey/alpha/info.json | 34 ++++++++++++++++++++ keyboards/suihankey/info.json | 12 ------- keyboards/suihankey/rev1/info.json | 34 ++++++++++++++++++++ keyboards/suihankey/split/info.json | 50 +++++++++++++++++++++++++++-- 4 files changed, 115 insertions(+), 15 deletions(-) create mode 100644 keyboards/suihankey/alpha/info.json delete mode 100644 keyboards/suihankey/info.json create mode 100644 keyboards/suihankey/rev1/info.json diff --git a/keyboards/suihankey/alpha/info.json b/keyboards/suihankey/alpha/info.json new file mode 100644 index 000000000000..3d914662ff03 --- /dev/null +++ b/keyboards/suihankey/alpha/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "suihankey", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 6.4, + "height": 4.85, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0.375}, + {"x": 1, "y": 0.125}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.125}, + {"x": 4, "y": 0.25}, + + {"x": 0, "y": 1.375}, + {"x": 1, "y": 1.125}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.125}, + {"x": 4, "y": 1.25}, + + {"x": 0, "y": 2.375}, + {"x": 1, "y": 2.125}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.125}, + {"x": 4, "y": 2.25}, + + {"x": 3.4, "y": 3.25}, + {"x": 4.4, "y": 3.55}, + {"x": 5.4, "y": 3.85} + ] + } + } +} diff --git a/keyboards/suihankey/info.json b/keyboards/suihankey/info.json deleted file mode 100644 index 3756e3d5fece..000000000000 --- a/keyboards/suihankey/info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keyboard_name": "suihankey", - "url": "https://kakunpc.booth.pm/", - "maintainer": "kakunpc", - "width": 6.4, - "height": 4.85, - "layouts": { - "LAYOUT": { - "layout": [{"label":"1", "x":0, "y":0.375}, {"label":"2", "x":1, "y":0.125}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0.125}, {"label":"5", "x":4, "y":0.25}, {"label":"6", "x":0, "y":1.375}, {"label":"7", "x":1, "y":1.125}, {"label":"8", "x":2, "y":1}, {"label":"9", "x":3, "y":1.125}, {"label":"10", "x":4, "y":1.25}, {"label":"11", "x":0, "y":2.375}, {"label":"12", "x":1, "y":2.125}, {"label":"13", "x":2, "y":2}, {"label":"14", "x":3, "y":2.125}, {"label":"15", "x":4, "y":2.25}, {"label":"16", "x":3.4, "y":3.25}, {"label":"17", "x":4.4, "y":3.55}, {"label":"18", "x":5.4, "y":3.85}] - } - } -} diff --git a/keyboards/suihankey/rev1/info.json b/keyboards/suihankey/rev1/info.json new file mode 100644 index 000000000000..3d914662ff03 --- /dev/null +++ b/keyboards/suihankey/rev1/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "suihankey", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 6.4, + "height": 4.85, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0.375}, + {"x": 1, "y": 0.125}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.125}, + {"x": 4, "y": 0.25}, + + {"x": 0, "y": 1.375}, + {"x": 1, "y": 1.125}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.125}, + {"x": 4, "y": 1.25}, + + {"x": 0, "y": 2.375}, + {"x": 1, "y": 2.125}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.125}, + {"x": 4, "y": 2.25}, + + {"x": 3.4, "y": 3.25}, + {"x": 4.4, "y": 3.55}, + {"x": 5.4, "y": 3.85} + ] + } + } +} diff --git a/keyboards/suihankey/split/info.json b/keyboards/suihankey/split/info.json index c3825ac3aca9..f50012dd12dd 100644 --- a/keyboards/suihankey/split/info.json +++ b/keyboards/suihankey/split/info.json @@ -2,11 +2,55 @@ "keyboard_name": "suihankey_split", "url": "https://kakunpc.booth.pm/", "maintainer": "kakunpc", - "width": 12, - "height": 4, + "width": 13.2, + "height": 4.85, "layouts": { "LAYOUT": { - "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0}, {"label":"5", "x":4, "y":0}, {"label":"19", "x":7, "y":0}, {"label":"20", "x":8, "y":0}, {"label":"21", "x":9, "y":0}, {"label":"22", "x":10, "y":0}, {"label":"23", "x":11, "y":0}, {"label":"6", "x":0, "y":1}, {"label":"7", "x":1, "y":1}, {"label":"8", "x":2, "y":1}, {"label":"9", "x":3, "y":1}, {"label":"10", "x":4, "y":1}, {"label":"24", "x":7, "y":1}, {"label":"25", "x":8, "y":1}, {"label":"26", "x":9, "y":1}, {"label":"27", "x":10, "y":1}, {"label":"28", "x":11, "y":1}, {"label":"11", "x":0, "y":2}, {"label":"12", "x":1, "y":2}, {"label":"13", "x":2, "y":2}, {"label":"14", "x":3, "y":2}, {"label":"15", "x":4, "y":2}, {"label":"29", "x":7, "y":2}, {"label":"30", "x":8, "y":2}, {"label":"31", "x":9, "y":2}, {"label":"32", "x":10, "y":2}, {"label":"33", "x":11, "y":2}, {"label":"16", "x":2, "y":3}, {"label":"17", "x":3, "y":3}, {"label":"18", "x":4, "y":3}, {"label":"34", "x":7, "y":3}, {"label":"35", "x":8, "y":3}, {"label":"36", "x":9, "y":3}] + "layout": [ + {"x": 0, "y": 0.375}, + {"x": 1, "y": 0.125}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.125}, + {"x": 4, "y": 0.25}, + + {"x": 8.2, "y": 0.25}, + {"x": 9.2, "y": 0.125}, + {"x": 10.2, "y": 0}, + {"x": 11.2, "y": 0.125}, + {"x": 12.2, "y": 0.375}, + + {"x": 0, "y": 1.375}, + {"x": 1, "y": 1.125}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.125}, + {"x": 4, "y": 1.25}, + + {"x": 8.2, "y": 1.25}, + {"x": 9.2, "y": 1.125}, + {"x": 10.2, "y": 1}, + {"x": 11.2, "y": 1.125}, + {"x": 12.2, "y": 1.375}, + + {"x": 0, "y": 2.375}, + {"x": 1, "y": 2.125}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.125}, + {"x": 4, "y": 2.25}, + + {"x": 8.2, "y": 2.25}, + {"x": 9.2, "y": 2.125}, + {"x": 10.2, "y": 2}, + {"x": 11.2, "y": 2.125}, + {"x": 12.2, "y": 2.375}, + + {"x": 3.4, "y": 3.25}, + {"x": 4.4, "y": 3.55}, + {"x": 5.4, "y": 3.85}, + + {"x": 6.8, "y": 3.85}, + {"x": 7.8, "y": 3.55}, + {"x": 8.8, "y": 3.25} + ] } } }