Git Product home page Git Product logo

Comments (10)

manna-harbour avatar manna-harbour commented on July 17, 2024 1

Planck has an irregular matrix on the bottom row, see https://github.com/qmk/qmk_firmware/blob/2538d341d828d04392898a9d3ce691bcd4a79e1f/keyboards/planck/rev6/rev6.h#L99

You would have to use #28 and supply your own custom bilateral_combinations_left() function.

For the future implementation (see #29) it would be nice to either use the keymap's rows / cols rather than those from the matrix (then something like BILATERAL_COMBINATIONS_COLS from #28 would be sufficient), or to specify the hand for each key with an array using the keymap layout.

from qmk_firmware.

manna-harbour avatar manna-harbour commented on July 17, 2024

Thanks for your report. I'll try building from your fork when I have a chance. It's possible something has changed upstream. If you'd like to do more testing, please try with the miryoku branch plus bilateral combinations only (i.e. without merging into qmk master) to see if that's the issue.

from qmk_firmware.

manna-harbour avatar manna-harbour commented on July 17, 2024

Can you confirm that this is with left hand mod-tap control? Also, can you specify you build command line?

from qmk_firmware.

Shredder avatar Shredder commented on July 17, 2024

Yes, I do have Ctrl mod-taps (in fact, also the other modifiers like in default Miryoku) on both sides (i.e., my left and right hands). Let me get back to you on the build command line.

from qmk_firmware.

urob avatar urob commented on July 17, 2024

I have the same problem, and in my case I could trace it down to the right half of the bottom row being treated as if it were on the left half. To give a bit more details, consider the following layout: image

Here, HOME_S is an alias to LCTL_T(KC_S). I have permissive_hold enabled, so nested taps of the opposite hand should immediately trigger the mod. For the KC_BSPC in the middle column, this works fine. However, for the one in the bottom row, the mod does not activate (when held less than the bilateral_combinations timeout.) If on the other hand, I nest the same bottom row KC_BSPC with the right hand control (HOME_E), everything works fine.

So (for now this just being a guess) I suspect that this means that the problem is caused by how the key matrix for the Planck is defined. Maybe it's more of a problem with the Planck than with bilateral combinations?

Shredder, can you confirm this behavior? That is, does Ctrl-backspace and Ctrl-delete work in your case with the right hand mod as well?

from qmk_firmware.

urob avatar urob commented on July 17, 2024

Here's a quick workaround, which disables BL for Planck's bottom row using the custom bilateral combinations commit by theol0403 (605ecc6)

urob@3ef7605#diff-6b5eecce5cfac61a489d60ddc296d779ee957cb48b677973f0e5ce069fab49fc

obviously this is just a quick fix for fellow planck users and no replacement for the more general solutions outlined by manna-harbour

edit: I got the exception for the bottom row wrong on my first commit. This is how it should look like: 2bc16f8

from qmk_firmware.

manna-harbour avatar manna-harbour commented on July 17, 2024

The general solution for an irregular matrix is probably to add a new layer to your keymap and populate with KC_L and KC_R as appropriate for each key position (and something else for keys that can be used with either hand, if adding that feature too), then use keymap_key_to_keycode() on that layer to lookup handedness for the key in question. That way the keyboard's own LAYOUT macro can be used to handle the matrix irregularities.

from qmk_firmware.

ZenghaoWang avatar ZenghaoWang commented on July 17, 2024

The general solution for an irregular matrix is probably to add a new layer to your keymap and populate with KC_L and KC_R as appropriate for each key position (and something else for keys that can be used with either hand, if adding that feature too), then use keymap_key_to_keycode() on that layer to lookup handedness for the key in question. That way the keyboard's own LAYOUT macro can be used to handle the matrix irregularities.

For anyone else using a planck, this is how I implemented the fix:

  1. Merge #28
  2. Add KC_LH and KC_RH to my keycodes enum
  3. Add another layer to my keymap:
    [LAYER_HANDS] = LAYOUT_ortho_4x12(
        KC_LH, KC_LH, KC_LH, KC_LH, KC_LH, KC_LH, KC_RH, KC_RH, KC_RH, KC_RH, KC_RH, KC_RH,
        KC_LH, KC_LH, KC_LH, KC_LH, KC_LH, KC_LH, KC_RH, KC_RH, KC_RH, KC_RH, KC_RH, KC_RH,
        KC_LH, KC_LH, KC_LH, KC_LH, KC_LH, KC_LH, KC_RH, KC_RH, KC_RH, KC_RH, KC_RH, KC_RH,
        KC_LH, KC_LH, KC_LH, KC_LH, KC_LH, KC_LH, KC_RH, KC_RH, KC_RH, KC_RH, KC_RH, KC_RH
    )};
  1. override bilateral_combinations_left in my keymap.c
bool bilateral_combinations_left(keypos_t key) {
    uint16_t keycode = keymap_key_to_keycode(LAYER_HANDS, key);
    return keycode == KC_LH;
}

from qmk_firmware.

manna-harbour avatar manna-harbour commented on July 17, 2024

@ZenghaoWang Thanks for trying it! This function might as well be built-in, so here it is in a new branch:

Please try this branch. If it's ok I'll merge it into the main BC branch (well, force push, as this branch is rebased on current master).

from qmk_firmware.

ZenghaoWang avatar ZenghaoWang commented on July 17, 2024

Works fine on my end! I merged your branch, deleted my bilateral_combinations_left function, and defined BILATERAL_COMBINATIONS_HANDS in my config.h.

from qmk_firmware.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.