summaryrefslogtreecommitdiff
path: root/src/keys.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-06-26 21:52:09 +0100
committertcmal <me@aria.rip>2024-06-26 21:52:09 +0100
commitadcf670ba60c4489b14d4b9dd03a0f7799cf8fb7 (patch)
treef99dbd4a0d3504278ed16f7cd5753f2a5402675c /src/keys.rs
parent6785d154460921cc3b774376a676a226402d8270 (diff)
start adding some more keybinds
Diffstat (limited to 'src/keys.rs')
-rw-r--r--src/keys.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/keys.rs b/src/keys.rs
index cf76982..aa84da6 100644
--- a/src/keys.rs
+++ b/src/keys.rs
@@ -1,6 +1,6 @@
//! Keybind-related code
-use crate::{config::KEYBINDS, conn_info::Connection, error::Result, WM};
+use crate::{config::KEYBINDS, conn_info::Connection, debug, error::Result, WM};
use xcb::x::{
GrabKey, GrabMode, KeyPressEvent, Mapping, MappingNotifyEvent, ModMask, UngrabKey, GRAB_ANY,
};
@@ -95,10 +95,12 @@ impl Keybinds {
/// Attempt to run the action for the matching keybind, if it exists.
pub fn dispatch(&self, wm: &mut WM<'_>, key: Keysym, modifiers: ModMask) {
+ debug!("received {key:?}");
if let Some(bind) = self
.binds()
.find(|b| b.key == key && modifiers.contains(b.modifiers))
{
+ debug!("found action");
(bind.action)(wm);
}
}