Hi all, Iam trying the same on linux application side. which ioctl i need to call to be successful, iam taking the scancodes as arguments for my application. But iam unable to print them on screen. In the driver Implementation, driver is calling "input_report_key()"; -> input_event(); From here can any one tell me how it goes to Android space.
Thanks in advance, Yog On Feb 15, 3:02 pm, Houcem Berrayana <[email protected]> wrote: > I found the solution: > > there is an excellent post > :http://letsgoustc.spaces.live.com/blog/cns!89AD27DFB5E249BA!488.entry > > new Thread(new Runnable() { > > @Override > public void run() { > KeyEvent backEvtDown = new > KeyEvent(KeyEvent.ACTION_DOWN, > KeyEvent.KEYCODE_BACK); > KeyEvent backEvtUp = new > KeyEvent(KeyEvent.ACTION_UP, > KeyEvent.KEYCODE_BACK); > > mActivity.dispatchKeyEvent(backEvtDown); > > mActivity.dispatchKeyEvent(backEvtUp); > > //instrumentation.sendKeyDownUpSync(KeyEvent.KEYCODE_HOME); > } > }).start(); > > On 15 fév, 10:03, Houcem Berrayana <[email protected]> wrote: > > > Hi Rogério, > > Thank you for your help. Actually I'm using full screen mode and I > > can't use the status bar. I'm using a very special device so that I > > really need to know how to sendkeyeventsprogrammatically. Do I have > > access to IWindowManager for example (I can't see it in the SDK)? I > > read so many examples that used this class to solve tis problem. > > example here > > :http://www.anddev.org/throwing-simulating_keystrokes_programatically-... > > > Best Regards. > > > On 12 fév, 20:10, Rogério de Souza Moraes <[email protected]> > > wrote: > > > > Hi Houcem, > > > > take a look at the code ofandroid-x86 that implaments a way to use MENU, > > > BACK and HOME buttons in a device with just touchscreen. i if the name of > > > the file that implements tihs is touchable.java > > > >http://www.android-x86.org/documents/touch-only-device-howto > > > > Regards, > > > > Rogerio > > > > 2010/2/12 Houcem Berrayana <[email protected]> > > > > > Hi all, > > > > > I want to simulate Home and Back buttons. I tried to see how to > > > > dispatch akeyevent but I didn't knew exactly how to do ?? > > > > I found some examples using IWindowManager. but I haven't found this > > > > class in the SDK. Is there any other way to sendkeyevents? > > > > Thanks by advance and excuse me for my horrible English. > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "AndroidDevelopers" group. > > > > To post to this group, send email [email protected] > > > > To unsubscribe from this group, send email to > > > >[email protected]<android-developers%2Bunsubs > > > > [email protected]> > > > > For more options, visit this group at > > > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

