如何在Android上模拟PC的Esc键 [英] How to simulate PC's Esc key on android

查看:679
本文介绍了如何在Android上模拟PC的Esc键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个可以在android上播放Flash的应用程序,但是我无法模拟ESC键,因为许多Flash游戏都需要ESC键才能返回主菜单,如果没有此键,我制作的应用程序将成为无用.那么谁能告诉我如何模拟呢?我可以只发送一个密码吗?但我也不知道键码...

I'm writing an app that can play flash on android, but I can't simulate ESC key, since a lot of flash games need ESC key to return to the main menu, without this key the app I made will be useless. So who could tell me how to simulate this? Can I just send a keycode? but I don't know the keycode too...

推荐答案

大多数游戏为此使用BACK键....请参见

Most games use the BACK key for this.... See http://developer.android.com/sdk/android-2.0.html

请注意,虽然有一个关键事件ESCAPE(如Ezeh所指出的),但仅在API级别11(Android 3.0及更高版本)中可用-

Note that, while there is a key event ESCAPE (as Ezeh points out), that is only available at API level 11 (which is Android 3.0 and above - http://developer.android.com/guide/appendix/api-levels.html), which is not very widely available in devices yet.

这篇关于如何在Android上模拟PC的Esc键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