Saturday 31 July 2021

QMK MSYS new update encoder problem

referring to this

https://githubmemory.com/repo/nullbitsco/tidbit/issues/8


override to bool encoder_update_user(uint8_t index, bool clockwise) and adding a return true; at the end of the function work?

edit was able to successfully compile and flash the firmware after changing function definition in keymap.c

 

 

 

 

//

second thing was the define keymap to define layout at .h/.c i couldnt recall

Sunday 25 July 2021

VIAL encoder support for Reviung5

Reviung5 has just released in July 2021. Great that we make it produced and successfully flashed with vial. As reviung5 is not officially ready in via yet, now it is auto-detected in VIAL while rotary encoder is programmable through VIAL!


Saturday 24 July 2021

To reduce the firmware of sofle rgb

 This is for testing purpose 

by referring to the following link: https://thomasbaart.nl/2018/12/01/reducing-firmware-size-in-qmk/ 

Step 1: Add these flags to your rules.mk

 EXTRAFLAGS += -flto

 Add these to config.h

#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION

 //Does not work in reducing original rgb version 

 

Step 2:  Add the following codes for config.h

 #ifndef NO_DEBUG

#define NO_DEBUG
#endif // !NO_DEBUG
#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
#define NO_PRINT
#endif // !NO_PRINT

 

 

 

 

 

 

BlueMicro nRF52: Tap/Hold for Layers

Tap for single key, hold to access layer

 1. Add new folder under Keymaps "tapholdlayer"

2. Copy keymap.cpp and keymap.h (from spacecadet)

3. Create a new set of keymap as format below. layer1, tap, hold...change accordingly.



void setupKeymap() {

    uint32_t press[MATRIX_ROWS][MATRIX_COLS] =
        KEYMAP( \
  KC_GRAVE,KC_1,    KC_2,    KC_3,    KC_4,   KC_5, KC_UNDS,  \
  KC_DEL  ,KC_F1  ,KC_F2  ,KC_F3  ,KC_F4  ,KC_F5  , KC_LCBR,   \
  KC_LSFT ,KC_F7  ,KC_F8  ,KC_F9  ,KC_F10 ,KC_F11 , KC_SPC,  \
  KC_LCTL , KC_LGUI, KC_LALT, LAYER_3, LAYER_1, KC_SPC,_______ \
);


uint32_t layer1[MATRIX_ROWS][MATRIX_COLS] =
        KEYMAP( \
  KC_GRAVE,KC_1,    KC_2,    KC_3,    KC_4,   KC_5, KC_UNDS,  \
  KC_DEL  ,KC_F1  ,KC_F2  ,KC_F3  ,KC_F4  ,KC_F5  , KC_LCBR,   \
  LAYER_1 ,KC_F7  ,KC_F8  ,KC_F9  ,KC_F10 ,KC_F11 , KC_SPC,  \
  KC_LCTL , KC_LGUI, KC_LALT, LAYER_3, LAYER_1, KC_SPC,_______ \
);
 
uint32_t tap[MATRIX_ROWS][MATRIX_COLS] =
        KEYMAP( \
  KC_GRAVE,KC_1,    KC_2,    KC_3,    KC_4,   KC_5, KC_UNDS,  \
  KC_DEL  ,KC_F1  ,KC_F2  ,KC_F3  ,KC_F4  ,KC_F5  , KC_LCBR,   \
  LAYER_1 ,KC_F7  ,KC_F8  ,KC_F9  ,KC_F10 ,KC_F11 , KC_SPC,  \
  KC_LCTL , KC_LGUI, KC_LALT, LAYER_3, LAYER_1, KC_SPC,_______ \
); 
 
uint32_t hold[MATRIX_ROWS][MATRIX_COLS] =
        KEYMAP( \
  KC_GRAVE,KC_1,    KC_2,    KC_3,    KC_4,   KC_5, KC_UNDS,  \
  KC_DEL  ,KC_F1  ,KC_F2  ,KC_F3  ,KC_F4  ,KC_F5  , KC_LCBR,   \
  LAYER_1 ,KC_F7  ,KC_F8  ,KC_F9  ,KC_F10 ,KC_F11 , KC_SPC,  \
  KC_LCTL , KC_LGUI, KC_LALT, LAYER_3, LAYER_1, KC_SPC,_______ \
); 
 
uint32_t singletap[MATRIX_ROWS][MATRIX_COLS] =
        KEYMAP( \
  KC_GRAVE,KC_1,    KC_2,    KC_3,    KC_4,   KC_5, KC_UNDS,  \
  KC_DEL  ,KC_F1  ,KC_F2  ,KC_F3  ,KC_F4  ,KC_F5  , KC_LCBR,   \
  LAYER_1 ,KC_F7  ,KC_F8  ,KC_F9  ,KC_F10 ,KC_F11 , KC_SPC,  \
  KC_LCTL , KC_LGUI, KC_LALT, LAYER_3, LAYER_1, KC_SPC,_______ \
); 
 
uint32_t doubletap[MATRIX_ROWS][MATRIX_COLS] =
        KEYMAP( \
  KC_GRAVE,KC_1,    KC_2,    KC_3,    KC_4,   KC_5, KC_UNDS,  \
  KC_DEL  ,KC_F1  ,KC_F2  ,KC_F3  ,KC_F4  ,KC_F5  , KC_LCBR,   \
  LAYER_1 ,KC_F7  ,KC_F8  ,KC_F9  ,KC_F10 ,KC_F11 , KC_SPC,  \
  KC_LCTL , KC_LGUI, KC_LALT, LAYER_3, LAYER_1, KC_SPC,_______ \
); 

 

 next part is:

do note the _L1/2/3/0, it is defined in keymap.h, eg. #define _QWERTY 0

4. change the following lines for new layers added for mod/tap

      /*
* add the other layers on the regular presses.
*/
for (int row = 0; row < MATRIX_ROWS; ++row)
{
for (int col = 0; col < MATRIX_COLS; ++col)
{
//Method::Press Standard keypress
//Method::MT_TAP This key is sent once when the key is tapped.
//Method::MT_HOLD This key is sent once when the key is held.
//Method::DT_TAP This key is sent once when the key is tapped.
//Method::DT_DOUBLETAP This key is sent once when the key is tapped twice.
matrix[row][col].addActivation(_QWERTY, Method::MT_TAP, tap[row][col]);
matrix[row][col].addActivation(_QWERTY, Method::MT_HOLD, hold[row][col]);
matrix[row][col].addActivation(_L1, Method::PRESS, layer1[row][col]);
}
}

Monday 19 July 2021

VIAL new update 0.4

#always credit to Cheah Alec for helping out

Prepare json layout

the original info.json layout needs to be modified. 

Draw your layout and keys arragenment here in keyboard-layout-editor.com

http://www.keyboard-layout-editor.com

a) download the json file, copy the keymap portion

