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

Unbind a layer modifier #2

Open
arnarg opened this issue Jul 4, 2021 · 5 comments
Open

Unbind a layer modifier #2

arnarg opened this issue Jul 4, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@arnarg
Copy link

arnarg commented Jul 4, 2021

Hey, I wrote https://github.com/arnarg/waybind a while back and never found the time/interest to polish it up. I found your project and I'm trying it out to see if I can replace my tool. My original goal was to mimic my QMK 60% keyboards on my laptops so layers are perfect for this.

Anyway, I was trying this out and I use caps lock as a modifier for my layer and while testing kbct it still switches on caps lock when pressing it. Do you have an option of essentially making the key into a no-op when it's a modifier?

@samvel1024
Copy link
Owner

samvel1024 commented Jul 4, 2021

I think something like this can fix the issue.

- keyboards: [ "Some kbd"]
  keymap:
    capslock: reserved # noop
  layers:
    - modifiers: [ 'capslock' ]
      keymap:
        i: up
        j: left
        # etc...

reserved is the keyword for noop. Will add that to the readme.md as well. If you absolutely need to use caps lock, the best I can suggest at this moment is to map it under some other layer (for example Ctrl+CapsLock = CapsLock).

@arnarg
Copy link
Author

arnarg commented Jul 4, 2021

My bad. Thanks! I was trying to bind it to reserved in the layer.

- keyboards:
  - AT Translated Set 2 keyboard
  layers:
  - modifiers:
    - capslock
    keymap:
      capslock: reserved
      w: up
      s: down
      a: left
      d: right

But your suggestion works!

I'm however having some difficulty with replicating the Grave escape in QMK. Here's what I tried:

- keyboards:
  - AT Translated Set 2 keyboard
  keymap:
    grave: esc
    capslock: reserved
  layers:
  - modifiers:
    - capslock
    keymap:
      grave: grave
      w: up
      s: down
      a: left
      d: right
  - modifiers:
    - leftshift
    keymap:
      grave: grave

This almost works the way I want it to. Pressing grave on its own sends escape, pressing capslock+grave sends a backtick but pressing shift+grave also sends backtick while I would expect that to literally be shift+grave, i.e. tilde.

Incidentally, I also tried pressing capslock+shift+grave (actually just pressing capslock+shift together is enough) and that crashed kbct.

 INFO  kbct > Starting kbct event loop, pid=92394
 INFO  kbct > Capturing device path=/dev/input/event0 name="AT Translated Set 2 keyboard" mapped_name="Kbct-AT Translated Set 2 keyboard"
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/kbct.rs:168:62

Anyway, thanks for your help.

@samvel1024
Copy link
Owner

Thanks, for the thorough explanation. Clearly this is a bug, will let you know when fixed.

@samvel1024 samvel1024 added the bug Something isn't working label Jul 4, 2021
@samvel1024 samvel1024 self-assigned this Jul 4, 2021
@arnarg
Copy link
Author

arnarg commented Jul 10, 2021

On an unrelated note, I've been using this for a few days now and it works well (apart from the bug above). So I'm thinking of archiving my project, are you ok with me linking to your project in the README? It only has 26 stars.

@samvel1024
Copy link
Owner

Hi @arnarg. Yes, no problem! Happy to know that it was helpful.

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

2 participants