| 
									
										
										
										
											2017-10-26 17:17:30 +08:00
										 |  |  | #include "..\ecommon.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-28 18:48:21 +08:00
										 |  |  | UINT e2d::EKeyboardMsg::s_nMsg = 0; | 
					
						
							|  |  |  | WPARAM e2d::EKeyboardMsg::s_wParam = 0; | 
					
						
							|  |  |  | LPARAM e2d::EKeyboardMsg::s_lParam = 0; | 
					
						
							| 
									
										
										
										
											2017-10-26 17:17:30 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | e2d::EKeyboardMsg::KEYBOARD_MSG e2d::EKeyboardMsg::getMsg() | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2017-10-28 18:48:21 +08:00
										 |  |  | 	return KEYBOARD_MSG(EKeyboardMsg::s_nMsg); | 
					
						
							| 
									
										
										
										
											2017-10-26 17:17:30 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-04 18:21:46 +08:00
										 |  |  | e2d::EKeyboardMsg::KEY e2d::EKeyboardMsg::getKeyValue() | 
					
						
							| 
									
										
										
										
											2017-10-26 17:17:30 +08:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2017-10-28 18:48:21 +08:00
										 |  |  | 	return KEY(EKeyboardMsg::s_wParam); | 
					
						
							| 
									
										
										
										
											2017-10-26 17:17:30 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | DWORD e2d::EKeyboardMsg::getCount() | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2017-10-28 18:48:21 +08:00
										 |  |  | 	return (((DWORD)EKeyboardMsg::s_lParam) & 0x0000FFFF); | 
					
						
							| 
									
										
										
										
											2017-10-26 17:17:30 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | bool e2d::EKeyboardMsg::isKeyDown(KEY key) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	if (::GetAsyncKeyState((int)key) & 0x8000) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		return true; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return false; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | bool e2d::EKeyboardMsg::isCapitalLockOn() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	if (::GetKeyState(VK_CAPITAL) & 0x0001) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		return true; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return false; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | bool e2d::EKeyboardMsg::isNumpadLockOn() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	if (::GetKeyState(VK_NUMLOCK) & 0x0001) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		return true; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return false; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | bool e2d::EKeyboardMsg::isScrollLockOn() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	if (::GetKeyState(VK_SCROLL) & 0x0001) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		return true; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return false; | 
					
						
							|  |  |  | } |