zmkfirmware / zmk

ZMK Firmware Repository

Home Page:https://zmk.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: antecedent-morph (aka adaptive keys)

urob opened this issue · comments

This is an idea for a new behavior, which I think could be really useful and open up all sorts of creative uses:

The antecedent-morph behavior would trigger an alternative binding if within timeout-ms the immediate predecessor matches the trigger condition. This would enable using adaptive keys where certain keys change their meaning if pressed immediately after another key, as popularized by the Hands Down layouts.

For instance, in the Hands Down layout, ,A send UA. Using the proposed behavior, this could be implemented by replacing &kp A with a antecedent-morph configured as follows:

adaptive_A: adaptive_A {
    compatible=  "zmk,behavior-antecedent-morph";
    bindings = <&kp A>, <&morphed_A>;
    timeout-ms = <1000>;
    antecedent = <&kp DOT>:
}

and where &morphed_A is a macro executing BACKSPACE, U, A.

Would be fixed by #2042.