naive implementation of 'bindsym --release' (and bindcode)
The implementation is naive because the user has to generate exactly the event he specified. That is, if you use this binding: bindsym --release $mod+x exec import /tmp/latest-screenshot.png Then it will only be triggered if you hit $mod, hit x, release x, release $mod. It will not be triggered if you hit $mod, hit x, release $mod, release x. The reason is that the KeyRelease event in the latter case will not have the modifier in its flags, so it doesn’t match the configured binding.
This commit is contained in:
@ -200,6 +200,10 @@ struct regex {
|
||||
*
|
||||
*/
|
||||
struct Binding {
|
||||
/** If true, the binding should be executed upon a KeyRelease event, not a
|
||||
* KeyPress (the default). */
|
||||
bool release;
|
||||
|
||||
/** Symbol the user specified in configfile, if any. This needs to be
|
||||
* stored with the binding to be able to re-convert it into a keycode
|
||||
* if the keyboard mapping changes (using Xmodmap for example) */
|
||||
|
Reference in New Issue
Block a user