From 1e12e6ee3a60d0a4b417c2e695749523ae0282cf Mon Sep 17 00:00:00 2001 From: Kei Kamikawa Date: Sun, 12 May 2024 22:14:22 +0900 Subject: [PATCH 1/3] imported scroll snap methods https://github.com/Yowkees/keyball/pull/560 --- .../keyball/keyball61/keymaps/bmp/keymap.c | 1 + .../keyboards/keyball/lib/keyball/keyball.c | 164 +++++++++++++----- .../keyboards/keyball/lib/keyball/keyball.h | 81 ++++++++- .../keyboards/keyball/lib/logofont/logofont.c | 2 +- 4 files changed, 192 insertions(+), 56 deletions(-) diff --git a/qmk_firmware/keyboards/keyball/keyball61/keymaps/bmp/keymap.c b/qmk_firmware/keyboards/keyball/keyball61/keymaps/bmp/keymap.c index 746eda991..cf1ab0662 100644 --- a/qmk_firmware/keyboards/keyball/keyball61/keymaps/bmp/keymap.c +++ b/qmk_firmware/keyboards/keyball/keyball61/keymaps/bmp/keymap.c @@ -34,6 +34,7 @@ const key_string_map_t custom_keys_user = { "CPI_I100\0CPI_D100\0CPI_I1K\0CPI_D1K\0" "SCRL_TO\0SCRL_MO\0SCRL_DVI\0SCRL_DVD\0" "AML_TO\0AML_I50\0AML_D50\0" + "SSNP_VRT\0SSNP_HOR\0SSNP_FRE\0" "LOWER\0RAISE\0" }; diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c index 01def2d4c..2355219c6 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c @@ -85,6 +85,40 @@ static inline int8_t clip2int8(int16_t v) { return (v) < -127 ? -127 : (v) > 127 ? 127 : (int8_t)v; } +#ifdef OLED_ENABLE +static const char *format_4d(int8_t d) { + static char buf[5] = {0}; // max width (4) + NUL (1) + char lead = ' '; + if (d < 0) { + d = -d; + lead = '-'; + } + buf[3] = (d % 10) + '0'; + d /= 10; + if (d == 0) { + buf[2] = lead; + lead = ' '; + } else { + buf[2] = (d % 10) + '0'; + d /= 10; + } + if (d == 0) { + buf[1] = lead; + lead = ' '; + } else { + buf[1] = (d % 10) + '0'; + d /= 10; + } + buf[0] = lead; + return buf; +} + +static char to_1x(uint8_t x) { + x &= 0x0f; + return x < 10 ? x + '0' : x + 'a' - 10; +} +#endif + static void add_cpi(int8_t delta) { int16_t v = keyball_get_cpi() + delta; keyball_set_cpi(v < 1 ? 1 : v); @@ -131,7 +165,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); @@ -150,7 +184,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); @@ -171,8 +205,9 @@ static void motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool # error("unknown Keyball model") #endif -#if KEYBALL_SCROLLSNAP_ENABLE - // scroll snap. + // Scroll snapping +#if KEYBALL_SCROLLSNAP_ENABLE == 1 + // Old behavior up to 1.3.2) uint32_t now = timer_read32(); if (r->h != 0 || r->v != 0) { keyball.scroll_snap_last = now; @@ -183,14 +218,27 @@ static void motion_to_mouse_scroll(keyball_motion_t *m, report_mouse_t *r, bool keyball.scroll_snap_tension_h += y; r->h = 0; } +#elif KEYBALL_SCROLLSNAP_ENABLE == 2 + // New behavior + switch (keyball_get_scrollsnap_mode()) { + case KEYBALL_SCROLLSNAP_MODE_VERTICAL: + r->h = 0; + break; + case KEYBALL_SCROLLSNAP_MODE_HORIZONTAL: + r->v = 0; + break; + default: + // pass by without doing anything + break; + } #endif } 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); } } @@ -339,50 +387,16 @@ const char PROGMEM code_to_name[] = { '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', }; - -static char to_1x(uint8_t x) { - x &= 0x0f; - return x < 10 ? x + '0' : x + 'a' - 10; -} - -static const char *format_4d(int8_t d) { - static char buf[5] = {0}; // max width (4) + NUL (1) - char lead = ' '; - if (d < 0) { - d = -d; - lead = '-'; - } - buf[3] = (d % 10) + '0'; - d /= 10; - if (d == 0) { - buf[2] = lead; - lead = ' '; - } else { - buf[2] = (d % 10) + '0'; - d /= 10; - } - if (d == 0) { - buf[1] = lead; - lead = ' '; - } else { - buf[1] = (d % 10) + '0'; - d /= 10; - } - buf[0] = lead; - return buf; -} // clang-format on #endif void keyball_oled_render_ballinfo(void) { #ifdef OLED_ENABLE // Format: `Ball:{mouse x}{mouse y}{mouse h}{mouse v}` - // ` CPI{CPI} S{SCROLL_MODE} D{SCROLL_DIV}` // // Output example: // // Ball: -12 34 0 0 - // // 1st line, "Ball" label, mouse x, y, h, and v. oled_write_P(PSTR("Ball\xB1"), false); @@ -396,8 +410,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 { @@ -412,15 +441,18 @@ void keyball_oled_render_ballinfo(void) { void keyball_oled_render_keyinfo(void) { #ifdef OLED_ENABLE - // Format: `Key : R{row} C{col} K{kc} '{name}` + // Format: `Key : R{row} C{col} K{kc} {name}{name}{name}` // // Where `kc` is lower 8 bit of keycode. - // Where `name` is readable label for `kc`, valid between 4 and 56. + // Where `name`s are readable labels for pressing keys, valid between 4 and 56. + // + // `row`, `col`, and `kc` indicates the last processed key, + // but `name`s indicate unreleased keys in best effort. // // It is aligned to fit with output of keyball_oled_render_ballinfo(). // For example: // - // Key : R2 C3 K06 'c + // Key : R2 C3 K06 abc // Ball: 0 0 0 0 // "Key" Label @@ -487,6 +519,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; } @@ -495,11 +541,11 @@ void keyball_set_scroll_div(uint8_t div) { keyball.scroll_div = div > SCROLL_DIV_MAX ? SCROLL_DIV_MAX : div; } -uint16_t keyball_get_cpi(void) { +uint8_t keyball_get_cpi(void) { return keyball.cpi_value == 0 ? CPI_DEFAULT : keyball.cpi_value; } -void keyball_set_cpi(uint16_t cpi) { +void keyball_set_cpi(uint8_t cpi) { if (cpi > CPI_MAX) { cpi = CPI_MAX; } @@ -531,6 +577,9 @@ 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_set_scrollsnap_mode(c.ssnap); #endif } @@ -626,11 +675,22 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) case KBC_RST: keyball_set_cpi(0); keyball_set_scroll_div(0); +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE + set_auto_mouse_enable(false); + set_auto_mouse_timeout(AUTO_MOUSE_TIME); +#endif break; case KBC_SAVE: { keyball_config_t c = { .cpi = keyball.cpi_value, .sdiv = keyball.scroll_div, +#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); } break; @@ -658,6 +718,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_VRT: + 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 c64e1a637..7a1540df9 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.h @@ -54,8 +54,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 @@ -119,6 +120,10 @@ enum keyball_keycodes { AML_I50, // Increment automatic mouse layer timeout AML_D50, // Decrement automatic mouse layer timeout + SSNP_VRT, // Set scroll snap mode as vertical + SSNP_HOR, // Set scroll snap mode as horizontal + SSNP_FRE, // Set scroll snap mode as disable (free scroll) + KEYBALL_SAFE_RANGE, }; @@ -130,6 +135,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; @@ -145,6 +153,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; @@ -160,9 +174,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; report_mouse_t last_mouse; @@ -182,6 +199,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 @@ -204,17 +237,47 @@ 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); + +/// keyball_set_scrollsnap_mode change scroll snap mode. +void keyball_set_scrollsnap_mode(keyball_scrollsnap_mode_t mode); + +/// 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 -uint16_t keyball_get_cpi(void); - -// TODO: document -void keyball_set_cpi(uint16_t cpi); +/// 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); + +/// 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); void pointing_device_driver_init(void); diff --git a/qmk_firmware/keyboards/keyball/lib/logofont/logofont.c b/qmk_firmware/keyboards/keyball/lib/logofont/logofont.c index 9279c1726..7e3b26eeb 100644 --- a/qmk_firmware/keyboards/keyball/lib/logofont/logofont.c +++ b/qmk_firmware/keyboards/keyball/lib/logofont/logofont.c @@ -195,7 +195,7 @@ const unsigned char font[] PROGMEM = { // 0xC0 0x7F, 0x41, 0x3E, 0x00, 0x41, 0x7F, // C0, C1: 0x41, 0x00, 0x1F, 0x60, 0x1F, 0x00, // "DIV" in 2 chars indicate "divider" - 0x7E, 0x09, 0x7E, 0x00, 0x7F, 0x06, // C2, D3: + 0x7E, 0x09, 0x7E, 0x00, 0x7F, 0x06, // C2, C3: 0x7F, 0x00, 0x7F, 0x40, 0x40, 0x00, // "AML" in 2 chars #if 0 From 9243531f03bc9fc28ef2b75277d7e7ebe3815eaf Mon Sep 17 00:00:00 2001 From: Kei Kamikawa Date: Sun, 12 May 2024 23:18:22 +0900 Subject: [PATCH 2/3] fixed README --- README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d95061d15..d05781489 100644 --- a/README.md +++ b/README.md @@ -67,12 +67,18 @@ You should make keymap on https://sekigon-gonnoc.github.io/qmk_configurator Using `./layouts/KEYMAP.JSN` file as a base will likely make configuration easier. +It is recommended to use tools like [jq](https://jqlang.github.io/jq/) to compact `KEYMAP.JSN`. This is a tip for saving Flash memory capacity on the BLE Micro Pro. For example, if you want to compact JSON edited based on `layouts/KEYMAP.JSN.base`, execute the following command: + +```console +$ cat layouts/KEYMAP.JSN.base | jq . -c > layouts/KEYMAP.JSN +``` + ## Special keycodes Value | Keycode |Description ---------|------------|------------------------------------------------------------------ -`0x5D62` | `KBC_RST` | Reset Keyball configuration -`0x5D63` | `KBC_SAVE` | Persist Keyball configuration to EEPROM +`0x5D62` | `KBC_RST` | Reset Keyball configuration[^1] +`0x5D63` | `KBC_SAVE` | Persist Keyball configuration[^1] to EEPROM `0x5D64` | `CPI_I100` | Increase 100 CPI (max 12000) `0x5D65` | `CPI_D100` | Decrease 100 CPI (min 100) `0x5D66` | `CPI_I1K` | Increase 1000 CPI (max 12000) @@ -82,7 +88,10 @@ Value | Keycode |Description `0x5D6A` | `SCRL_DVI` | Increase scroll divider (max 7 = 1/128) `0x5D6B` | `SCRL_DVD` | Decrease scroll divider (min 0 = 1/1) `0x5D6C` | `AML_TO` | Toggle automatic mouse layer -`0x5D6D` | `AML_I50` | Increase 50ms automatic mouse layer timeout(max 15=950ms) -`0x5D6E` | `AML_D50` | Decrease 50ms automatic mouse layer timeout(min 1=250ms) +`0x5D6D` | `AML_I50` | Increase 50ms automatic mouse layer timeout(max 1000ms) +`0x5D6E` | `AML_D50` | Decrease 50ms automatic mouse layer timeout(min 100ms) +`0x5D6F` | `SSNP_VRT` | Set scroll snap mode as vertical +`0x5d70` | `SSNP_HOR` | Set scroll snap mode as horizontal +`0x5d71` | `SSNP_FRE` | Set scroll snap mode as disable (free scroll) -*NOTE*: The values are for Remap +[^1]: CPI, scroll divider, automatic mouse layer's enable/disable, and automatic mouse layer's timeout. From 98a8013ecaf222da5647f9059ea1014f29ff4a0f Mon Sep 17 00:00:00 2001 From: Kei Kamikawa Date: Sun, 12 May 2024 23:22:05 +0900 Subject: [PATCH 3/3] updated KEYMAP.JSN --- layouts/KEYMAP.JSN | 2 +- layouts/KEYMAP.JSN.base | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/KEYMAP.JSN b/layouts/KEYMAP.JSN index 5e74c7fbd..3249d58b3 100644 --- a/layouts/KEYMAP.JSN +++ b/layouts/KEYMAP.JSN @@ -1 +1 @@ -{"keyboard":"Keyball61","keymap":"keyball61_layout_default","layout":"LAYOUT","layers":[["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_DEL","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_INT3","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)","MO(1)","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_RBRC","KC_NUHS","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","TG(3)","KC_LCTL","KC_LALT","KC_LGUI","LT(1,KC_LANG2)","LT(2,KC_SPC)","LT(3,KC_LANG1)","KC_BSPC","LT(2,KC_ENT)","KC_RALT","KC_PSCR"],["S(KC_ESC)","S(KC_1)","KC_LBRC","S(KC_3)","S(KC_4)","S(KC_5)","KC_EQL","S(KC_6)","S(KC_QUOT)","S(KC_8)","S(KC_9)","S(KC_INT1)","S(KC_DEL)","S(KC_Q)","S(KC_W)","S(KC_E)","S(KC_R)","S(KC_T)","S(KC_Y)","S(KC_U)","S(KC_I)","S(KC_O)","S(KC_P)","S(KC_INT3)","S(KC_TAB)","S(KC_A)","S(KC_S)","S(KC_D)","S(KC_F)","S(KC_G)","S(KC_H)","S(KC_J)","S(KC_K)","S(KC_L)","KC_QUOT","S(KC_2)","KC_NO","S(KC_Z)","S(KC_X)","S(KC_C)","S(KC_V)","S(KC_B)","S(KC_RBRC)","S(KC_NUHS)","S(KC_N)","S(KC_M)","S(KC_COMM)","S(KC_DOT)","S(KC_SLSH)","S(KC_RSFT)","KC_NO","S(KC_LCTL)","S(KC_LALT)","S(KC_LGUI)","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","S(KC_RALT)","KC_NO"],["KC_NO","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F11","KC_NO","KC_NO","KC_7","KC_8","KC_9","KC_NO","KC_NO","KC_LEFT","KC_UP","KC_RGHT","KC_NO","KC_F12","KC_NO","KC_NO","KC_4","KC_5","KC_6","S(KC_SCLN)","KC_PGUP","KC_BTN1","KC_DOWN","KC_BTN2","KC_BTN3","KC_NO","KC_NO","KC_NO","KC_1","KC_2","KC_3","S(KC_MINS)","S(KC_8)","S(KC_9)","KC_PGDN","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_0","KC_DOT","KC_NO","KC_NO","KC_NO","KC_DEL","KC_NO","KC_NO","KC_NO"],["RGB_TOG","AML_TO","AML_I50","AML_D50","KC_NO","KC_NO","RGB_M_P","RGB_M_B","RGB_M_R","RGB_M_SW","RGB_M_SN","RGB_M_K","RGB_MOD","RGB_HUI","RGB_SAI","RGB_VAI","KC_NO","KC_NO","RGB_M_X","RGB_M_G","RGB_M_T","RGB_M_TW","KC_NO","KC_NO","RGB_RMOD","RGB_HUD","RGB_SAD","RGB_VAD","KC_NO","KC_NO","CPI_D1K","CPI_D100","CPI_I100","CPI_I1K","KBC_SAVE","KBC_RST","KC_NO","KC_NO","SCRL_DVD","SCRL_DVI","SCRL_MO","SCRL_TO","EEP_RST","EEP_RST","KC_HOME","KC_PGDN","KC_PGUP","KC_END","KC_NO","KC_NO","KC_TRNS","KC_NO","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT","KC_NO","KC_NO","KC_BSPC","KC_NO","RESET"]],"author":"codehex","notes":"This file has been generated by ChatGPT"} \ No newline at end of file +{"keyboard":"Keyball61","keymap":"keyball61_layout_default","layout":"LAYOUT","layers":[["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_DEL","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_INT3","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)","MO(1)","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_RBRC","KC_NUHS","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","TG(3)","KC_LCTL","KC_LALT","KC_LGUI","LT(1,KC_LANG2)","LT(2,KC_SPC)","LT(3,KC_LANG1)","KC_BSPC","LT(2,KC_ENT)","KC_RALT","KC_PSCR"],["S(KC_ESC)","S(KC_1)","KC_LBRC","S(KC_3)","S(KC_4)","S(KC_5)","KC_EQL","S(KC_6)","S(KC_QUOT)","S(KC_8)","S(KC_9)","S(KC_INT1)","S(KC_DEL)","S(KC_Q)","S(KC_W)","S(KC_E)","S(KC_R)","S(KC_T)","S(KC_Y)","S(KC_U)","S(KC_I)","S(KC_O)","S(KC_P)","S(KC_INT3)","S(KC_TAB)","S(KC_A)","S(KC_S)","S(KC_D)","S(KC_F)","S(KC_G)","S(KC_H)","S(KC_J)","S(KC_K)","S(KC_L)","KC_QUOT","S(KC_2)","KC_NO","S(KC_Z)","S(KC_X)","S(KC_C)","S(KC_V)","S(KC_B)","S(KC_RBRC)","S(KC_NUHS)","S(KC_N)","S(KC_M)","S(KC_COMM)","S(KC_DOT)","S(KC_SLSH)","S(KC_RSFT)","KC_NO","S(KC_LCTL)","S(KC_LALT)","S(KC_LGUI)","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","S(KC_RALT)","KC_NO"],["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_NO","KC_7","KC_8","KC_9","KC_NO","KC_NO","KC_LEFT","KC_UP","KC_RGHT","KC_NO","KC_F12","SSNP_HOR","KC_NO","KC_4","KC_5","KC_6","S(KC_SCLN)","KC_PGUP","KC_BTN1","KC_DOWN","KC_BTN2","KC_BTN3","KC_NO","KC_NO","KC_NO","KC_1","KC_2","KC_3","S(KC_MINS)","S(KC_8)","S(KC_9)","KC_PGDN","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_0","KC_DOT","KC_NO","KC_NO","KC_NO","KC_DEL","KC_NO","KC_NO","KC_NO"],["RGB_TOG","AML_TO","AML_I50","AML_D50","KC_NO","KC_NO","RGB_M_P","RGB_M_B","RGB_M_R","RGB_M_SW","RGB_M_SN","RGB_M_K","RGB_MOD","RGB_HUI","RGB_SAI","RGB_VAI","KC_NO","KC_NO","RGB_M_X","RGB_M_G","RGB_M_T","RGB_M_TW","KC_NO","KC_NO","RGB_RMOD","RGB_HUD","RGB_SAD","RGB_VAD","KC_NO","KC_NO","CPI_D1K","CPI_D100","CPI_I100","CPI_I1K","KBC_SAVE","KBC_RST","KC_NO","KC_NO","SCRL_DVD","SCRL_DVI","SCRL_MO","SCRL_TO","EEP_RST","EEP_RST","KC_HOME","KC_PGDN","KC_PGUP","KC_END","KC_NO","KC_NO","KC_TRNS","KC_NO","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT","KC_NO","KC_NO","KC_BSPC","KC_NO","RESET"]],"author":"codehex","notes":"This file has been generated by ChatGPT"} diff --git a/layouts/KEYMAP.JSN.base b/layouts/KEYMAP.JSN.base index 44abfaf36..296383010 100644 --- a/layouts/KEYMAP.JSN.base +++ b/layouts/KEYMAP.JSN.base @@ -18,9 +18,9 @@ "KC_NO" , "S(KC_LCTL)" , "S(KC_LALT)" , "S(KC_LGUI)" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "S(KC_RALT)" , "KC_NO" ], [ - "KC_NO" , "KC_F1" , "KC_F2" , "KC_F3" , "KC_F4" , "KC_F5" , "KC_F6" , "KC_F7" , "KC_F8" , "KC_F9" , "KC_F10" , "KC_F11" , - "KC_NO" , "KC_NO" , "KC_7" , "KC_8" , "KC_9" , "KC_NO" , "KC_NO" , "KC_LEFT" , "KC_UP" , "KC_RGHT" , "KC_NO" , "KC_F12" , - "KC_NO" , "KC_NO" , "KC_4" , "KC_5" , "KC_6" , "S(KC_SCLN)" , "KC_PGUP" , "KC_BTN1" , "KC_DOWN" , "KC_BTN2" , "KC_BTN3" , "KC_NO" , + "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_NO" , "KC_7" , "KC_8" , "KC_9" , "KC_NO" , "KC_NO" , "KC_LEFT" , "KC_UP" , "KC_RGHT" , "KC_NO" , "KC_F12" , + "SSNP_HOR" , "KC_NO" , "KC_4" , "KC_5" , "KC_6" , "S(KC_SCLN)" , "KC_PGUP" , "KC_BTN1" , "KC_DOWN" , "KC_BTN2" , "KC_BTN3" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_1" , "KC_2" , "KC_3" , "S(KC_MINS)" , "S(KC_8)" , "S(KC_9)" , "KC_PGDN" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_0" , "KC_DOT" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_DEL" , "KC_NO" , "KC_NO" , "KC_NO" ],