Skip to content

Commit

Permalink
fix(DBus): add volume events for DBus
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowApex committed Mar 17, 2024
1 parent 141f516 commit 42998f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/input/event/dbus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ pub enum Action {
R1,
R2,
R3,
VolumeUp,
VolumeDown,
}

impl Action {
Expand All @@ -48,6 +50,8 @@ impl Action {
Action::R1 => "ui_r1",
Action::R2 => "ui_r2",
Action::R3 => "ui_r3",
Action::VolumeUp => "ui_volume_up",
Action::VolumeDown => "ui_volume_down",
}
}

Expand Down Expand Up @@ -289,8 +293,8 @@ fn actions_from_capability(capability: Capability) -> Vec<Action> {
Keyboard::KeyInsert => vec![Action::None],
Keyboard::KeyDelete => vec![Action::None],
Keyboard::KeyMute => vec![Action::None],
Keyboard::KeyVolumeDown => vec![Action::None],
Keyboard::KeyVolumeUp => vec![Action::None],
Keyboard::KeyVolumeDown => vec![Action::VolumeUp],
Keyboard::KeyVolumeUp => vec![Action::VolumeDown],
Keyboard::KeyPower => vec![Action::None],
Keyboard::KeyKpEqual => vec![Action::None],
Keyboard::KeyPause => vec![Action::None],
Expand Down

0 comments on commit 42998f4

Please sign in to comment.