-
Notifications
You must be signed in to change notification settings - Fork 769
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
bindcode --release does not work (but bindsym --release does) #2733
Comments
Allowing this makes sense to me. I think we should avoid a new flag for this. Using |
As I understand, this (
-- I played with this for #2442 |
@nmschulte Thanks for looking at this. Your example works perfectly here, however, what I'm trying to do (and didn't mention as I didn't know that it apparently makes a difference) is binding two different commands to the $mod key. I'm trying to achieve this via keycodes, i.e. for me the relevant configuration would read ($mod is caps lock with keycode 66 , the behaviour is reproduceable when $mod is the windows or alt key):
The "press" notification is shown but the "release"-command isn't executed. |
This works for me and seems like it'll suffice for you:
Keycode 66 is |
I'm changing this to a bug issue since apparently it should work already… :-) |
I can reproduce this with 4.13-197-ge6682f86: |
What's the state of this issue? I'm still experiencing it in v4.14.1. However, for me, neither
|
The following works for me w/ Debian Sid packaged i3.
Swapping the order of the
|
@Airblader Lol fair enough xD @nmschulte Just tried and unfortunately, it does not work for me. My code:
Edit: Should have mentioned: Mod4 is also my $mod key. If I use |
Using Super_L as modifier and single key works fine for me with 4.14.1 using a combination of bindcode and bindsym, see #3024 for details. |
@klemens Unfortunately it didn't work for me. I've tried all combinations, including My code:
If I comment out one of the lines, the other one will work. |
Before this commit, get_binding() exited on the first match without marking the rest --release bindings with B_UPON_KEYRELEASE_IGNORE_MODS. Similarly, once it found a --release binding during a KeyPress event it would stop searching for a matching key press binding. Example config, placing the --release line first will trigger the second problem: bindsym Super_L exec notify-send "press" # or # bindcode 133 exec notify-send "press" bindsym --release Super_L exec notify-send "release" # or # bindcode --release 133 exec notify-send "release" Fixes i3#2733
Before this commit, get_binding() exited on the first match without marking the rest --release bindings with B_UPON_KEYRELEASE_IGNORE_MODS. Similarly, once it found a --release binding during a KeyPress event it would stop searching for a matching key press binding. Example config, placing the --release line first will trigger the second problem: bindsym Super_L exec notify-send "press" # or # bindcode 133 exec notify-send "press" bindsym --release Super_L exec notify-send "release" # or # bindcode --release 133 exec notify-send "release" Fixes i3#2733
Before this commit, get_binding() exited on the first match without marking the rest --release bindings with B_UPON_KEYRELEASE_IGNORE_MODS. Similarly, once it found a --release binding during a KeyPress event it would stop searching for a matching key press binding. Example config, placing the --release line first will trigger the second problem: # i3 config file (v4) bindsym Super_L exec notify-send "press" # or # bindcode 133 exec notify-send "press" bindsym --release Super_L exec notify-send "release" # or # bindcode --release 133 exec notify-send "release" Fixes i3#2733
…ease Before this commit, get_binding() exited on the first match without marking the rest --release bindings with B_UPON_KEYRELEASE_IGNORE_MODS. Similarly, once it found a --release binding during a KeyPress event it would stop searching for a matching key press binding. Example config, placing the --release line first will trigger the second problem: # i3 config file (v4) bindsym Super_L exec notify-send "press" # or # bindcode 133 exec notify-send "press" bindsym --release Super_L exec notify-send "release" # or # bindcode --release 133 exec notify-send "release" Fixes i3#2733
…ease Before this commit, get_binding() exited on the first match without marking the rest --release bindings with B_UPON_KEYRELEASE_IGNORE_MODS. Similarly, once it found a --release binding during a KeyPress event it would stop searching for a matching key press binding. Example config, placing the --release line first will trigger the second problem: # i3 config file (v4) bindsym Super_L exec notify-send "press" # or # bindcode 133 exec notify-send "press" bindsym --release Super_L exec notify-send "release" # or # bindcode --release 133 exec notify-send "release" Fixes i3#2733
@klemens Your workaround seems to almost solve the problem. I say almost because for me, |
…ease Before this commit, get_binding() exited on the first match without marking the rest --release bindings with B_UPON_KEYRELEASE_IGNORE_MODS. Similarly, once it found a --release binding during a KeyPress event it would stop searching for a matching key press binding. Example config, placing the --release line first will trigger the second problem: # i3 config file (v4) bindsym Super_L exec notify-send "press" # or # bindcode 133 exec notify-send "press" bindsym --release Super_L exec notify-send "release" # or # bindcode --release 133 exec notify-send "release" Fixes i3#2733
Hello,
I'm trying to show an xclock window only while a key is pressed, as is the case for i3bar in hide mode. Technically, this would be possible if i3 allowed assigning different commands when pressing and releasing the same key, i.e. one could then write
keysym [KEY] [COMMAND1]
keysym --release [KEY] [COMMAND2]
As far as I understand, the current behaviour is to only use the keybinding which appears last in the configuration file.
Does anything speak against allowing such a double-binding on press and release for both the keysym and keycode statement? Maybe, to avoid confusion, one could also implement some new option like
keysym --pressrelease [KEY] [COMMAND1] [COMMAND2]
Best,
Simon
The text was updated successfully, but these errors were encountered: