File

projects/wms-framework/src/lib/models/events/KeyEventArgs.ts

Description

Class for storing information about key events

Extends

RoutedEventArgs

Index

Properties
Accessors

Properties

_handled
Type : boolean
Default value : false
Key
Type : Key
Default value : Key.None
OriginalEvent
Type : KeyboardEvent
Default value : null

Original event

PlatformKeyCode
Type : number
OriginalSource
Type : any
Default value : null
Inherited from RoutedEventArgs
Defined in RoutedEventArgs:25

Accessors

Handled
getHandled()
setHandled(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void
import { Key } from '../enums/Key';
import { RoutedEventArgs } from './RoutedEventArgs';

/**
 *  Class for storing information about key events
 *
 * @export
 * @class KeyEventArgs
 * @wType System.Windows.Input.KeyEventArgs
 */
export class KeyEventArgs extends RoutedEventArgs {
  _handled: boolean = false;
  get Handled(): boolean {
    return this._handled;
  }

  set Handled(value: boolean) {
    if (this._handled != value) {
      this._handled = value;
      if (value) {
        event.preventDefault();
      }
    }
  }

  Key: Key = Key.None;
  PlatformKeyCode: number;

  /**
   * Original event
   *
   * @type {KeyboardEvent}
   * @memberof KeyEventArgs
   * @wIgnore
   */
  OriginalEvent: KeyboardEvent = null;
}

result-matching ""

    No results matching ""