1

I'm trying to make the control key backspace when pressed alone and also work as left control when combined with another key ( eg I use control h,j,k,l for up down left right), any help? for some reason, it's not working how I designed it.

https://i.stack.imgur.com/2VIud.jpg

expecting: the control key to having multi-functionality with 'backspace' and 'control'

arkosno
  • 51
  • 5

1 Answers1

1

I figured it out and made 2 versions 'control' had to be substituted for 'left_control':


{
                    "description": "control is backspace when pressed alone",
                    "manipulators": [
                        {
                            "from": {
                                "key_code": "left_control",
                                "modifiers": {
                                    "optional": [
                                        "any"
                                    ]
                                }
                            },
                            "parameters": {
                                "basic.to_if_alone_timeout_milliseconds": 300,
                                "basic.to_if_held_down_threshold_milliseconds":0
                            },
                            "to_if_alone": [
                                {
                                    "key_code": "delete_or_backspace"
                                }
                            ],
                            "to_if_held_down": [
                                {
                                    "key_code": "left_control"
                                }
                            ],
                            "type": "basic"
                        }
                    ]
                }




               {
                        "description": "Change control to control if pressed with other keys, to backspace if pressed alone.",
                        "manipulators": [
                            {
                                "type": "basic",
                                "from": {
                                    "key_code": "left_control",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "left_control"
                                    }
                                ],
                                "to_if_alone": [
                                    {
                                        "key_code": "delete_or_backspace"
                                    }
                                ]
                            }
                        ]
                    }
Rohit Gupta
  • 4,022
  • 20
  • 31
  • 41
arkosno
  • 51
  • 5