Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

想在全局设定一个back键 #19

Open
Veng0923 opened this issue Mar 2, 2021 · 5 comments
Open

想在全局设定一个back键 #19

Veng0923 opened this issue Mar 2, 2021 · 5 comments

Comments

@Veng0923
Copy link

Veng0923 commented Mar 2, 2021

v-on:global_key_up:escape="{global_back}"
ret_t home_global_back(home_t *home) { return navigator_back(); }
但是没有生效,

@Veng0923
Copy link
Author

Veng0923 commented Mar 2, 2021

日志上输入input 是 27 也就是 esc 但是没有回调为什么

@xianjimli
Copy link
Member

下午我看看

@xianjimli
Copy link
Member

我试了一下,没什么问题啊:

这样写,按下esc键,会打印debug,说明按键触发命令是正常的:

v-on:global_key_up:escape="{debug}"

这样写,可以实现back的功能,

<window closable="no"
 v-on:global_key_up:escape="{fscript, args=back()}">
...
</window>

home_global_back的API注释是否有问题,导致没有生成对应的命令?

@Veng0923
Copy link
Author

Veng0923 commented Mar 2, 2021

已改成
v-on:global_key_up:escape="{debug}"
日志:
image

@xianjimli
Copy link
Member

更新awtk/awtk-mvvm到最新代码,先在PC上试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants