Fix global Power menu key handling, SIP G.711 audio routing, Webarchy audio playback, and ReMEdy Call menu key

This commit is contained in:
Luxferre committed 2026-10-31 19:39:28 +02:00
1 parent d7335b5ebe
commit 0af39d9fa0
76 files changed
+506 -104

No files matched your search

+15 -1
View File
@@ -779,6 +779,8 @@ query_trigger_keys_down(void)
mask |= 4;
if (km[104 / 8] & (1 << (104 % 8)))
mask |= 8;
if (km[124 / 8] & (1 << (124 % 8)))
mask |= 16;
return mask;
}
@@ -1572,6 +1574,8 @@ keypress(XKeyEvent *ev)
len = Xutf8LookupString(xic, ev, buf, sizeof buf, &ksym, &status);
else {
len = XLookupString(ev, buf, sizeof buf, &ksym, NULL);
if (ksym == NoSymbol && ev->keycode == 124)
ksym = XF86XK_PowerOff;
status = (len > 0 && ksym != NoSymbol) ? XLookupBoth :
(len > 0) ? XLookupChars :
(ksym != NoSymbol) ? XLookupKeySym : XLookupNone;
@@ -1688,7 +1692,16 @@ insert:
sel = matchend;
break;
case XK_Escape:
cancel_session();
return;
case XF86XK_PowerOff:
if (daemon_mode &&
(menu_mode != MODE_BUILTIN || strcmp(current_builtin_menu, "power") != 0)) {
if (active_client_fd >= 0)
finish_client_session(1, NULL);
open_builtin_menu("power", 0);
return;
}
cancel_session();
return;
case XF86XK_Back:
@@ -3569,6 +3582,7 @@ process_x11_events(void)
int is_enter = (ks == XK_Return || ks == XK_KP_Enter ||
ks == XF86XK_Phone || ks == XF86XK_PickupPhone ||
ev.xkey.keycode == 36 || ev.xkey.keycode == 104);
int is_power = (ks == XF86XK_PowerOff || ev.xkey.keycode == 124);
if (is_left || is_right) {
long long now = dmenu_now_ms();
int which = (is_left ? 1 : 0) | (is_right ? 2 : 0);
@@ -3595,7 +3609,7 @@ process_x11_events(void)
soft_deadline = now + 30;
continue;
}
if (is_enter) {
if (is_enter || is_power) {
if (ev.type == KeyRelease) {
initial_released = 1;
continue;