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

one-shot shift interferes with defoverrides #1136

Closed
1 task done
rpnfan opened this issue Jul 2, 2024 · 5 comments
Closed
1 task done

one-shot shift interferes with defoverrides #1136

rpnfan opened this issue Jul 2, 2024 · 5 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@rpnfan
Copy link

rpnfan commented Jul 2, 2024

Requirements

Describe the bug

With that configuration the swapping of '+' and '=' works great, with and without one-shot shift. The other two assignments do only work when I keep the @oss-key (one-shot-shift key) held.

So 'https://github.com/oss' + '.' (one-shot-shift-key used held and character key tapped) will result in the ':' character correctly like wanted. But when I use the one-shot shift-key by just tapping it (thus making use of one-shot) I get a double character output. Is that a bug? The output in this example is ':.' -- so first the correctly shifted output ':' but then in addition the unshifted output after that as well, here the dot character '.'

Edit: Other than that the one-shot function works fine. So the one-shot shift does not cause the double character output for characters and also the swapped =-key.

Relevant kanata config

 (deflayer ende
  @grl 1    2    3    4    5    6    7    8    9    0    -    =    bspc
  tab  f    k    o    u    y    v    d    c    l    j    [    ]    del
  @cap h    a    e    i    ,    g    t    r    n    s    '    ret
  @oss z    q    .    x    esc    b    p    m    w    @oss    / 
  lctl lmet lalt           spc            ralt rmet rctl
)

;; Swap some characters, when shifted or unshifted
(defoverrides
  (=) (lsft =)
  (lsft =) (=)
  (lsft ,) (;)
  (lsft .) (lsft ;)
)

;; one-shot keys
(defalias
  oss (one-shot-press 500 lsft)
)

To Reproduce

use one-shot-shift (defined named as oss), not held, but tapped

Expected behavior

single character output of the shifted key, instead of the double character output (shifted and unshifted key output)

Kanata version

1.61

Debug logs

No response

Operating system

Windows 11

Additional context

No response

@rpnfan rpnfan added the bug Something isn't working label Jul 2, 2024
@rpnfan
Copy link
Author

rpnfan commented Jul 8, 2024

Could the above behavior be confirmed as a bug or is something else going wrong here?

@jtroo
Copy link
Owner

jtroo commented Jul 8, 2024

Can you see if this fixes the issue: #1120

@rpnfan
Copy link
Author

rpnfan commented Jul 8, 2024

When I understand that correct I would need to use

(defcfg
  override-release-on-activation yes 
)

which will result in an error when parsing the file (with WinIOv2), because that option seems to be missing in the latest release 1.6.1, so it seems I need to wait with testing for an updated release:

2024-07-08T12:00:05.6980399+02:00 [INFO] kanata v1.6.1 starting
2024-07-08T12:00:05.6981925+02:00 [INFO] using LLHOOK+SendInput for keyboard IO
2024-07-08T12:00:05.7012778+02:00 [ERROR] x Error in configuration
,-[kanata.kbd:3:1]
3 | process-unmapped-keys yes
4 | override-release-on-activation yes
: ^^^^^^^^^^^^^^^|^^^^^^^^^^^^^^
: -- Error here 5 | ) ----
help: Unknown defcfg option override-release-on-activation

    For more info, see the configuration guide:
    https://github.com/jtroo/kanata/blob/main/docs/config.adoc

2024-07-08T12:00:05.7015611+02:00 [ERROR] failed to parse file

@jtroo
Copy link
Owner

jtroo commented Jul 13, 2024

It is unsupported in 1.6.1 but I have now released a new build that supports the option:
https://github.com/jtroo/kanata/releases/tag/v1.7.0-prerelease-1

@jtroo jtroo added the question Further information is requested label Jul 13, 2024
@rpnfan
Copy link
Author

rpnfan commented Jul 15, 2024

Thanks a lot Jtroo. The new release with that option solves this problem. :-)

You are doing a great job with this program, which is really needed with not many (good) alternatives. Thanks a lot!

@jtroo jtroo closed this as completed Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants