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: Home row mods advanced issue with block-unmapped-keys #1044

Closed
1 task done
s5k opened this issue May 16, 2024 · 3 comments
Closed
1 task done

Bug: Home row mods advanced issue with block-unmapped-keys #1044

s5k opened this issue May 16, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@s5k
Copy link

s5k commented May 16, 2024

Requirements

Describe the bug

Hi there,
I noticed a problem when tried to add block-unmapped-keys with HRM configuration, when typing quickly it did not work as expected.

Relevant kanata config

;; Home row mods QWERTY example with more complexity.
;; Some of the changes from the basic example:
;; - when a home row mod activates tap, the home row mods are disabled
;;   while continuing to type rapidly
;; - tap-hold-release helps make the hold action more responsive
;; - pressing another key on the same half of the keyboard
;;   as the home row mod will activate an early tap action

(defcfg
  process-unmapped-keys yes
  block-unmapped-keys yes
)
(defsrc
  a   s   d   f   j   k   l   ;
)
(defvar
  ;; Note: consider using different time values for your different fingers.
  ;; For example, your pinkies might be slower to release keys and index
  ;; fingers faster.
  tap-time 200
  hold-time 150
  pinky-time 200

  left-hand-keys (
    q w e r t
    a s d f g
    z x c v b
  )
  right-hand-keys (
    y u i o p
    h j k l ;
    n m , . /
  )
)
(deflayer base
  @a  @s  @d  @f  @j  @k  @l  @;
)

(deflayer nomods
  a   s   d   f   j   k   l   ;
)
(deffakekeys
  to-base (layer-switch base)
)
(defalias
  tap (multi
    (layer-switch nomods)
    (on-idle-fakekey to-base tap 20)
  )

  a (tap-hold-release-keys $tap-time $pinky-time (multi a @tap) lmet $left-hand-keys)
  s (tap-hold-release-keys $tap-time $hold-time (multi s @tap) lalt $left-hand-keys)
  d (tap-hold-release-keys $tap-time $hold-time (multi d @tap) lctl $left-hand-keys)
  f (tap-hold-release-keys $tap-time $hold-time (multi f @tap) lsft $left-hand-keys)
  j (tap-hold-release-keys $tap-time $hold-time (multi j @tap) rsft $right-hand-keys)
  k (tap-hold-release-keys $tap-time $hold-time (multi k @tap) rctl $right-hand-keys)
  l (tap-hold-release-keys $tap-time $hold-time (multi l @tap) ralt $right-hand-keys)
  ; (tap-hold-release-keys $tap-time $hold-time (multi ; @tap) rmet $right-hand-keys)
)

To Reproduce

  1. Using version 1.6.1
  2. Try to run the configuration
  3. Typing paragraphs with ~80wpm.

Expected behavior

It should not lose characters when quickly typing.

Kanata version

1.6.1

Debug logs

No response

Operating system

Arch (Gnome)

Additional context

No response

@s5k s5k added the bug Something isn't working label May 16, 2024
@rszyma
Copy link
Contributor

rszyma commented May 18, 2024

I noticed a problem when tried to add block-unmapped-keys with HRM configuration, when typing quickly it did not work as expected.

After adding block-unmapped-keys I don't think your configuration makes sense even when typing slowly. See docs https://github.com/jtroo/kanata/blob/main/docs/config.adoc#block-unmapped-keys.

@jtroo
Copy link
Owner

jtroo commented May 18, 2024

@s5k in the future you should use triple backticks to code-block configuration text to avoid @ pinging people: ```.

Also, do attach the logs with --debug reproducing your issue, as well as what other options you have tried. You should also bear in mind that home row mods will never quite be perfect because there will tradeoff in latency vs. consistency, and you will need to adapt typing patterns somewhat. The advanced sample seeks to improve the latency of activating the mod, at the risk of unintended mod activations.

@jtroo jtroo added question Further information is requested and removed bug Something isn't working labels May 18, 2024
@s5k
Copy link
Author

s5k commented May 28, 2024

Hi @jtroo, it works fine after attempting to rebuild from the source. Thank you for being so supportive.

@s5k s5k closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants