예제 #1
0
STDAPI CTextService::OnTestKeyDown(ITfContext *pic, WPARAM wParam, LPARAM lParam, BOOL *pfEaten)
{
	if(pfEaten == NULL)
	{
		return E_INVALIDARG;
	}

	int eaten = _IsKeyEaten(pic, wParam, lParam, TRUE, TRUE);
	if(eaten == -1)
	{
		*pfEaten = TRUE;
		return S_OK;
	}
	*pfEaten = (eaten == TRUE);

	_EndInputModeWindow();

	if(!_IsKeyboardDisabled() && _IsKeyboardOpen() && !_IsComposing())
	{
		WCHAR ch = _GetCh((BYTE)wParam);
		if(_IsKeyVoid(ch, (BYTE)wParam))
		{
			_GetActiveFlags();
			_UpdateLanguageBar();
		}
	}

	return S_OK;
}
예제 #2
0
STDAPI CTextService::OnTestKeyDown(ITfContext *pic, WPARAM wParam, LPARAM lParam, BOOL *pfEaten)
{
	*pfEaten = _IsKeyEaten(pic, wParam);

	if(_pCandidateList == NULL || !_pCandidateList->_IsShowCandidateWindow())
	{
		if(_pInputModeWindow != NULL)
		{
			_ClearComposition();
		}

		if(inputmode == im_ascii)
		{
			WCHAR ch = _GetCh((BYTE)wParam);
			if(_IsKeyVoid(ch, (BYTE)wParam))
			{
				_GetActiveFlags();
				_UpdateLanguageBar();
			}
		}
	}

	return S_OK;
}