mirror of
https://github.com/swaywm/sway.git
synced 2025-11-01 22:58:41 -04:00
Implement bindsym --release
This is a "simple" version of --release (same as i3) that only supports
a binding that contain one normal key. e.g.:
bindsym --release $mod+x exec somthing-fun
I didn't bother implementing it for a combination like `$mod+x+z` since
it is a bit tricky to get right and also a bit weird to actually do on a
keyboard.
This commit is contained in:
parent
8f5de70c93
commit
55f63935ab
5 changed files with 92 additions and 27 deletions
|
|
@ -22,6 +22,7 @@ struct sway_variable {
|
|||
*/
|
||||
struct sway_binding {
|
||||
int order;
|
||||
bool release;
|
||||
list_t *keys;
|
||||
uint32_t modifiers;
|
||||
char *command;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
// returns true if key has been pressed, otherwise false
|
||||
bool check_key(uint32_t key_sym, uint32_t key_code);
|
||||
|
||||
// returns true if key_sym matches latest released key.
|
||||
bool check_released_key(uint32_t key_sym);
|
||||
|
||||
// sets a key as pressed
|
||||
void press_key(uint32_t key_sym, uint32_t key_code);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue