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

superKey=mod1 oddity #50

Open
ghost opened this issue May 29, 2020 · 10 comments
Open

superKey=mod1 oddity #50

ghost opened this issue May 29, 2020 · 10 comments

Comments

@ghost
Copy link

ghost commented May 29, 2020

When you set superKey to mod1, it seems to conflict or otherwise mess with, for instance, a terminal's readline bindings.

@AdaShoelace
Copy link
Owner

I think this might be one of the reasons i3 restrict superKey to either meta or ctrl.
Perhaps that would be a reasonable way to solve the issue for hadlock as well?

@ghost
Copy link
Author

ghost commented May 30, 2020

I haven't used i3 and didn't know about the restriction. But mod1 works as expected with xmonad and spectrwm.

@ghost
Copy link
Author

ghost commented May 30, 2020

mod1 also works with sway

@AdaShoelace AdaShoelace linked a pull request May 30, 2020 that will close this issue
@AdaShoelace
Copy link
Owner

I haven't actually used neither xmonad nor spectrwm but do they have a seperate service for input and then send them to the wm via unix sockets using their own protocol? I have seen a lot of wm do it this way, berryWM for example.

@ghost
Copy link
Author

ghost commented May 30, 2020

No, and mod1 also works with dwm.

@AdaShoelace
Copy link
Owner

How would xmonad and dwm act if you were to bind a wm-action to eg Ctrl-a? Wouldn't that override the readline instruction if you're having a terminal open?
And if this is the case perhaps the only reasonable option is to bind the wm-keys in a way that doesn't interfere with other applications?

I tried using both Ctrl and Alt as superKey and for the cases without an extra modifier Ctrl gave me problems in a terminal but Alt didn't. Was this what you meant initially?

@ghost
Copy link
Author

ghost commented May 31, 2020

After more testing, I'd say the issue isn't with mod1. In fact, the oddity happens with the default (superKey=super), too. If you have some binding like superKey+Shift+$ where $ can be anything in a-z, and you press superKey+$ (without Shift), then you get the odd effect. I cannot tell if the terminal and shell get the full code, but the shell reacts as if there was input and it didn't know what to do with it, so the terminal's cursor flashes.

The reason I first noticed this with superKey=mod1 is because I was trying to input mod1+d in the shell and was surprised to see a flashing cursor without any readline effect. I think it happens because I have a custom binding for superKey+Shift+d.

@AdaShoelace
Copy link
Owner

After more testing, I'd say the issue isn't with mod1. In fact, the oddity happens with the default (superKey=super), too. If you have some binding like superKey+Shift+$ where $ can be anything in a-z, and you press superKey+$ (without Shift), then you get the odd effect. I cannot tell if the terminal and shell get the full code, but the shell reacts as if there was input and it didn't know what to do with it, so the terminal's cursor flashes.

The reason I first noticed this with superKey=mod1 is because I was trying to input mod1+d in the shell and was surprised to see a flashing cursor without any readline effect. I think it happens because I have a custom binding for superKey+Shift+d.

This is very strange. I've investigated it further and realized that different terminals act differently in this aspect. Alacritty acts exactly as intended for me (alt + d deletes the rest of the line if not bound in hadlock). Xterm on the other hand acts strange in this scenario, it starts inserting umlaut letters eg åäö.

@ghost
Copy link
Author

ghost commented May 31, 2020

I saw flashing with Alacritty v0.3.3-310-g2b2b2bf and haven't tested other emulators yet. Is it conceivable that hadlock detects Mod1+d but mistakenly sends Mod1+Shift+d to the terminal?

@AdaShoelace
Copy link
Owner

Would you be able to paste the relevant parts of your config. I can't seem to recreate the issue.

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

Successfully merging a pull request may close this issue.

1 participant