KeyboardDeliveryInterceptor 類別

定義

可讓應用程式覆寫原始鍵盤輸入的系統處理,包括按鍵組合,例如快速鍵、便捷鍵 (或熱鍵) 、快速鍵和應用程式按鍵。

在前景) 處理時,原始鍵盤輸入會攔截、隱藏並路由傳送至應用程式 (。

注意

Secure Attention Sequence (SAS) 按鍵組合 (包括 Ctrl-Alt-Del 和 Windows-L) 將繼續由系統處理。

public ref class KeyboardDeliveryInterceptor sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class KeyboardDeliveryInterceptor final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class KeyboardDeliveryInterceptor
Public NotInheritable Class KeyboardDeliveryInterceptor
繼承
Object Platform::Object IInspectable KeyboardDeliveryInterceptor
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10586.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v2.0 引進)
應用程式功能
inputForegroundObservation

備註

KeyEventArgs.KeyStatus傳回的RepeatCount屬性值一律為 0。

KeyEventArgs.KeyStatus傳回的WasKeyDown屬性值一律為 false。

如果 Handled 設定為 false,就會發生錯誤。

屬性

IsInterceptionEnabledWhenInForeground

取得或設定應用程式是否覆寫原始鍵盤輸入的系統處理,包括快速鍵、便捷鍵 (或熱鍵) 、快速鍵和應用程式按鍵等按鍵組合。

在前景) 處理時,原始鍵盤輸入會攔截、隱藏並路由傳送至應用程式 (。

注意

Secure Attention Sequence (SAS) 按鍵組合 (包括 Ctrl-Alt-Del 和 Windows-L) 將繼續由系統處理。

方法

GetForCurrentView()

擷取與目前應用程式檢視相關聯的 KeyboardDeliveryInterceptor 物件。

事件

KeyDown

發生于按下鍵盤按鍵時。 狀態資訊和事件資料會透過此事件路由傳送,而不是 CoreWindow.KeyDown

KeyUp

當按下的鍵盤按鍵放開時發生。 狀態資訊和事件資料會透過此事件路由傳送,而不是 CoreWindow.KeyUp

適用於

另請參閱