From adcf670ba60c4489b14d4b9dd03a0f7799cf8fb7 Mon Sep 17 00:00:00 2001 From: tcmal Date: Wed, 26 Jun 2024 21:52:09 +0100 Subject: start adding some more keybinds --- src/keys.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/keys.rs') 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); } } -- cgit v1.2.3