keyd: SpaceFN is a bit too slow

First of all: as a user with a QMK keyboard that also has to regularly type on a laptop your keyd is a blessing.

As a diehard vim guy I quickly was able to translate the most important stuff of my qmk setup to keyd:

# Turns capslock into an escape key when pressed and a control key when held.
capslock = overload(C, esc)

# Remaps the escape key to capslock
# esc = capslock

# space when tapped, spacefn when held
space = overload(spacefn, space)
tab = overload(tabfn, tab)

[spacefn]
h = left
j = down
k = up
l = right

[tabfn]
h = home
j = pagedown
k = pageup
l = end
  • caps as ctrl/esc works like a charm, bye xcape
  • initial tests with SpaceFn and TabFn work: nice, bye xmodmap+setxkbmap

Then I started to write an email and realizedthatthespace keyddoesnt work asreliable πŸ˜• My typing speed is non-spectacular (75-80 wpm according to monkeytype.com) but a space doesnt come through two thirds of the time.

Is there anything I can do to make this more accurate? Did I configure something wrong?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

Not to say that timeout-logic would not also be useful, but I think the above would address the core issue for me.

I am in the process of making some internal changes in preparation for a 2.0 release. I intend to add support for some timeouts shortly after that has been released.

Suppose you type <space down> <ralt down> <space up> <ralt up>, it’s pretty clear that you meant to do space enter, not A-space.

This is indeed a bug. I had accounted for this ambiguity this in an earlier iteration of keyd but neglected to account it in the current one. It was trivial enough to warrant a bugfix on the v1 branch (currently master). Give the latest commit a try.

If you still have issues then you may want to wait for timeout support, though I would recommend switching to 2.0 once it is released anyway, as it makes some minor changes to the config format.

That was fast πŸ˜ƒ Glad it was easy. And I can confirm that the latest commit resolves my issue. Many thanks!

Leaving this open until @dit7ya and @toneman77’s confirm that their issue is fixed. Their use cases may still benefit from timeouts.