The None
field of the KeyboardModifiers
enum represents a state where no keyboard modifier keys (such as Alt, Ctrl, or Shift) are pressed. This is useful for checking if a key event occurred without any modifier keys being involved.
The None
field of the KeyboardModifiers
enum represents a state where no keyboard modifier keys (such as Alt, Ctrl, or Shift) are pressed. This is useful for checking if a key event occurred without any modifier keys being involved.
Use KeyboardModifiers.None
when you need to determine if no modifier keys are active during a keyboard event. This can be particularly useful in input handling scenarios where specific actions are triggered only when no modifiers are pressed.
// Example of checking if no keyboard modifiers are pressed if (currentModifiers == KeyboardModifiers.None) { // Perform action when no modifiers are pressed HandleNoModifierAction(); }