ITfKeyTraceEventSink interface (msctf.h)

The ITfKeyTraceEventSink interface is implemented by an application or text service to receive key stroke event notifications before the event is processed by the target. This advise sink is installed by calling the thread manager ITfSource::AdviseSink method with IID_ITfKeyTraceEventSink.

Inheritance

The ITfKeyTraceEventSink interface inherits from the IUnknown interface. ITfKeyTraceEventSink also has these types of members:

Methods

The ITfKeyTraceEventSink interface has these methods.

 
ITfKeyTraceEventSink::OnKeyTraceDown

ITfKeyTraceEventSink::OnKeyTraceDown method
ITfKeyTraceEventSink::OnKeyTraceUp

ITfKeyTraceEventSink::OnKeyTraceUp method

Remarks

The difference between ITfKeyTraceEventSink and ITfKeyEventSink events is that ITfKeyTraceEventSink events occur before any filtering or processing of the key event occurs. The ITfKeyTraceEventSink events also occur before the target application can process the key event.

Examples


HRESULT hr;
ITfSource *pSource;

hr = pThreadMgr->QueryInterface(IID_ITfSource, (LPVOID*)&pSource);
if(SUCCEEDED(hr))
{
    hr = pSource->AdviseSink(IID_ITfKeyTraceEventSink, pKeyTraceEventSink, &m_dwKeyTraveEventSinkCookie);
    
    pSource->Release();
}


HRESULT hr;
ITfSource *pSource;

hr = pThreadMgr->QueryInterface(IID_ITfSource, (LPVOID*)&pSource);
if(SUCCEEDED(hr))
{
    hr = pSource->UnadviseSink(m_dwKeyTraveEventSinkCookie);
    
    pSource->Release();
}

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header msctf.h
Redistributable TSF 1.0 on Windows 2000 Professional

See also

ITfKeyEventSink

ITfSource::AdviseSink

IUnknown