pub fn enable_window_key_events(&self, window_id: &WindowId, key_handlers: &KeyHandlers) {
        let key_symbols = KeySymbols::new(&self.conn);
        for key in key_handlers.key_combos() {
            match key_symbols.get_keycode(key.keysym).next() {
                Some(keycode) => {
                    xcb::grab_key(
                        &self.conn,
                        false,
                        window_id.to_x(),
                        key.mod_mask as u16,
                        keycode,
                        xcb::GRAB_MODE_ASYNC as u8,
                        xcb::GRAB_MODE_ASYNC as u8,
                    );
                }
                None => {
                    error!(
                        "Failed to get keycode for keysym {} - could not register handler on {}",
                        key.keysym, window_id
                    );
                }
            }
        }
    }
/// Registers for key events.
///
/// If it fails to register any of the keys, it will log an error and continue.
Registers for key events.
If it fails to register any of the keys, it will log an error and continue.
Registers for key events . If it fails to register any of the keys it will log an error and continue .
pub fn enable_window_key_events(&self, window_id: &WindowId, key_handlers: &KeyHandlers) {
        let key_symbols = KeySymbols::new(&self.conn);
        for key in key_handlers.key_combos() {
            match key_symbols.get_keycode(key.keysym).next() {
                Some(keycode) => {
                    xcb::grab_key(
                        &self.conn,
                        false,
                        window_id.to_x(),
                        key.mod_mask as u16,
                        keycode,
                        xcb::GRAB_MODE_ASYNC as u8,
                        xcb::GRAB_MODE_ASYNC as u8,
                    );
                }
                None => {
                    error!(
                        "Failed to get keycode for keysym {} - could not register handler on {}",
                        key.keysym, window_id
                    );
                }
            }
        }
    }
pub fn enable_window_key_events ( & self , window_id : & WindowId , key_handlers : & KeyHandlers ) { let key_symbols = KeySymbols :: new ( & self . conn ) ; for key in key_handlers . key_combos ( ) { match key_symbols . get_keycode ( key . keysym ) . next ( ) { Some ( keycode ) => { xcb :: grab_key ( & self . conn , false , window_id . to_x ( ) , key . mod_mask as u16 , keycode , xcb :: GRAB_MODE_ASYNC as u8 , xcb :: GRAB_MODE_ASYNC as u8 , ) ; } None => { error ! ( " " key keysym window_id ) ; } } } }
Registers for key events.
Registers for key events .
&self
window_id
&WindowId
key_handlers
&KeyHandlers