aboutsummaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/hotkey_overlay.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ui/hotkey_overlay.rs b/src/ui/hotkey_overlay.rs
index 5fc3cedb..f054b3cf 100644
--- a/src/ui/hotkey_overlay.rs
+++ b/src/ui/hotkey_overlay.rs
@@ -4,7 +4,7 @@ use std::collections::HashMap;
use std::iter::zip;
use std::rc::Rc;
-use niri_config::{Action, Config, Key, Modifiers};
+use niri_config::{Action, Config, Key, Modifiers, Trigger};
use pangocairo::cairo::{self, ImageSurface};
use pangocairo::pango::{AttrColor, AttrInt, AttrList, AttrString, FontDescription, Weight};
use smithay::backend::renderer::element::memory::{
@@ -414,7 +414,15 @@ fn key_name(comp_mod: CompositorMod, key: &Key) -> String {
if key.modifiers.contains(Modifiers::CTRL) {
name.push_str("Ctrl + ");
}
- name.push_str(&prettify_keysym_name(&keysym_get_name(key.keysym)));
+
+ let pretty = match key.trigger {
+ Trigger::Keysym(keysym) => prettify_keysym_name(&keysym_get_name(keysym)),
+ Trigger::WheelDown => String::from("Wheel Down"),
+ Trigger::WheelUp => String::from("Wheel Up"),
+ Trigger::WheelLeft => String::from("Wheel Left"),
+ Trigger::WheelRight => String::from("Wheel Right"),
+ };
+ name.push_str(&pretty);
name
}