From 9d423f91e01f63712f89dd439b49da2e288779ae Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Mon, 15 Apr 2024 23:40:50 +0900 Subject: [PATCH 1/6] Hooks to override applying motion to mouse report for https://github.com/Yowkees/keyball/issues/559 --- .../keyboards/keyball/lib/keyball/keyball.c | 8 ++++---- .../keyboards/keyball/lib/keyball/keyball.h | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c index cc57e8d26..a19d8bc73 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c @@ -166,7 +166,7 @@ void pointing_device_driver_set_cpi(uint16_t cpi) { keyball_set_cpi(cpi); } -static void motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left) { +__attribute__((weak)) void keyball_on_apply_motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left) { #if KEYBALL_MODEL == 61 || KEYBALL_MODEL == 39 || KEYBALL_MODEL == 147 || KEYBALL_MODEL == 44 r->x = clip2int8(m->y); r->y = clip2int8(m->x); @@ -185,7 +185,7 @@ static void motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is m->y = 0; } -static void motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool is_left) { +__attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool is_left) { // consume motion of trackball. int16_t div = 1 << (keyball_get_scroll_div() - 1); int16_t x = divmod16(&m->x, div); @@ -223,9 +223,9 @@ static void motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool static void motion_to_mouse(keyball_motion_t *m, report_mouse_t *r, bool is_left, bool as_scroll) { if (as_scroll) { - motion_to_mouse_scroll(m, r, is_left); + keyball_on_apply_motion_to_mouse_scroll(m, r, is_left); } else { - motion_to_mouse_move(m, r, is_left); + keyball_on_apply_motion_to_mouse_move(m, r, is_left); } } diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h index 28c5cc0b6..7074ed372 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h @@ -174,6 +174,22 @@ typedef enum { extern keyball_t keyball; +////////////////////////////////////////////////////////////////////////////// +// Hook points + +/// keyball_on_adjust_layout is called when the keyboard layout adjustted +void keyball_on_adjust_layout(keyball_adjust_t v); + +/// keyball_on_apply_motion_to_mouse_move applies trackball's motion m to r as +/// mouse movement. +/// You can change the default algorithm by override this function. +void keyball_on_apply_motion_to_mouse_move(keyball_motion_t *m, report_mouse_t *r, bool is_left); + +/// keyball_on_apply_motion_to_mouse_scroll applies trackball's motion m to r +/// as mouse scroll. +/// You can change the default algorithm by override this function. +void keyball_on_apply_motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool is_left); + ////////////////////////////////////////////////////////////////////////////// // Public API functions From 409d4748f62ad82d79334a7ad019465812d691ee Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Tue, 16 Apr 2024 00:43:17 +0900 Subject: [PATCH 2/6] Scroll snap mode, manually managed for https://github.com/Yowkees/keyball/issues/559 --- .../keyboards/keyball/lib/keyball/keyball.c | 49 ++++++++++++++++++- .../keyboards/keyball/lib/keyball/keyball.h | 26 +++++++++- 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c index a19d8bc73..838b01c65 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c @@ -206,8 +206,8 @@ __attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motio # error("unknown Keyball model") #endif -#if KEYBALL_SCROLLSNAP_ENABLE - // scroll snap. +#if KEYBALL_SCROLLSNAP_ENABLE == 1 + // scroll snap (behavior up to 1.3.2) uint32_t now = timer_read32(); if (r->h != 0 || r->v != 0) { keyball.scroll_snap_last = now; @@ -218,6 +218,18 @@ __attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motio keyball.scroll_snap_tension_h += y; r->h = 0; } +#elif KEYBALL_SCROLLSNAP_ENABLE == 2 + switch (keyball.scrollsnap_mode) { + case KEYBALL_SCROLLSNAP_MODE_VERTICAL: + r->h = 0; + break; + case KEYBALL_SCROLLSNAP_MODE_HORIZONTAL: + r->v = 0; + break; + case KEYBALL_SCROLLSNAP_MODE_FREE: + // pass by without doing anything + break; + } #endif } @@ -496,6 +508,20 @@ void keyball_set_scroll_mode(bool mode) { keyball.scroll_mode = mode; } +keyball_scrollsnap_mode_t keyball_get_scrollsnap_mode(void) { +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + return keyball.scrollsnap_mode; +#else + return 0; +#endif +} + +void keyball_set_scrollsnap_mode(keyball_scrollsnap_mode_t mode) { +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + keyball.scrollsnap_mode = mode; +#endif +} + uint8_t keyball_get_scroll_div(void) { return keyball.scroll_div == 0 ? KEYBALL_SCROLL_DIV_DEFAULT : keyball.scroll_div; } @@ -540,6 +566,10 @@ void keyboard_post_init_kb(void) { #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE set_auto_mouse_enable(c.amle); set_auto_mouse_timeout(c.amlto == 0 ? AUTO_MOUSE_TIME : (c.amlto + 1) * AML_TIMEOUT_QU); +#endif +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + keyball.scrollsnap_mode = c.ssnap; + keyball_set_scrollsnap_mode(c.ssnap); #endif } @@ -642,6 +672,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE .amle = get_auto_mouse_enable(), .amlto = (get_auto_mouse_timeout() / AML_TIMEOUT_QU) - 1, +#endif +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + .ssnap = keyball_get_scrollsnap_mode(), #endif }; eeconfig_update_kb(c.raw); @@ -670,6 +703,18 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { add_scroll_div(-1); break; +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + case SSNP_HOR: + keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_HORIZONTAL); + break; + case SSNP_VER: + keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_VERTICAL); + break; + case SSNP_FRE: + keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_FREE); + break; +#endif + #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE case AML_TO: set_auto_mouse_enable(!get_auto_mouse_enable()); diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h index 7074ed372..b59470253 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h @@ -36,8 +36,9 @@ along with this program. If not, see . # define KEYBALL_SCROLLBALL_INHIVITOR 50 #endif +/// To disable scroll snap feature, define 0 in your config.h #ifndef KEYBALL_SCROLLSNAP_ENABLE -# define KEYBALL_SCROLLSNAP_ENABLE 1 +# define KEYBALL_SCROLLSNAP_ENABLE 2 #endif #ifndef KEYBALL_SCROLLSNAP_RESET_TIMER @@ -104,6 +105,10 @@ enum keyball_keycodes { SCRL_DVI = QK_KB_8, // Increment scroll divider SCRL_DVD = QK_KB_9, // Decrement scroll divider + SSNP_VER = QK_KB_13, // Set scroll snap mode as horizontal + SSNP_HOR = QK_KB_14, // Set scroll snap mode as vertical + SSNP_FRE = QK_KB_15, // Set scroll snap mode as disable (free scroll) + // Auto mouse layer control keycodes. // Only works when POINTING_DEVICE_AUTO_MOUSE_ENABLE is defined. AML_TO = QK_KB_10, // Toggle automatic mouse layer @@ -122,6 +127,9 @@ typedef union { #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE uint8_t amle : 1; // automatic mouse layer enabled uint16_t amlto : 5; // automatic mouse layer timeout +#endif +#if KEYBALL_SCROLLSNAP_ENABLE == 2 + uint8_t ssnap : 2; // scroll snap mode #endif }; } keyball_config_t; @@ -137,6 +145,12 @@ typedef struct { typedef uint8_t keyball_cpi_t; +typedef enum { + KEYBALL_SCROLLSNAP_MODE_VERTICAL = 0, + KEYBALL_SCROLLSNAP_MODE_HORIZONTAL = 1, + KEYBALL_SCROLLSNAP_MODE_FREE = 2, +} keyball_scrollsnap_mode_t; + typedef struct { bool this_have_ball; bool that_enable; @@ -152,8 +166,12 @@ typedef struct { uint32_t scroll_mode_changed; uint8_t scroll_div; +#if KEYBALL_SCROLLSNAP_ENABLE == 1 uint32_t scroll_snap_last; int8_t scroll_snap_tension_h; +#elif KEYBALL_SCROLLSNAP_ENABLE == 2 + keyball_scrollsnap_mode_t scrollsnap_mode; +#endif uint16_t last_kc; keypos_t last_pos; @@ -212,6 +230,12 @@ bool keyball_get_scroll_mode(void); /// keyball_set_scroll_mode modify scroll mode. void keyball_set_scroll_mode(bool mode); +/// TODO: document +keyball_scrollsnap_mode_t keyball_get_scrollsnap_mode(void); + +/// TODO: document +void keyball_set_scrollsnap_mode(keyball_scrollsnap_mode_t mode); + // TODO: document uint8_t keyball_get_scroll_div(void); From 9fd0fb0bb40c81ea96a39b244d2b9a042f1aa1b8 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Tue, 16 Apr 2024 02:27:24 +0900 Subject: [PATCH 3/6] add comments, and documents --- .../keyboards/keyball/lib/keyball/README.md | 20 +++++++++- .../keyboards/keyball/lib/keyball/keyball.c | 4 +- .../keyboards/keyball/lib/keyball/keyball.h | 39 +++++++++++++++---- .../keyboards/keyball/lib/keyball/keycodes.md | 6 +++ 4 files changed, 58 insertions(+), 11 deletions(-) diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/README.md b/qmk_firmware/keyboards/keyball/lib/keyball/README.md index 68a91e6df..3b4605bbe 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/README.md +++ b/qmk_firmware/keyboards/keyball/lib/keyball/README.md @@ -1,5 +1,9 @@ # Keyball Core Function Library +## Scroll snap mode + +TODO + ## MEMO This section contains notes regarding the specifications of this library. @@ -11,10 +15,22 @@ please make pull requests to share it us. ## Scroll Snap Spec -デフォルトで有効になっているスクロールスナップ機能は、 -ボールによるスクロールを垂直方向に制限(スナップ)している。 この機能は config.h に `#define KEYBALL_SCROLLSNAP_ENABLE 0` を書き加えることで無効化できる。 +トラックボールによるスクロールの方向を制限するのがスクロールスナップ。 +現在のスクロールスナップには3つのモードがある。 + +* 垂直方向にスナップ (デフォルト) +* 水平方向にスナップ +* スナップしない自由スクロール + +以上を `SSNP_VER`, `SSNP_HOR`, `SSNP_FRE` の独自キーコードを用いて手動で切り替える。 + +### up to 1.3.2 + +初期状態でトラックボールによるスクロールを垂直方向に制限(スナップ)している。 +この振る舞いは config.h に `#define KEYBALL_SCROLLSNAP_ENABLE 1` を書き加えることで有効化できる。 + この機能はスナップモードとフリーモードから構成される。 初期状態はスナップモードで、このモードではスクロール方向は垂直に制限される。 スナップモードで水平の一定方向に一定カウント(デフォルトは12)以上スクロールするとフリーモードに遷移する。 diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c index 838b01c65..aac689631 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c @@ -206,8 +206,9 @@ __attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motio # error("unknown Keyball model") #endif + // Scroll snapping #if KEYBALL_SCROLLSNAP_ENABLE == 1 - // scroll snap (behavior up to 1.3.2) + // Old behavior up to 1.3.2) uint32_t now = timer_read32(); if (r->h != 0 || r->v != 0) { keyball.scroll_snap_last = now; @@ -219,6 +220,7 @@ __attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motio r->h = 0; } #elif KEYBALL_SCROLLSNAP_ENABLE == 2 + // New behavior switch (keyball.scrollsnap_mode) { case KEYBALL_SCROLLSNAP_MODE_VERTICAL: r->h = 0; diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h index b59470253..42db0a211 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h @@ -105,8 +105,8 @@ enum keyball_keycodes { SCRL_DVI = QK_KB_8, // Increment scroll divider SCRL_DVD = QK_KB_9, // Decrement scroll divider - SSNP_VER = QK_KB_13, // Set scroll snap mode as horizontal - SSNP_HOR = QK_KB_14, // Set scroll snap mode as vertical + SSNP_VER = QK_KB_13, // Set scroll snap mode as vertical + SSNP_HOR = QK_KB_14, // Set scroll snap mode as horizontal SSNP_FRE = QK_KB_15, // Set scroll snap mode as disable (free scroll) // Auto mouse layer control keycodes. @@ -230,20 +230,43 @@ bool keyball_get_scroll_mode(void); /// keyball_set_scroll_mode modify scroll mode. void keyball_set_scroll_mode(bool mode); -/// TODO: document +/// keyball_get_scrollsnap_mode gets current scroll snap mode. keyball_scrollsnap_mode_t keyball_get_scrollsnap_mode(void); -/// TODO: document +/// keyball_set_scrollsnap_mode change scroll snap mode. void keyball_set_scrollsnap_mode(keyball_scrollsnap_mode_t mode); -// TODO: document +/// keyball_get_scroll_div gets current scroll divider. +/// See also keyball_set_scroll_div for the scroll divider's detail. uint8_t keyball_get_scroll_div(void); -// TODO: document +/// keyball_set_scroll_div changes scroll divider. +/// +/// The scroll divider is the number that divides the raw value when applying +/// trackball motion to scrolling. The CPI value of the trackball is very +/// high, so if you apply it to scrolling as is, it will scroll too much. +/// In order to adjust the scroll amount to be appropriate, it is applied after +/// dividing it by a scroll divider. The actual denominator is determined by +/// the following formula: +/// +/// denominator = 2 ^ (div - 1) ^2 +/// +/// Valid values are between 1 and 7, KEYBALL_SCROLL_DIV_DEFAULT is used when 0 +/// is specified. void keyball_set_scroll_div(uint8_t div); -// TODO: document +/// keyball_get_cpi gets current CPI of trackball. +/// The actual CPI value is the returned value +1 and multiplied by 100: +/// +/// CPI = (v + 1) * 100 uint8_t keyball_get_cpi(void); -// TODO: document +/// keyball_set_cpi changes CPI of trackball. +/// Valid values are between 0 to 119, and the actual CPI value is the set +/// value +1 and multiplied by 100: +/// +/// CPI = (v + 1) * 100 +/// +/// In addition, if you do not upload SROM, the maximum value will be limited +/// to 34 (3500CPI). void keyball_set_cpi(uint8_t cpi); diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keycodes.md b/qmk_firmware/keyboards/keyball/lib/keyball/keycodes.md index dbfcb4a7d..44a70b460 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keycodes.md +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keycodes.md @@ -21,6 +21,9 @@ | `AML_TO` | `Kb 10` | `0x7e0a` | Toggle automatic mouse layer | | `AML_I50` | `Kb 11` | `0x7e0b` | Increase 50ms automatic mouse layer timeout (max 1000ms) | | `AML_D50` | `Kb 12` | `0x7e0c` | Decrease 50ms automatic mouse layer timeout (min 100ms) | +| `SSNP_VER` | `Kb 13` | `0x7e0d` | Set scroll snap mode as vertical | +| `SSNP_HOR` | `Kb 14` | `0x7e0e` | Set scroll snap mode as horizontal | +| `SSNP_FRE` | `Kb 15` | `0x7e0f` | Set scroll snap mode as disable (free scroll) | [^1]: CPI, scroll divider, automatic mouse layer's enable/disable, and automatic mouse layer's timeout. @@ -42,5 +45,8 @@ | `AML_TO` | `Kb 10` | `0x7e0a` | 自動マウスレイヤーをトグルします。 | | `AML_I50` | `Kb 11` | `0x7e0b` | 自動マウスレイヤーのタイムアウトを50msec増やします (max 1000ms) | | `AML_D50` | `Kb 12` | `0x7e0c` | 自動マウスレイヤーのタイムアウトを50msec減らします (min 100ms) | +| `SSNP_VER` | `Kb 13` | `0x7e0d` | スクロールスナップモードを垂直にする | +| `SSNP_HOR` | `Kb 14` | `0x7e0e` | スクロールスナップモードを水平にする | +| `SSNP_FRE` | `Kb 15` | `0x7e0f` | スクロールスナップモードを無効にする(自由スクロール) | [^2]: CPI、スクロール除数、自動マウスレイヤーのON/OFF状態、及び自動マウスレイヤのタイムアウト From b9c499a95859a8ea9e51ea373f74c90f035e775d Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Tue, 16 Apr 2024 02:51:07 +0900 Subject: [PATCH 4/6] indicate scroll snap mode in OLED "SCR" in OLED will be changed to "VT", or "HO" depending on scroll snap mode. --- .../keyboards/keyball/lib/keyball/README.md | 2 +- .../keyboards/keyball/lib/keyball/keyball.c | 24 +++++++++++++++---- .../keyboards/keyball/lib/keyball/keyball.h | 2 +- .../keyboards/keyball/lib/keyball/keycodes.md | 4 ++-- .../keyboards/keyball/lib/logofont/logofont.c | 3 +-- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/README.md b/qmk_firmware/keyboards/keyball/lib/keyball/README.md index 3b4605bbe..75c42f2d2 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/README.md +++ b/qmk_firmware/keyboards/keyball/lib/keyball/README.md @@ -24,7 +24,7 @@ please make pull requests to share it us. * 水平方向にスナップ * スナップしない自由スクロール -以上を `SSNP_VER`, `SSNP_HOR`, `SSNP_FRE` の独自キーコードを用いて手動で切り替える。 +以上を `SSNP_VRT`, `SSNP_HOR`, `SSNP_FRE` の独自キーコードを用いて手動で切り替える。 ### up to 1.3.2 diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c index aac689631..07efac7a7 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c @@ -221,14 +221,14 @@ __attribute__((weak)) void keyball_on_apply_motion_to_mouse_scroll(keyball_motio } #elif KEYBALL_SCROLLSNAP_ENABLE == 2 // New behavior - switch (keyball.scrollsnap_mode) { + switch (keyball_get_scrollsnap_mode()) { case KEYBALL_SCROLLSNAP_MODE_VERTICAL: r->h = 0; break; case KEYBALL_SCROLLSNAP_MODE_HORIZONTAL: r->v = 0; break; - case KEYBALL_SCROLLSNAP_MODE_FREE: + default: // pass by without doing anything break; } @@ -411,8 +411,23 @@ void keyball_oled_render_ballinfo(void) { oled_write(format_4d(keyball_get_cpi()) + 1, false); oled_write_P(PSTR("00 "), false); - // indicate scroll mode: on/off + // indicate scroll snap mode: "VT" (vertical), "HN" (horiozntal), and "SCR" (free) +#if 1 && KEYBALL_SCROLLSNAP_ENABLE == 2 + switch (keyball_get_scrollsnap_mode()) { + case KEYBALL_SCROLLSNAP_MODE_VERTICAL: + oled_write_P(PSTR("VT"), false); + break; + case KEYBALL_SCROLLSNAP_MODE_HORIZONTAL: + oled_write_P(PSTR("HO"), false); + break; + default: + oled_write_P(PSTR("\xBE\xBF"), false); + break; + } +#else oled_write_P(PSTR("\xBE\xBF"), false); +#endif + // indicate scroll mode: on/off if (keyball.scroll_mode) { oled_write_P(LFSTR_ON, false); } else { @@ -570,7 +585,6 @@ void keyboard_post_init_kb(void) { set_auto_mouse_timeout(c.amlto == 0 ? AUTO_MOUSE_TIME : (c.amlto + 1) * AML_TIMEOUT_QU); #endif #if KEYBALL_SCROLLSNAP_ENABLE == 2 - keyball.scrollsnap_mode = c.ssnap; keyball_set_scrollsnap_mode(c.ssnap); #endif } @@ -709,7 +723,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { case SSNP_HOR: keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_HORIZONTAL); break; - case SSNP_VER: + case SSNP_VRT: keyball_set_scrollsnap_mode(KEYBALL_SCROLLSNAP_MODE_VERTICAL); break; case SSNP_FRE: diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h index 42db0a211..32003a846 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h @@ -105,7 +105,7 @@ enum keyball_keycodes { SCRL_DVI = QK_KB_8, // Increment scroll divider SCRL_DVD = QK_KB_9, // Decrement scroll divider - SSNP_VER = QK_KB_13, // Set scroll snap mode as vertical + SSNP_VRT = QK_KB_13, // Set scroll snap mode as vertical SSNP_HOR = QK_KB_14, // Set scroll snap mode as horizontal SSNP_FRE = QK_KB_15, // Set scroll snap mode as disable (free scroll) diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keycodes.md b/qmk_firmware/keyboards/keyball/lib/keyball/keycodes.md index 44a70b460..ed1d15c33 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keycodes.md +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keycodes.md @@ -21,7 +21,7 @@ | `AML_TO` | `Kb 10` | `0x7e0a` | Toggle automatic mouse layer | | `AML_I50` | `Kb 11` | `0x7e0b` | Increase 50ms automatic mouse layer timeout (max 1000ms) | | `AML_D50` | `Kb 12` | `0x7e0c` | Decrease 50ms automatic mouse layer timeout (min 100ms) | -| `SSNP_VER` | `Kb 13` | `0x7e0d` | Set scroll snap mode as vertical | +| `SSNP_VRT` | `Kb 13` | `0x7e0d` | Set scroll snap mode as vertical | | `SSNP_HOR` | `Kb 14` | `0x7e0e` | Set scroll snap mode as horizontal | | `SSNP_FRE` | `Kb 15` | `0x7e0f` | Set scroll snap mode as disable (free scroll) | @@ -45,7 +45,7 @@ | `AML_TO` | `Kb 10` | `0x7e0a` | 自動マウスレイヤーをトグルします。 | | `AML_I50` | `Kb 11` | `0x7e0b` | 自動マウスレイヤーのタイムアウトを50msec増やします (max 1000ms) | | `AML_D50` | `Kb 12` | `0x7e0c` | 自動マウスレイヤーのタイムアウトを50msec減らします (min 100ms) | -| `SSNP_VER` | `Kb 13` | `0x7e0d` | スクロールスナップモードを垂直にする | +| `SSNP_VRT` | `Kb 13` | `0x7e0d` | スクロールスナップモードを垂直にする | | `SSNP_HOR` | `Kb 14` | `0x7e0e` | スクロールスナップモードを水平にする | | `SSNP_FRE` | `Kb 15` | `0x7e0f` | スクロールスナップモードを無効にする(自由スクロール) | diff --git a/qmk_firmware/keyboards/keyball/lib/logofont/logofont.c b/qmk_firmware/keyboards/keyball/lib/logofont/logofont.c index 0d976ecb0..29ce48888 100644 --- a/qmk_firmware/keyboards/keyball/lib/logofont/logofont.c +++ b/qmk_firmware/keyboards/keyball/lib/logofont/logofont.c @@ -193,8 +193,7 @@ const unsigned char font[] PROGMEM = { // 0xC0 0x3F, 0x21, 0x1E, 0x00, 0x21, 0x3F, // C0, C1: 0x21, 0x00, 0x0F, 0x30, 0x0F, 0x00, // "DIV" in 2 chars indicate "divider" - 0x3E, 0x09, 0x3E, 0x00, 0x3F, 0x06, // C2, D3: + 0x3E, 0x09, 0x3E, 0x00, 0x3F, 0x06, // C2, C3: 0x3F, 0x00, 0x3F, 0x20, 0x20, 0x00, // "AML" in 2 chars - }; // clang-format on From 6e3b6b09145f93fa451ff1e67f5e635817e2d0c9 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Tue, 16 Apr 2024 14:08:33 +0900 Subject: [PATCH 5/6] add keycodes of scroll snap related, to all keymaps --- .../keyboards/keyball/keyball39/keymaps/default/keymap.c | 4 ++-- .../keyboards/keyball/keyball39/keymaps/via/keymap.c | 4 ++-- .../keyboards/keyball/keyball44/keymaps/default/keymap.c | 8 ++++---- .../keyboards/keyball/keyball44/keymaps/via/keymap.c | 6 +++--- .../keyboards/keyball/keyball46/keymaps/default/keymap.c | 4 ++-- .../keyboards/keyball/keyball46/keymaps/via/keymap.c | 4 ++-- .../keyboards/keyball/keyball46/keymaps/via_Both/keymap.c | 4 ++-- .../keyboards/keyball/keyball46/keymaps/via_Left/keymap.c | 4 ++-- .../keyboards/keyball/keyball61/keymaps/default/keymap.c | 6 +++--- .../keyboards/keyball/keyball61/keymaps/via/keymap.c | 6 +++--- .../keyboards/keyball/one47/keymaps/default/keymap.c | 6 +++--- qmk_firmware/keyboards/keyball/one47/keymaps/via/keymap.c | 6 +++--- 12 files changed, 31 insertions(+), 31 deletions(-) diff --git a/qmk_firmware/keyboards/keyball/keyball39/keymaps/default/keymap.c b/qmk_firmware/keyboards/keyball/keyball39/keymaps/default/keymap.c index a93673b30..ebc396758 100644 --- a/qmk_firmware/keyboards/keyball/keyball39/keymaps/default/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball39/keymaps/default/keymap.c @@ -45,8 +45,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [3] = LAYOUT_universal( - RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , SCRL_DVI , RGB_M_K , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , + RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , _______ , SSNP_HOR , SSNP_VRT , SSNP_FRE , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , SCRL_DVI , _______ , _______ , _______ , _______ , _______ , RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , SCRL_DVD , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , QK_BOOT , KBC_RST , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KBC_RST , QK_BOOT ), diff --git a/qmk_firmware/keyboards/keyball/keyball39/keymaps/via/keymap.c b/qmk_firmware/keyboards/keyball/keyball39/keymaps/via/keymap.c index 30cf6079f..b3addae35 100644 --- a/qmk_firmware/keyboards/keyball/keyball39/keymaps/via/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball39/keymaps/via/keymap.c @@ -45,8 +45,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [3] = LAYOUT_universal( - RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , RGB_M_P , RGB_M_B , RGB_M_R , RGB_M_SW , RGB_M_SN , - RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , SCRL_DVI , RGB_M_K , RGB_M_X , RGB_M_G , RGB_M_T , RGB_M_TW , + RGB_TOG , AML_TO , AML_I50 , AML_D50 , _______ , _______ , _______ , SSNP_HOR , SSNP_VRT , SSNP_FRE , + RGB_MOD , RGB_HUI , RGB_SAI , RGB_VAI , SCRL_DVI , _______ , _______ , _______ , _______ , _______ , RGB_RMOD , RGB_HUD , RGB_SAD , RGB_VAD , SCRL_DVD , CPI_D1K , CPI_D100 , CPI_I100 , CPI_I1K , KBC_SAVE , QK_BOOT , KBC_RST , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KBC_RST , QK_BOOT ), diff --git a/qmk_firmware/keyboards/keyball/keyball44/keymaps/default/keymap.c b/qmk_firmware/keyboards/keyball/keyball44/keymaps/default/keymap.c index a705dd370..9446f052d 100644 --- a/qmk_firmware/keyboards/keyball/keyball44/keymaps/default/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball44/keymaps/default/keymap.c @@ -27,13 +27,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_DEL , KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , S(KC_7) , KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_INT1 , - KC_LALT,KC_LGUI,LCTL_T(KC_LNG2) ,LT(1,KC_SPC),LT(3,KC_LNG2), KC_BSPC,LT(2,KC_ENT), RCTL_T(KC_LNG2), KC_RALT , KC_PSCR + KC_LALT,KC_LGUI,LCTL_T(KC_LNG2) ,LT(1,KC_SPC),LT(3,KC_LNG1), KC_BSPC,LT(2,KC_ENT), RCTL_T(KC_LNG2), KC_RALT , KC_PSCR ), [1] = LAYOUT_universal( - _______ , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - _______ , _______ , _______ , KC_UP , KC_ENT , KC_DEL , KC_PGUP , KC_BTN1 , KC_UP , KC_BTN2 , KC_BTN3 , KC_F12 , - _______ , _______ , KC_LEFT , KC_DOWN , KC_RGHT , KC_BSPC , KC_PGDN , KC_LEFT , KC_DOWN , KC_RGHT , _______ , _______ , + SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + SSNP_VRT , _______ , _______ , KC_UP , KC_ENT , KC_DEL , KC_PGUP , KC_BTN1 , KC_UP , KC_BTN2 , KC_BTN3 , KC_F12 , + SSNP_HOR , _______ , KC_LEFT , KC_DOWN , KC_RGHT , KC_BSPC , KC_PGDN , KC_LEFT , KC_DOWN , KC_RGHT , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), diff --git a/qmk_firmware/keyboards/keyball/keyball44/keymaps/via/keymap.c b/qmk_firmware/keyboards/keyball/keyball44/keymaps/via/keymap.c index b824d99e3..09fe5374f 100644 --- a/qmk_firmware/keyboards/keyball/keyball44/keymaps/via/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball44/keymaps/via/keymap.c @@ -31,9 +31,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT_universal( - _______ , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - _______ , _______ , _______ , KC_UP , KC_ENT , KC_DEL , KC_PGUP , KC_BTN1 , KC_UP , KC_BTN2 , KC_BTN3 , KC_F12 , - _______ , _______ , KC_LEFT , KC_DOWN , KC_RGHT , KC_BSPC , KC_PGDN , KC_LEFT , KC_DOWN , KC_RGHT , _______ , _______ , + SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + SSNP_VRT , _______ , _______ , KC_UP , KC_ENT , KC_DEL , KC_PGUP , KC_BTN1 , KC_UP , KC_BTN2 , KC_BTN3 , KC_F12 , + SSNP_HOR , _______ , KC_LEFT , KC_DOWN , KC_RGHT , KC_BSPC , KC_PGDN , KC_LEFT , KC_DOWN , KC_RGHT , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), diff --git a/qmk_firmware/keyboards/keyball/keyball46/keymaps/default/keymap.c b/qmk_firmware/keyboards/keyball/keyball46/keymaps/default/keymap.c index afbb3973e..98b1bc619 100644 --- a/qmk_firmware/keyboards/keyball/keyball46/keymaps/default/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball46/keymaps/default/keymap.c @@ -86,9 +86,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BALL] = LAYOUT_right_ball( //,-----------------------------------------------------. ,-----------------------------------------------------. - RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, RGB_M_P, RGB_M_B, RGB_M_R,RGB_M_SW,RGB_M_SN, RGB_M_K, + RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, _______, _______, _______,SSNP_HOR,SSNP_VRT,SSNP_FRE, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, RGB_M_X, RGB_M_G, RGB_M_T,RGB_M_TW, _______, _______, + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, CPI_D1K,CPI_D100,CPI_I100, CPI_I1K,KBC_SAVE, //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| diff --git a/qmk_firmware/keyboards/keyball/keyball46/keymaps/via/keymap.c b/qmk_firmware/keyboards/keyball/keyball46/keymaps/via/keymap.c index afbb3973e..98b1bc619 100644 --- a/qmk_firmware/keyboards/keyball/keyball46/keymaps/via/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball46/keymaps/via/keymap.c @@ -86,9 +86,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BALL] = LAYOUT_right_ball( //,-----------------------------------------------------. ,-----------------------------------------------------. - RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, RGB_M_P, RGB_M_B, RGB_M_R,RGB_M_SW,RGB_M_SN, RGB_M_K, + RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, _______, _______, _______,SSNP_HOR,SSNP_VRT,SSNP_FRE, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, RGB_M_X, RGB_M_G, RGB_M_T,RGB_M_TW, _______, _______, + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------' |--------+--------+--------+--------+--------+--------| RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, CPI_D1K,CPI_D100,CPI_I100, CPI_I1K,KBC_SAVE, //|--------+--------+--------+--------+--------+-------+--------. `--------+--------+--------+--------+--------+--------| diff --git a/qmk_firmware/keyboards/keyball/keyball46/keymaps/via_Both/keymap.c b/qmk_firmware/keyboards/keyball/keyball46/keymaps/via_Both/keymap.c index 2686f5202..0c5f3621d 100644 --- a/qmk_firmware/keyboards/keyball/keyball46/keymaps/via_Both/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball46/keymaps/via_Both/keymap.c @@ -86,9 +86,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BALL] = LAYOUT_double_balls( //,-----------------------------------------------------. ,-----------------------------------------------------. - RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, RGB_M_P, RGB_M_B, RGB_M_R,RGB_M_SW,RGB_M_SN, RGB_M_K, + RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, _______, _______, _______,SSNP_HOR,SSNP_VRT,SSNP_FRE, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, RGB_M_X, RGB_M_G, RGB_M_T,RGB_M_TW, _______, _______, + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, CPI_D1K,CPI_D100,CPI_I100, CPI_I1K,KBC_SAVE, //|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| diff --git a/qmk_firmware/keyboards/keyball/keyball46/keymaps/via_Left/keymap.c b/qmk_firmware/keyboards/keyball/keyball46/keymaps/via_Left/keymap.c index a95bf80ce..e32244bba 100644 --- a/qmk_firmware/keyboards/keyball/keyball46/keymaps/via_Left/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball46/keymaps/via_Left/keymap.c @@ -86,9 +86,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BALL] = LAYOUT_left_ball( //,-----------------------------------------------------. ,-----------------------------------------------------. - RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, RGB_M_P, RGB_M_B, RGB_M_R,RGB_M_SW,RGB_M_SN, RGB_M_K, + RGB_TOG, AML_TO , AML_I50, AML_D50, _______, _______, _______, _______, _______,SSNP_HOR,SSNP_VRT,SSNP_FRE, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, RGB_M_X, RGB_M_G, RGB_M_T,RGB_M_TW, _______, _______, + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| `--------+--------+--------+--------+--------+--------| RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, CPI_D1K,CPI_D100,CPI_I100, CPI_I1K,KBC_SAVE, //|--------+--------+--------+--------+--------+--------' ,--------+-------+--------+--------+--------+--------+--------| diff --git a/qmk_firmware/keyboards/keyball/keyball61/keymaps/default/keymap.c b/qmk_firmware/keyboards/keyball/keyball61/keymaps/default/keymap.c index 5f2d2ff58..2a42e4fb5 100644 --- a/qmk_firmware/keyboards/keyball/keyball61/keymaps/default/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball61/keymaps/default/keymap.c @@ -39,9 +39,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [2] = LAYOUT_universal( - _______ , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - _______ , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , KC_F12 , - _______ , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , + SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + SSNP_VRT , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , KC_F12 , + SSNP_HOR , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , _______ , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______ , _______ ), diff --git a/qmk_firmware/keyboards/keyball/keyball61/keymaps/via/keymap.c b/qmk_firmware/keyboards/keyball/keyball61/keymaps/via/keymap.c index 5f2d2ff58..2a42e4fb5 100644 --- a/qmk_firmware/keyboards/keyball/keyball61/keymaps/via/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball61/keymaps/via/keymap.c @@ -39,9 +39,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [2] = LAYOUT_universal( - _______ , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - _______ , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , KC_F12 , - _______ , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , + SSNP_FRE , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + SSNP_VRT , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , KC_F12 , + SSNP_HOR , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , _______ , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ , _______ , _______ , _______ , _______ ), diff --git a/qmk_firmware/keyboards/keyball/one47/keymaps/default/keymap.c b/qmk_firmware/keyboards/keyball/one47/keymaps/default/keymap.c index 9fd7bdd02..94102e524 100644 --- a/qmk_firmware/keyboards/keyball/one47/keymaps/default/keymap.c +++ b/qmk_firmware/keyboards/keyball/one47/keymaps/default/keymap.c @@ -37,9 +37,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [2] = LAYOUT_right_ball( - _______ , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , _______ , - _______ , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , - _______ , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , + SSNP_FRE , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , _______ , + SSNP_VRT , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , + SSNP_HOR , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ ), diff --git a/qmk_firmware/keyboards/keyball/one47/keymaps/via/keymap.c b/qmk_firmware/keyboards/keyball/one47/keymaps/via/keymap.c index 9fd7bdd02..94102e524 100644 --- a/qmk_firmware/keyboards/keyball/one47/keymaps/via/keymap.c +++ b/qmk_firmware/keyboards/keyball/one47/keymaps/via/keymap.c @@ -37,9 +37,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [2] = LAYOUT_right_ball( - _______ , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , _______ , - _______ , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , - _______ , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , + SSNP_FRE , _______ , KC_7 , KC_8 , KC_9 , _______ , _______ , KC_LEFT , KC_UP , KC_RGHT , _______ , _______ , + SSNP_VRT , _______ , KC_4 , KC_5 , KC_6 ,S(KC_SCLN), KC_PGUP , KC_BTN1 , KC_DOWN , KC_BTN2 , KC_BTN3 , _______ , + SSNP_HOR , _______ , KC_1 , KC_2 , KC_3 ,S(KC_MINS), S(KC_8) , S(KC_9) , KC_PGDN , _______ , _______ , _______ , _______ , _______ , _______ , KC_0 , KC_DOT , _______ , _______ , _______ , KC_DEL , _______ , _______ ), From b62260b1f0630995815081d2413c4f0014a6e144 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Tue, 16 Apr 2024 14:28:28 +0900 Subject: [PATCH 6/6] document about scroll snap mode --- .../keyboards/keyball/lib/keyball/README.md | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/README.md b/qmk_firmware/keyboards/keyball/lib/keyball/README.md index 75c42f2d2..0c54427a9 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/README.md +++ b/qmk_firmware/keyboards/keyball/lib/keyball/README.md @@ -2,7 +2,22 @@ ## Scroll snap mode -TODO +When scrolling with the trackball, the scroll direction is restricted. +This restriction is called "scroll snap". + +The direction of restriction can be changed using special key codes. +You can also release this restriction. +It is called as "scroll snap mode" +The current mode is displayed on the OLED. + +There are 3 modes for scroll snap. + +1. Vertical (default): key code is `SSNP_VRT`, indicated as `VT`. +2. Horizontal: key code is `SSNP_HOR`, indicated as `HO`. +3. Free: key code is `SSNP_FRE`, indicated as `SCR`. + +The scroll snap mode at startup is vertical, +but you can change it by saving the current mode with `KBC_SAVE` ## MEMO @@ -13,7 +28,7 @@ If you would like to read it in English, please request a translation via issue Of course you can translate it for us. If you translate it, please make pull requests to share it us. -## Scroll Snap Spec +### Scroll Snap Spec この機能は config.h に `#define KEYBALL_SCROLLSNAP_ENABLE 0` を書き加えることで無効化できる。 @@ -26,7 +41,7 @@ please make pull requests to share it us. 以上を `SSNP_VRT`, `SSNP_HOR`, `SSNP_FRE` の独自キーコードを用いて手動で切り替える。 -### up to 1.3.2 +#### up to 1.3.2 初期状態でトラックボールによるスクロールを垂直方向に制限(スナップ)している。 この振る舞いは config.h に `#define KEYBALL_SCROLLSNAP_ENABLE 1` を書き加えることで有効化できる。 @@ -48,7 +63,7 @@ please make pull requests to share it us. #define KEYBALL_SCROLLSNAP_RESET_TIMER 200 ``` -### History of Scroll Snap +#### History of Scroll Snap もともとは自由にスクロールできるようにしていた。 しかし思ったよりもボールの感度が高く一定方向だけに動かすのが難しく、 @@ -69,7 +84,7 @@ please make pull requests to share it us. 先の読み捨てにより、垂直方向のスクロールがワンテンポ遅れ、体験を大幅に損なうことが明らかになった。 この解決のためモード: 初期は垂直のみ、後に自由スクロールする、を導入した。 -## Scroll Divider / スクロール除数 +### Scroll Divider / スクロール除数 Keyballのセンサーは感度がとても高い。 そのため生の値をスクロール量としてしまうとスクロール操作がとても難しくなった。 @@ -89,7 +104,7 @@ $n$ の初期値は 4 で 1/8 になることを意味する。 この値は config.h で `KEYBALL_SCROLL_DIV_DEFAULT` マクロを定義することで変更できる。 これを0にすることは考慮していないので設定しないこと。 -## Scroll Inhivitor +### Scroll Inhivitor トラックボールの移動量をポインタに適用するかスクロールに適用するか、 Keyballは内部にスクロールモードという名のモードで管理している。