Exemplo n.º 1
0
        /// <summary>
        /// Get the first mapping for this message
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public Mapping GetMapping(Message msg)
        {
            if (msg.Msg == Win32.Const.WM_INPUT)
            {
                //Just ask our handler to process
                var actions = _hidHandler.ProcessInput(msg, false);

                if (actions != null && actions.Count > 0)
                {
                    var action = actions[0];
                    return(new Mapping(action.Layer, action.Condition, action.ConProperty, action.Command, action.CmdProperty, action.CmdKeyChar, action.CmdKeyCode, action.Sound, action.Focus));
                }
            }
            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        ///   Handle WM_INPUT messages.
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="action"></param>
        /// <param name="key"></param>
        /// <param name="keyCode"></param>
        /// <returns></returns>
        public bool WndProcInput(ref Message msg, out Action action, out char key, out Keys keyCode)
        {
            action  = null;
            key     = (char)0;
            keyCode = Keys.A;

            //Just ask our handler to process
            _hidHandler.ProcessInput(msg);

            return(false);
        }