Press and hold Spacebar, the cursor takes one step to the right and stops. No matter how long Spacebar is pressed.
you might wonder why I don't just choose this keyboard setting. Because this setting also affects other Key (Backspace) and I only want to influence the behavior of the spacebar.
No problem! I don't mind whipping up macros for people when I have time. I also like teaching too (I do a lot of volunteer work that involves teaching; indeed if I wasn’t a professional interpreter I would likely look for a job in the education field), so I like to try and help folks on this forum to learn a little more about KM if possible.
Take a look at the following macro. Essentially it repeatedly inserts a space the entire time the space bar is down. The 0.1 second is to prevent it from repeating too fast and inserting too many spaces. Adjust the time to whatever works best for your system.
„Essentially it repeatedly inserts a space the entire time the space bar is down.“
In fact, I want the opposite. When Spacebar ist pressed/down and hold the cursor takes one step to the right and stops. No matter how long Spacebar is pressed.
The workaround would be to set Key Repeat of in the system preferences. So Spacebar does what it should. And then use your macro to set it back for Backspace, arrow keys and so on. But that ist a bit a bit complicated.
Ok here's a work-around that isn't ideal... but it may work for you. The caveat is that it does not insert the space until the space bar is released (see the trigger), but it simply didn't work the way you wanted with the other trigger options.
I'll keep monkeying with it to see if I can come up with something better, and perhaps others more knowledgeable than me will chime in too.
https://unshaky.nestederror.com/ might help solve this for you. You can set it to capture and ignore multiple key presses of the same key (and limit it to only a single key as well).
Whenever I need to change something like the behaviour of keys or remapping of keys I typically use a different program (Karabiner Elements).
There it is possible to manually define a custom rule that disables the key repeat just for space.
You could install Karabiner first on your system. In order to get this custom "Complex Modification" installed on your machine please go to this website and on the right hand side paste in this code I wrote for you:
Then you can install it which will basically add it to your local Karabiner.
After that you need to activate it in the Karabiner Preferences→Complex Modifications by selecting Add Rule and adding the Disable spacebar key repeat.
It takes a few steps but achieves exactly what you are looking for.