Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Odd behavior when splitting tap-hold to press and release #1000

Open
1 task done
oblitzitate opened this issue May 1, 2024 · 2 comments
Open
1 task done

Bug: Odd behavior when splitting tap-hold to press and release #1000

oblitzitate opened this issue May 1, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@oblitzitate
Copy link

oblitzitate commented May 1, 2024

Requirements

Describe the bug

I wanted to split up tap-hold to its press and release forms (i.e. combining virtualkeys with tap-hold) for better control so I can experiment with it (e.g. conditional press or release of a tap-hold).

The issue is it doesn't emit the tap or hold action in an expected way. Instead I have to double tap a key in order to emit the tap action, whereas the hold action is normally the one that emits (even on tap) and it will often emit on timeout (rather than on key release).

Relevant kanata config

(defalias
  g (multi
      (on-press press-vkey tp)
      (on-release release-vkey tp)
  )
)
(defvirtualkeys
  tp (tap-hold 0 990 g b)
)

To Reproduce

  1. Apply the config
  2. Experiment with tapping or holding the g key

Expected behavior

I was expecting it to behave like a normal tap-hold action.

Kanata version

e.g. kanata 1.6.1-prerelease-1

Debug logs

No response

Operating system

Linux 6.8.8-arch1-1

Additional context

No response

@oblitzitate oblitzitate added the bug Something isn't working label May 1, 2024
@gerhard-h
Copy link
Contributor

the output is strange simulate.
With t:100 there not even is output.

@jtroo
Copy link
Owner

jtroo commented May 2, 2024

Ah yes, this is based on the way tap-hold is designed. When a tap hold is pending, no other actions are processed until something terminates its ending state. On a normal key, release would end the pending state. But virtual keys rely on a special action activation to release, which itself is blocked because of the pending state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants