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

Layered Alt + Right working, Alt + Left is not #203

Open
bredfield opened this issue Nov 29, 2022 · 1 comment
Open

Layered Alt + Right working, Alt + Left is not #203

bredfield opened this issue Nov 29, 2022 · 1 comment

Comments

@bredfield
Copy link

bredfield commented Nov 29, 2022

This is a strange one, I can't figure it out!

I have a layer that is triggered by a caps lock hold, that is used for navigation. Here it is, truncated to the relevant bits:

:main [{:des "navlayer"
         :rules [:navlayer
                 [:##a :left_alt]
                 [:##l :left_arrow]
                 [:##quote :right_arrow]]}
  • Both of the arrows (l / ') work
  • Right + alt (a + l) works
  • Left + alt (a + ') does not work

The karabiner elements output that shows that the left arrow is not triggered when the alt is held down:

// not working left!
  {
    "type": "down",
    "name": {"key_code":"left_option"},
    "usagePage": "7 (0x0007)",
    "usage": "226 (0x00e2)",
    "misc": "flags left_option"
  },
  {
    "type": "up",
    "name": {"key_code":"left_option"},
    "usagePage": "7 (0x0007)",
    "usage": "226 (0x00e2)",
    "misc": ""
  },
// working right!
  {
    "type": "down",
    "name": {"key_code":"left_option"},
    "usagePage": "7 (0x0007)",
    "usage": "226 (0x00e2)",
    "misc": "flags left_option"
  },
  {
    "type": "down",
    "name": {"key_code":"right_arrow"},
    "usagePage": "7 (0x0007)",
    "usage": "79 (0x004f)",
    "misc": "flags left_option"
  },
  {
    "type": "up",
    "name": {"key_code":"right_arrow"},
    "usagePage": "7 (0x0007)",
    "usage": "79 (0x004f)",
    "misc": "flags left_option"
  },
  {
    "type": "up",
    "name": {"key_code":"left_option"},
    "usagePage": "7 (0x0007)",
    "usage": "226 (0x00e2)",
    "misc": ""
  }
]

Another weird thing is that the same approach with shift is working fine for both left and right.

Any insight would be appreciated!

@750
Copy link

750 commented Nov 30, 2022

@bredfield
From what I know, layers only get activated if there is no other key pressed beforehand.
You can make it work like this:

{:des "caps mode" :rules [
  [:##caps_lock ["caps-mode" 1] nil {:afterup ["caps-mode" 0] :alone nil}]
  [:##w :up_arrow ["caps-mode" 1]]
}

In tutorial: https://github.com/yqrashawn/GokuRakuJoudo/blob/master/tutorial.md?plain=1#L362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants