1

So, I appear to be getting RSI in my left hand due to the frequent pressing of the left-control key. I have already remapped caps-lock to left-control, which did help things for a while.

I would like to use the keys under the index fingers for control keys, however I cannot seem to get it working properly. It does work, but often when typing quickly, it often registers consecutive key presses as a ctrl+char. I don't think I understand the timing parameters properly, so they might be suboptimal.

Here is my config:

One of my rules:

{
  "description": "F is left-control if pressed with other keys",
  "manipulators": [
    {
      "from": {
        "key_code": "f",
        "modifiers": {
          "optional": [
            "any"
          ]
        }
      },
      "to": [
        {
          "key_code": "left_control"
        }
      ],
      "to_if_alone": [
        {
          "key_code": "f"
        }
      ],
      "type": "basic"
    }
  ]
},

And my timing configuration:

"parameters": {
  "basic.simultaneous_threshold_milliseconds": 50,
  "basic.to_delayed_action_delay_milliseconds": 500,
  "basic.to_if_alone_timeout_milliseconds": 1000,
  "basic.to_if_held_down_threshold_milliseconds": 300,
  "mouse_motion_to_scroll.speed": 100
},

NB: One additional thing to note is that I actually use a colemak layout so in truth the index fingers are above the T and N keys. I have left that out because I think it may not be relevant (my config above does kind of work), and the question above is probably more relevant to more people.

6
  • Thinking a bit out of the box, have you considered foot pedals? Commented Mar 20, 2020 at 12:03
  • out of interest, why do you press the control keys so much? Are you sure you're not confusing it with "command" (my Apple keyboard has a left and right command key, but only a left control key, and command is much more common to press than control at least for the average mac user)
    – user150109
    Commented Mar 20, 2020 at 12:05
  • 2
    At a company I worked for, we had an ergonomics expert explain to us that if you’re getting repetitive stress injuries from typing, you need to evaluate how you’re sitting at your desk/computer. Most people she encountered with issues like this was because they had some “funky” way of sitting at their desk (her words)
    – Allan
    Commented Mar 20, 2020 at 14:46
  • @theonlygusti I use emacs
    – cammil
    Commented Mar 20, 2020 at 18:01
  • @Allan thanks for the tip. It's in a very specific part of my left hand which I can feel tingle in certain positions. But thanks anyway.
    – cammil
    Commented Mar 20, 2020 at 18:03

2 Answers 2

0

I am also concerned about wrist pain, so I tried the same thing. The closest configuration I got was the following one:

{
    "type": "basic",
    "from": {
            "key_code": "f"
        },
    "to_after_key_up": [
        {
            "key_code": "f"
        }
    ],
    "to_if_held_down": [
        {
            "key_code": "left_control",
            "halt": true
        }
    ]
}

However, there is still an additional latency which creates errors when writing fast (for example, when writing "far" fast enough, it writes "afr").

Two possible solutions:

Option 1: Pressing two simultaneous keys to simulate control key pressing. For example, I use J+K to simulate left_command and J+L to simulate left_control.

In the following example, pressing J+L with another_key simulates ctrl + another_key and, if pressed alone, J+L simulates pressing ctrl + X (useful for emacs).

{
    "from": {
        "simultaneous": [
            {
                "key_code": "j"
            },
            {
                "key_code": "l"
            }
        ]
    },
    "to": [
        {
            "key_code": "left_control"
        }
    ],
    "to_if_alone": [
        {
            "key_code": "x",
            "modifiers": [
              "left_control"
            ]
        }
    ],
    "type": "basic"
}

Option 2: Using vim 😀

0

"lazy": true may solve the issue.

{
  "description": "F is left-control if pressed with other keys",
  "manipulators": [
    {
      "from": {
        "key_code": "f",
        "modifiers": {
          "optional": [
            "any"
          ]
        }
      },
      "to": [
        {
          "key_code": "left_control"
        }
      ],
      "to_if_alone": [
        {
          "key_code": "f"
          "lazy": true
        }
      ],
      "type": "basic"
    }
  ]
},

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .