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 6163183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:46:55+00:00 2026-05-23T21:46:55+00:00

In the official Microsoft documentation there’s only one paragraph mentioning how controls behave to

  • 0

In the official Microsoft documentation there’s only one paragraph mentioning how controls behave to keyboard (at least what I could find):

http://msdn.microsoft.com/en-us/library/cc189015(v=VS.95).aspx#inputting_text

Text Input and Controls

Certain controls react to keyboard events with their own handling. For instance, a TextBox is a control that is designed to capture and then visually represent text that was entered by using the keyboard, and it uses KeyUp and KeyDown in its own logic to capture keystrokes, then also raises its own TextChanged event if the text actually changed. You can still generally add handlers for KeyUp and KeyDown to a TextBox, or any related control that is intended to process text input. However, as part of its intended design, a control might not respond to all key values that are directed to it through key events. Behavior is specific to each control. As an example, ButtonBase (base class for Button) processes KeyUp so that it can check for the SPACEBAR or ENTER key, which it considers equivalent to a mouse left button down for purposes of raising a Click event. This processing of the event is accomplished by ButtonBase overriding the virtual method OnKeyUp, and in its implementation it sets Handled = true. The result is that any parent of a button listening for a key event in the case of a SPACEBAR would not receive the already-handled event for its own handlers. Another example is TextBox. Some keys such as the ARROW keys are not considered text by TextBox and are instead considered specific to the control UI behavior, and the TextBox marks these event cases as handled.

Custom controls can implement their own similar override behavior for key events by overriding OnKeyDown / OnKeyUp. If your custom control processes specific accelerator keys, or has control or focus behavior that is similar to the scenario described for TextBox, you should place this logic in your own OnKeyDown / OnKeyUp overrides.

Is there a more complete reference anywhere?

For example in an AutoCompleteBox you can navigate to suggestions pressing up / down and choose one pressing enter, etc etc.

Surely there must be a better way than focusing every single control and pressing every single key on the keyboard to find out 🙂

  • 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-05-23T21:46:56+00:00Added an answer on May 23, 2026 at 9:46 pm

    Look in source code \ Reflector.

    There are lots of quirks in controls text processing, I doubt that any one will care to document this. For instance KeyDown event of TextBox is not fired when user presses BackSpace when there is text inside control, but fires when the is no text, etc. The quickest way to find how something work is to dig into source.

    I have figured a nice rule: if for some reason you need to know how some control will behave is some situation don’t waste you time trying to code (reproduce) this situation, just get Reflector and look at source code.

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

Sidebar

Related Questions

Beyond the official documentation, are there any recommended resources for learning to build jQuery
The official data sheet of Microsoft Surface says that there is no audio input
Is there an official convention for naming private fields in VB.NET? For example, if
Are there official MIME types for the .cs (C# source), .resx, .aspx, etc. files
Is there an official C# guideline for the order of items in terms of
There is not official standard dealing with the layout of about boxes , which
Is Crypt32.dll included with Windows Vista and/or Windows 7? An official microsoft link confirming
So the official XML-RPC standard doesn't support 64-bit values. But in these modern times,
I have seen the official demos on lwjgl.org but I would like to see
Does anyone know the official method for submitting feedback on C# 4.0 so that

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.