b) copy raw data, paste to https://kbfirmware.com/, check wiring, showing rows and columns matrix


b) matrix check from config h. 

#define MATRIX_ROWS 7
#define MATRIX_COLS 6

 using two info above to change your info.json (copy to /vial folder), rename to vial.json. 

looks something like this:

 {
    "keyboard_name": "reviung41",
    "url": "",
    "maintainer": "gtips",
    "width": 13,
    "height": 4.54,
"matrix": {
    "rows": 5,
    "cols": 14

},
    "layouts": {
        "LAYOUT_reviung41": {
            "key_count": 41,
            "layout": [
                {"label":"K00", "x":0, "y":0.54},
                {"label":"K01", "x":1, "y":0.36},
                {"label":"K02", "x":2, "y":0.18},

            ....

            ]
    },
"keymap":   [
    {
      "rx": 1,
      "y": 4.85,
      "x": 5.25,
      "w": 2

    },
    "6,2"
  ],

...    }
}


mousekey issue inspired from discord

In vial-qmk\quantum\qmk_settings.c this segment:

static void mousekey_apply(void) {
    mk_delay = QS.mousekey_delay / 10;
    mk_interval = QS.mousekey_interval;
    mk_max_speed = QS.mousekey_max_speed;
    mk_time_to_max = QS.mousekey_time_to_max;
    mk_wheel_delay = QS.mousekey_wheel_delay / 10;
    mk_wheel_interval    = QS.mousekey_wheel_interval;
    mk_wheel_max_speed   = QS.mousekey_wheel_max_speed;
    mk_wheel_time_to_max = QS.mousekey_wheel_time_to_max;
}
is causing issues
Made the following change and it works to fix it for now:
#ifdef MOUSEKEY_ENABLE
    static void mousekey_apply(void) {
        mk_delay = QS.mousekey_delay / 10;
        mk_interval = QS.mousekey_interval;
        mk_max_speed = QS.mousekey_max_speed;
        mk_time_to_max = QS.mousekey_time_to_max;
        mk_wheel_delay = QS.mousekey_wheel_delay / 10;
        mk_wheel_interval    = QS.mousekey_wheel_interval;
        mk_wheel_max_speed   = QS.mousekey_wheel_max_speed;
        mk_wheel_time_to_max = QS.mousekey_wheel_time_to_max;
    }
#endif

static const qmk_settings_proto_t protos[] PROGMEM = {
   DECLARE_SETTING(1, grave_esc_override),
   DECLARE_SETTING(2, combo_term),
   DECLARE_SETTING(3, auto_shift),
   DECLARE_SETTING_CB(4, auto_shift_timeout, auto_shift_timeout_apply),
   DECLARE_SETTING(5, osk_tap_toggle),
   DECLARE_SETTING(6, osk_timeout),
   DECLARE_SETTING(7, tapping_term),
   DECLARE_SETTING(8, tapping),
   #ifdef MOUSEKEY_ENABLE
    DECLARE_SETTING_CB(9, mousekey_delay, mousekey_apply),
    DECLARE_SETTING_CB(10, mousekey_interval, mousekey_apply),
    DECLARE_SETTING_CB(11, mousekey_move_delta, mousekey_apply),
    DECLARE_SETTING_CB(12, mousekey_max_speed, mousekey_apply),
    DECLARE_SETTING_CB(13, mousekey_time_to_max, mousekey_apply),
    DECLARE_SETTING_CB(14, mousekey_wheel_delay, mousekey_apply),
    DECLARE_SETTING_CB(15, mousekey_wheel_interval, mousekey_apply),
    DECLARE_SETTING_CB(16, mousekey_wheel_max_speed, mousekey_apply),
    DECLARE_SETTING_CB(17, mousekey_wheel_time_to_max, mousekey_apply),
   #endif
   DECLARE_SETTING(18, tap_code_delay),
   DECLARE_SETTING(19, tap_hold_caps_delay),
};


  



Finally! Thanks again for Alec.

Also keep referring and studying the old messages in vial.