Draft for native ppt (need to commit, restructuring stuff)
This commit is contained in:
parent
69537aee79
commit
69b4730bd8
3 changed files with 40 additions and 1 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 655cc54c564b84ef2827f0b2152ce3811046201e
|
||||
Subproject commit b97dd67fdc75a39d0fc99ceee573921ba3e73b1f
|
26
shared/js/PPTListener.ts
Normal file
26
shared/js/PPTListener.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
namespace ppt {
|
||||
export enum EventType {
|
||||
KEY_PRESS,
|
||||
KEY_RELEASE,
|
||||
KEY_TYPED
|
||||
}
|
||||
|
||||
export interface KeyEvent {
|
||||
readonly type: EventType;
|
||||
|
||||
readonly key: string;
|
||||
readonly key_code: string;
|
||||
|
||||
readonly key_ctrl: boolean;
|
||||
readonly key_windows: boolean;
|
||||
readonly key_shift: boolean;
|
||||
readonly key_alt: boolean;
|
||||
}
|
||||
|
||||
export declare function initialize() : Promise<void>;
|
||||
export declare function finalize(); /* most the times not really required */
|
||||
|
||||
export declare function register_key_hook(callback: (event: KeyEvent) => any, cancel: boolean);
|
||||
export declare function unregister_key_hook(callback: (event: KeyEvent) => any);
|
||||
|
||||
}
|
13
web/js/WebPPTListener.ts
Normal file
13
web/js/WebPPTListener.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
/// <reference path="../declarations/imports_shared.d.ts"/>
|
||||
|
||||
namespace ppt {
|
||||
|
||||
export function initialize() : Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
export function finalize() {}
|
||||
|
||||
export function register_key_hook(callback: (event: KeyEvent) => any, cancel: boolean) {}
|
||||
export function unregister_key_hook(callback: (event: KeyEvent) => any) {}
|
||||
}
|
Loading…
Add table
Reference in a new issue