keyhdlr.cpp
来自「自己动手写嵌入式操作系统源码」· C++ 代码 · 共 32 行
CPP
32 行
#ifndef __STDAFX_H__
#include "..\INCLUDE\StdAfx.h"
#endif
//
//The following procedure is used by master to dispatch the key board
//event.
//This event parase the dwParam,and set up a __MSG struct,initialize
//it,and add a message to the current task.
//
VOID _KeyHandler(DWORD dwParam)
{
//__KTHREAD_MSG Msg;
//__KERNEL_THREAD_MESSAGE Msg;
__DEVICE_MESSAGE Msg;
//Mark in interrupt context.
System.ucIntNestLevel += 1;
//Msg.wCommand = KeyUpEvent(dwParam) ? KTMSG_KEY_UP : KTMSG_KEY_DOWN;
//Msg.dwParam = dwParam;
Msg.wDevMsgType = KeyUpEvent(dwParam) ? KTMSG_KEY_UP : KTMSG_KEY_DOWN;
Msg.dwDevMsgParam = dwParam;
DeviceInputManager.SendDeviceMessage((__COMMON_OBJECT*)&DeviceInputManager,
&Msg,
NULL);
//SendMessage((__COMMON_OBJECT*)g_lpShellThread,&Msg);
System.ucIntNestLevel -= 1;
return;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?