0

I have a key binding such as alt+s alt+u. It works when i hold down both keys alt and s, then just press u. But if I press u again, it doesn't repeat; i must release alt and s, then hold them down again and press u. Is there a way to make it work by keep pressing u as long as the initial alt and s keys are kept down? Essentially turning s key into an adhoc modifier key.

Example:

  1. Add a keybinding:
{
    "key": "alt+s alt+u",
    "command": "editor.action.smartSelect.shrink"
}
  1. Hold down both keys alt and s
  2. Press u - action will be executed
  3. Press u again - action will not be executed
  4. Release alt and s, goto step 2.
5
  • Does alt+s u do what you want? I don't imagine it will, just checking. Commented Nov 12 at 17:33
  • 1
    It doesn't. With alt+s u, i have release the alt and s, then press u, so it's even more undesired than alt+s alt+u. Commented Nov 12 at 18:44
  • You have to describe woder context and steps to reproduce. What are the chords for? Do you want to assign a gesture to an existing VSCode command in settings, or do you develop a VSCode extension or other application. Please provide some comprehensive artifacts with the examples. Please see: How to create a Minimal, Reproducible Example . Commented Nov 13 at 4:19
  • No extension, just plain keybinding as described. I added clearer example. Commented Nov 13 at 16:24
  • 1
    I think you mean: 1) Press and hold ALT, 2) Press and release s, 3) Press and release u, 4) Release ALT. You are not supposed to hold a non modifier key, it will go into repeat if you hold Commented 2 days ago

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.