@@ -331,6 +331,52 @@ public static partial class UioHook
331331 public static extern void SetPostTextDelayX11 ( ulong delayNanoseconds ) ;
332332#endif
333333
334+ /// <summary>
335+ /// Checks whether events of type <see cref="EventType.KeyTyped" /> are enabled.
336+ /// </summary>
337+ /// <returns>
338+ /// <see langword="true" /> if events of type <see cref="EventType.KeyTyped" /> are enabled. Otherwise,
339+ /// <see langword="false" />.
340+ /// </returns>
341+ /// <remarks>
342+ /// If the application doesn't use events of type <see cref="EventType.KeyTyped" />, then they should be disabled
343+ /// so that there is no performance penalty and no subtle system-wide side effects.
344+ /// </remarks>
345+ #if NET7_0_OR_GREATER
346+ [ LibraryImport ( LibUioHook , EntryPoint = "hook_is_key_typed_enabled" ) ]
347+ [ UnmanagedCallConv ( CallConvs = [ typeof ( CallConvCdecl ) ] ) ]
348+ [ return : MarshalAs ( UnmanagedType . I1 ) ]
349+ public static partial bool IsKeyTypedEnabled ( ) ;
350+ #else
351+ [ DllImport ( LibUioHook , EntryPoint = "hook_is_key_typed_enabled" , CallingConvention = CallingConvention . Cdecl ) ]
352+ [ return : MarshalAs ( UnmanagedType . I1 ) ]
353+ public static extern bool IsKeyTypedEnabled ( ) ;
354+ #endif
355+
356+ /// <summary>
357+ /// Sets the value which indicates whether events of type <see cref="EventType.KeyTyped" /> are enabled. The default
358+ /// value is <see langword="true" />.
359+ /// </summary>
360+ /// <param name="enabled">
361+ /// <see langword="true" /> if events of type <see cref="EventType.KeyTyped" /> should be enabled. Otherwise,
362+ /// <see langword="false" />.
363+ /// </param>
364+ /// <remarks>
365+ /// If the application doesn't use events of type <see cref="EventType.KeyTyped" />, then they should be disabled
366+ /// so that there is no performance penalty and no subtle system-wide side effects.
367+ /// </remarks>
368+ #if NET7_0_OR_GREATER
369+ [ LibraryImport ( LibUioHook , EntryPoint = "hook_set_key_typed_enabled" ) ]
370+ [ UnmanagedCallConv ( CallConvs = [ typeof ( CallConvCdecl ) ] ) ]
371+ public static partial void SetKeyTypedEnabled ( [ MarshalAs ( UnmanagedType . I1 ) ] bool enabled ) ;
372+ #else
373+ [ DllImport (
374+ LibUioHook ,
375+ EntryPoint = "hook_set_key_typed_enabled" ,
376+ CallingConvention = CallingConvention . Cdecl ) ]
377+ public static extern void SetKeyTypedEnabled ( [ MarshalAs ( UnmanagedType . I1 ) ] bool enabled ) ;
378+ #endif
379+
334380 /// <summary>
335381 /// Checks whether access to macOS Accessibility API is enabled for the process, optionally prompting the user
336382 /// if it is disabled.
0 commit comments