From fc816d41bd7cef088ff0229baf60b47f8294f02a Mon Sep 17 00:00:00 2001 From: Diego COY Date: Fri, 16 Feb 2024 21:23:43 +0000 Subject: [PATCH] linux: add 'microphone mute' key support --- src/keycodes.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/keycodes.rs b/src/keycodes.rs index c6da73a6..3a7fc24b 100644 --- a/src/keycodes.rs +++ b/src/keycodes.rs @@ -584,6 +584,9 @@ pub enum Key { VolumeDown, VolumeMute, VolumeUp, + #[cfg(target_os = "linux")] + /// microphone mute toggle on linux + MicMute, #[deprecated(since = "0.0.12", note = "now renamed to Meta")] /// windows key on Windows (super key on Linux, command key on macOS) Windows, @@ -703,6 +706,7 @@ impl From for xkeysym::Keysym { Key::VolumeDown => Keysym::XF86_AudioLowerVolume, Key::VolumeUp => Keysym::XF86_AudioRaiseVolume, Key::VolumeMute => Keysym::XF86_AudioMute, + Key::MicMute => Keysym::XF86_AudioMicMute, Key::Command | Key::Super | Key::Windows | Key::Meta => Keysym::Super_L, Key::Other(v) => Keysym::from(v), }