Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8821303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:49:11+00:00 2026-06-14T05:49:11+00:00

Can the Android emulator capture a key-press event of the computer (running the emulator)

  • 0

Can the Android emulator capture a key-press event of the computer (running the emulator) keyboard, such as: direction key, backspace key and enter key? If it could do that, can you tell me the key code of the implentation? Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:49:13+00:00Added an answer on June 14, 2026 at 5:49 am

    The mapping between PC keyboard keys and devices keys is detailed here: http://developer.android.com/tools/help/emulator.html#KeyMapping

    And you can respond to them using the keycodes that are listed here: http://developer.android.com/reference/android/view/KeyEvent.html

    For instance:

    public class TestActivity extends Activity {
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
    
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        Log.i("test", "onKeyDown(" + keyCode + ", " + event +")");
        return super.onKeyDown(keyCode, event);
    }
    

    }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I mean I can't type from my laptop keyboard into android emulator anymore. Virtual
When my android emulator is running, I can use LogCat to view log, but
I can't see any calendar in Android Emulator. I want to use event functions
I am having trouble connecting my android emulator to my computer. I can send
Can Android be woken up from sleep by a peripheral device such as an
My android emulator can't access the internet. It is connected to the network. It
How can I connect my Android emulator to the internet, e.g. to use the
Can multi-touch events be tested on the Android Emulator? Or is there any way
How can we connect to Android emulator through VNC with the help of noVNC
Can I simulate an sdcard presence in the android emulator?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.