11import { dispatchKeyToEvent } from "./module_ProjectAPIs" ;
22import type {
3- MobileKeyboardZoneToKeyMapping ,
3+ MobileKeyboardBtns ,
44 MobileKeyboardType ,
55} from "./module_ProjectAPIs" ;
66
77export type KeyboardConfig = {
88 type : MobileKeyboardType ;
9- mapping : MobileKeyboardZoneToKeyMapping ;
9+ btns : MobileKeyboardBtns ;
1010} ;
1111export type UI = any ;
1212
@@ -16,10 +16,10 @@ export declare function useModal<T>(
1616
1717export declare function KeyboardEditor (
1818 props : {
19- zoneToKeyMapping : MobileKeyboardZoneToKeyMapping ;
19+ mobileKeyboardBtns : MobileKeyboardBtns ;
2020 } ,
2121 emits : {
22- resolved : ( result : MobileKeyboardZoneToKeyMapping ) => void ;
22+ resolved : ( result : MobileKeyboardBtns ) => void ;
2323 }
2424) : UI ;
2525
@@ -31,7 +31,6 @@ export declare function KeyboardEditor(
3131 *
3232 * ## Props:
3333 * - `ZoneToKeyMapping`: keyboard zone to key mapping configuration
34- * - `systemKeyConfig`: Optional array to customize system keys.If omitted, no system keys will be rendered.
3534 *
3635 * ## Slots:
3736 * - `gameView`: Should contain ProjectRunner component
@@ -52,34 +51,13 @@ export declare function KeyboardEditor(
5251
5352export declare function MobileKeyboardView (
5453 props : {
55- zoneToKeyMapping : MobileKeyboardZoneToKeyMapping ;
54+ mobileKeyboardBtns : MobileKeyboardBtns ;
5655 } ,
5756 emits : {
5857 close : [ ] ;
5958 rerun : [ ] ;
6059 }
6160) : UI ;
62- // {
63- // const zones = Object.keys(ZoneToKeyMapping);
64- // const zoneToKey = ZoneToKeyMapping;
65- // const handleKeyEvent = (type: string, key: string, code: string) => {
66- // dispatchKeyToEvent(type, code);
67- // };
68-
69- // return `
70- // <div className="phone-layout">
71- // <slot name="gameView">
72- // </slot>
73- // <div className="keyboard-zones">
74- // ${keyButtons}
75- // </div>
76- // <div className="systemA" @click="emit('rerun')">
77- // </div>
78- // <div className="systemB" @click="emit('close')">
79- // </div>
80- // </div>
81- // `;
82- // }
8361
8462// key UI in Keyboard. provide to MobileKeyboardView and MobileKeyboardEidt
8563// active is used to indicate whether a button has functionality(onKeyEvent).
0 commit comments