⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keyhdlr.cpp

📁 自己动手写操作系统源代码,不可多得的代码
💻 CPP
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -