mirror of
https://github.com/swaywm/sway.git
synced 2026-04-18 06:46:56 -04:00
implement an emit command and resolve #4937
Command Syntax: emit <press|release|press-release> <criteria> <keys> * action: specifies whether to press, release the keys or do both * criteria: first window that matches the criteria will get the key input * keys: modifiers and keys separated by + Examples: * emit press-release [app_id=com.obsproject.Studio] ALT+F8 * bindsym --no-repeat Ctrl+T emit press [app_id=wev] Ctrl+A * bindsym --no-repeat --release Ctrl+T emit release [app_id=wev] Ctrl+A
This commit is contained in:
parent
f293418d9d
commit
8689627774
7 changed files with 181 additions and 6 deletions
|
|
@ -141,3 +141,9 @@ bool sway_set_cloexec(int fd, bool cloexec) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t get_current_time_msec(void) {
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
return now.tv_sec * 1000 + now.tv_nsec / 1000000;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue