News for hackers. Stuff that matters.
Re:Modeless Vim by linsomniac on Tuesday January 16, 2024 @12:56PM (#39016372)
Ooh! Can I do this with "z" and "/" (letter if tapped, control if held)?
Re:Modeless Vim by sodapopcan on Tuesday January 16, 2024 @01:09PM (#39016514)
My GUESS is that it would be something like this:

    {
      "title": "Hold z or / for control",
      "rules": [
        {
          "description": "Hold z for control",
          "manipulators": [
            {
              "type": "basic",
              "from": {
                "key_code": "z",
                "modifiers": {
                  "optional": [
                    "any"
                  ]
                }
              },
              "to_if_alone": [
                {
                  "key_code": "left_control"
                }
              ]
            }
          ]
        },
        {
          "description": "Hold / for control",
          "manipulators": [
            {
              "type": "basic",
              "from": {
                "key_code": "/",
                "modifiers": {
                  "optional": [
                    "any"
                  ]
                }
              },
              "to_if_alone": [
                {
                  "key_code": "right_control"
                }
              ]
            }
          ]
        }
      ]
    }
Re:Modeless Vim by sodapopcan on Tuesday January 16, 2024 @01:06PM (#39016486)
Yep! You can do whatever you want with complex modifications. The only tricky part is figuring it out. It shouldn't be TOO different than the above if you replace the appropriate values.