Use the KeyUp and KeyDown events to determine what physical key on the keyboard is pressed.
- [Instructor] In this demonstration,…I'll look at how to work with…the KeyUp and the KeyDown events.…These events fire when the user presses a physical key…on their keyboard.…So as they're pressing the key,…first thing that'll happen is the KeyDown event…will fire.…Then when they release the key,…the KeyUp event will fire.…And this allows me to know which key they're typing.…You're not going to use this very often to find out…where they type the letter, like the letter R,…the letter X on their computer,…but you will use it for finding out…whether they press the home key…so that you can navigate them to a screen…in your application.…
Or maybe you have a way of looking up…special information about a customer…using Control Shift X.…You'll want to know that the user was holding…down the Control and the Shift and pressing…the X keys so that you can go do that Look up task.…Here's an example.…I have in this first text box,…the first principle is that the focus needs to be…in the text box in order for it to receive…the key events.…
- Recognize routed events.
- Explain event signatures.
- Determine how to wire up event handlers.
- Define event bubbling and event tunneling.
- Break down how to program mouse events.
- Show how to program keyboard and ink events.
Skill Level Intermediate
1. Understand the Event Model
2. Mouse Events
3. Keyboard and Ink Events
Next steps1m 34s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.