mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-31 23:29:27 +08:00
fix: 虚拟键盘多次监听
This commit is contained in:
parent
787fc7e837
commit
def189e5bc
@ -446,7 +446,7 @@ export function getVitualKeyOnce(
|
|||||||
const key = Keyboard.get('full')!;
|
const key = Keyboard.get('full')!;
|
||||||
key.withAssist(assist);
|
key.withAssist(assist);
|
||||||
const id = mainUi.open('virtualKey', { keyboard: key });
|
const id = mainUi.open('virtualKey', { keyboard: key });
|
||||||
key.on('emit', (item, assist, index, ev) => {
|
key.once('emit', (item, assist, index, ev) => {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
if (emitAssist) {
|
if (emitAssist) {
|
||||||
if (emittable.length === 0 || emittable.includes(item.key)) {
|
if (emittable.length === 0 || emittable.includes(item.key)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user