nodeguy/src/lib/QtGui/QEvent/QKeyEvent.ts
Atul R 01a6476f9c
Separate events and signals (#287)
* Wip

* Improve constructor typings

* Fixes types for Gui and Core

* QtGui

* Remove unnecessary imports and fix types on abstract classes

* Adds half of qwidgets

* Add all widgets

* cleans up

* fix failing test

* lint fix

* fix demo
2019-12-20 18:33:05 +05:30

25 lines
581 B
TypeScript

import addon from '../../utils/addon';
import { NativeElement } from '../../core/Component';
export class QKeyEvent {
native: NativeElement;
constructor(event: NativeElement) {
this.native = new addon.QKeyEvent(event);
}
text(): string {
return this.native.text();
}
key(): number {
return this.native.key();
}
modifiers(): number {
return this.native.modifiers();
}
count(): number {
return this.native.count();
}
isAutoRepeat(): boolean {
return this.native.isAutoRepeat();
}
}