@@ -181,10 +181,22 @@ public unsafe struct KeyboardState : IInputStateTypeInfo
181181 // will be the default in new editor [InputControl(name = "IMESelected", layout = "Button", bit = 0, sizeInBits = 1, synthetic = true)]
182182 //public byte modifiers;
183183
184+ /// <summary>
185+ /// Create a new KeyboardState with the given keys pressed.
186+ /// </summary>
187+ /// <remarks>IMESelected state will not be set.</remarks>
188+ /// <param name="pressedKeys">pressed keys</param>
189+ /// <exception cref="ArgumentNullException"></exception>
184190 public KeyboardState ( params Key [ ] pressedKeys ) : this ( false , pressedKeys )
185191 {
186192 }
187193
194+ /// <summary>
195+ /// Create a new KeyboardState with the given keys pressed.
196+ /// </summary>
197+ /// <param name="IMESelected">true if IMESelected state is enable</param>
198+ /// <param name="pressedKeys">pressed keys</param>
199+ /// <exception cref="ArgumentNullException"></exception>
188200 public KeyboardState ( bool IMESelected , params Key [ ] pressedKeys )
189201 {
190202 if ( pressedKeys == null )
@@ -1033,7 +1045,7 @@ public class Keyboard : InputDevice, ITextInputReceiver, IEventPreProcessor
10331045 /// in <see cref="allKeys"/>.
10341046 /// </summary>
10351047 /// <value>Total number of key controls.</value>
1036- public const int KeyCount = ( int ) Key . OEM5 ; // Not updated to Key.F24 for not breaking the API //(int)Key.F24; // without IMESelected
1048+ public const int KeyCount = ( int ) Key . OEM5 ; // Not updated to Key.F24 for not breaking the API
10371049 internal const int ExtendedKeyCount = ( int ) Key . F24 ;
10381050
10391051 /// <summary>
@@ -2651,7 +2663,15 @@ public void OnIMECompositionChanged(IMECompositionString compositionString)
26512663 }
26522664 }
26532665
2654- public unsafe bool PreProcessEvent ( InputEventPtr currentEventPtr )
2666+ /// <summary>
2667+ /// Preprocess the event for handling IME Selected state compatibility
2668+ /// </summary>
2669+ /// <remarks>
2670+ /// This will be removed when supported editor don't send anymore the compatibility IME Selected state
2671+ /// </remarks>
2672+ /// <param name="currentEventPtr">The event to preprocess.</param>
2673+ /// <returns>True if event should be processed further, false if event should be skipped and ignored.</returns>
2674+ unsafe bool IEventPreProcessor . PreProcessEvent ( InputEventPtr currentEventPtr )
26552675 {
26562676 if ( currentEventPtr . type == StateEvent . Type )
26572677 {
0 commit comments