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

Application Mapper: Macro to press shift twice not working. #746

Open
voronind-com opened this issue May 13, 2024 · 7 comments
Open

Application Mapper: Macro to press shift twice not working. #746

voronind-com opened this issue May 13, 2024 · 7 comments

Comments

@voronind-com
Copy link

voronind-com commented May 13, 2024

Greetings! I love keyd so much, thank you!
In JetBrains IDEs by default you can press leftshift twice to Search Everywhere. However, I struggle to create a macro that presses left shift twice. I've tried macro(leftshift 10ms leftshift) and macro(S-leftshift) with no luck. Any idea how to do this? I also do this in application-mapper. Thanks!

Edit: I'm on NixOS with Sway 1.9 and Keyd v2.4.3. Config bellow.

@argenkiwi
Copy link

I've faced a similar issue this week. I use One-shot shift and tapping left shift does not produce any effect as the shift layer is bound to left shift specifically. Try doing left then right shift or vice versa.

@voronind-com
Copy link
Author

Try doing left then right shift

Thanks for the idea, but it didn't work for me.

@argenkiwi
Copy link

That is certainly strange. I have just tested it on Android Studio (based on IntelliJ) and it worked for me.

[main]
leftshift = macro(rightshift leftshift)

Maybe there is some other issue.

@voronind-com
Copy link
Author

voronind-com commented May 15, 2024

That is certainly strange. I have just tested it on Android Studio (based on IntelliJ) and it worked for me.

[main]
leftshift = macro(rightshift leftshift)

Maybe there is some other issue.

Maybe it works for you because you have bind it to left shift, so it triggers the left shift and then your macro?

I have no idea, I've tried your example with no luck. Checked everything.

Do you write that to your system keyd service or keyd-application like me?

@argenkiwi
Copy link

Not sure what you mean by running keyd as a service or application. I do run keyd as a service with runit (not systemd).

Just to make sure I tried all of the following:

[main]

f1 = macro(leftshift leftshift)
f2 = macro(rightshift rightshift)
f3 = macro(leftshift rightshift)
f4 = macro(rightshift leftshift)

[shift]

f1 = macro(leftshift leftshift)
f2 = macro(rightshift rightshift)
f3 = macro(leftshift rightshift)
f4 = macro(rightshift leftshift)

They all work as expected running v2.4.3. My guess would be there is something conflicting with this macro in your config. I would make a separate config with just the macro to isolate the issue. But unless you share your config it will be hard to know what's wrong.

@voronind-com
Copy link
Author

voronind-com commented May 15, 2024

@argenkiwi yes that means you're using system-wide config. Keyd has a separate module called keyd-application-mapper that can map keys per-application, not for everything. Its configuration goes to ~/.config/keyd/app.conf

@voronind-com
Copy link
Author

This is my system config:

[ids]
*

[layer_alternative]
a=home
c=copy
d=end
h=left
j=down
k=up
l=right
s=pagedown
v=paste
w=pageup
x=cut

[layer_control]
a=back
d=forward
e=nextsong
q=previoussong
s=volumedown
space=playpause
w=volumeup
x=mute
z=stopcd

[layer_macro]

[main]
backspace=delete
capslock=overload(control, esc)
compose=layer(layer_macro)
esc=print
leftcontrol=overload(layer_alternative, leftcontrol)
rightcontrol=layer(layer_control)
rightshift=backspace

This is per-app config for Idea:

[jetbrains-idea-ce]
alt.a = C-A-5
alt.c = C-S-A-t
alt.d = S-f9
alt.e = A-right
alt.f = C-S-f
alt.g = macro(gd)
alt.o = C-o
alt.q = A-left
alt.r = S-f10
alt.s = C-A-s
alt.v = C-q
alt.x = C-f4
alt.z = C-f2
alt.space = macro(rightshift leftshift)

@voronind-com voronind-com changed the title Macro to press shift twice. Application Mapper: Macro to press shift twice not working. May 15, 2024
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