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

overloadi layer doesn't activate if pressed in quick succession after another key #921

Closed
BrickEater opened this issue Jan 24, 2025 · 2 comments

Comments

@BrickEater
Copy link

I want to set j, k, and l as different layers when I hold them and for the most part, my config works except if these keys are pressed quickly after another key. More often than not I don't notice any issues except after space or backspace is pressed.

Is there something wrong with my config?

[ids]
*

[main]
# Shift can be tapped for one instance of capitalization
shift = oneshot(shift)

# Maps capslock to escape when pressed and control when held.
capslock = overload(control, esc)

# Numbers, symbols, and brackets remapped to layers when holding j, k, or l
j = overloadi(j, overloadt(number_layer, j, 200), 150)
k = overloadi(k, overloadt(symbol_layer, k, 200), 150)
l = overloadi(l, overloadt(bracket_layer, l, 200), 150)

# Mod keys remapped to layers when holding f, d, or s
f = overloadi(f, overloadt(control, f, 200), 150)
d = overloadi(d, overloadt(meta, d, 200), 150)
s = overloadi(s, overloadt(alt, s, 200), 150)

[number_layer]
q = `
w = 1
e = 2
r = 3
s = 4
d = 5
f = 6
x = 7
c = 8
v = 9
t = -
g = =
b = 0 
a = .
z = ,

[symbol_layer]
q = ~
w = !
e = @
r = #
s = $
d = %
f = ^
x = &
c = *
t = _
g = +

[bracket_layer]
e = (
r = )
d = [
f = ]
c = {
v = }
t = <
g = >
@lobre
Copy link

lobre commented Jan 24, 2025

If I understand your point correctly, that is what overloadi is supposed to do. Its effect is to avoid activating an action when chained with letters/symbols (to not interrupt the flow of typing).

overloadi(<action 1>, <action 2>, <idle timeout>)

Activate <action 1> if the last non-action (i.e symbol) key was struck less than <timeout> milliseconds ago, otherwise activate <action 2>. 

So in your example, if you type space and then j within 150ms, it will do j (action 1). space is considered a "non-action" as you don't have any layers mapped on it.

@BrickEater
Copy link
Author

If I understand your point correctly, that is what overloadi is supposed to do. Its effect is to avoid activating an action when chained with letters/symbols (to not interrupt the flow of typing).

overloadi(<action 1>, <action 2>, <idle timeout>)

Activate <action 1> if the last non-action (i.e symbol) key was struck less than <timeout> milliseconds ago, otherwise activate <action 2>. 

So in your example, if you type space and then j within 150ms, it will do j (action 1). space is considered a "non-action" as you don't have any layers mapped on it.

That makes a lot of sense. That is how the arch wiki described it, too lol. Maybe I can force it to do action 2 if I make space and backspace benign actions.

Thanks for the reply, I'll fool around with it.

@rvaiya rvaiya closed this as completed Feb 9, 2025
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

3 participants