pub(crate) fn new() -> KeyboardState {
        unsafe {
            let hkl = GetKeyboardLayout(0);
            let key_vals = HashMap::new();
            let dead_keys = HashSet::new();
            let stash_vk = None;
            let stash_utf16 = Vec::new();
            let has_altgr = false;
            let mut result = KeyboardState {
                hkl,
                key_vals,
                dead_keys,
                has_altgr,
                stash_vk,
                stash_utf16,
            };
            result.load_keyboard_layout();
            result
        }
    }
/// Create a new keyboard state.
///
/// There should be one of these per window. It loads the current keyboard
/// layout and retains some mapping information from it.
Create a new keyboard state.
There should be one of these per window. It loads the current keyboard
layout and retains some mapping information from it.
Create a new keyboard state . There should be one of these per window . It loads the current keyboard layout and retains some mapping information from it .
pub(crate) fn new() -> KeyboardState {
        unsafe {
            let hkl = GetKeyboardLayout(0);
            let key_vals = HashMap::new();
            let dead_keys = HashSet::new();
            let stash_vk = None;
            let stash_utf16 = Vec::new();
            let has_altgr = false;
            let mut result = KeyboardState {
                hkl,
                key_vals,
                dead_keys,
                has_altgr,
                stash_vk,
                stash_utf16,
            };
            result.load_keyboard_layout();
            result
        }
    }
pub ( crate ) fn new ( ) -> KeyboardState { unsafe { let hkl = GetKeyboardLayout ( 0 ) ; let key_vals = HashMap :: new ( ) ; let dead_keys = HashSet :: new ( ) ; let stash_vk = None ; let stash_utf16 = Vec :: new ( ) ; let has_altgr = false ; let mut result = KeyboardState { hkl , key_vals , dead_keys , has_altgr , stash_vk , stash_utf16 , } ; result . load_keyboard_layout ( ) ; result } }
Create a new keyboard state.
Create a new keyboard state .