A keyboard generates two scan codes when the user types a key

Slides:



Advertisements
Similar presentations
Keyboard Training Instruction by: Connie Hutchison & Christopher McCoy.
Advertisements

Operational & Function Keys Notes 2
QWERTY Keyboards.
DEVELOPING ICT SKILLS PART -TWO
CAN HELP iPC1550KP Keypad and Reprogramming Overview.
1.
Technology Education and Information Design Copyright 2009 MediTech NUI: New User Interface Online Training.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
TOPIC: KEYBOARD PRESENTED BY: MS. AMBER AMAR. DEFINITON OF KEYBOARD Keyboard is an input device which resembles with a type writer like keys that enables.
Computer System Examples? Input Output Devices System Unit Devices
Keyboard In computing, a keyboard is an input device, partially modeled after the typewriter keyboard, which uses an arrangement of buttons or keys, to.
Get to Know Your Keyboard. Operational Keys Escape (Esc) – allows you to exit unwanted menus and dialog boxes Tab – used to indent; moves the cursor 5.
What are shortcut keys? Shortcut keys are a way of navigating certain menu's and features by using the keyboard instead of manually searching through.
Win’XP keyboard short cuts CTRL CTRL (Copy the selected item) CTRL+SHIFT CTRL+SHIFT (Create a shortcut to the selected item) CTRL+RIGHT ARROW CTRL+RIGHT.
Keyboard Input device QWERTY, 104 key is standard –From typewriters – reduce jamming Other keyboards have been made for special uses –Dvorak.
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
Interacting with your Computer Chapter 2 Learning Objectives Identify five key groups on standard computer keyboard Name six special purpose keys.
Lesson: 2 Common Features and Commands After completing this lesson, you will be able to: Identify the main components of the user interface. Identify.
Programming Input Devices. Getting the device state Schemes for processing input – Polling – Callbacks Ways to intercept messages from input devices –
1 CA201 Word Application Presenting Information in Tables and Columns Week # 5 By Tariq Ibn Aziz Dammam Community college.
QWERTYUIOP ?. Parts & Layout of the 1. Main Keypad 2. Functions Keys 3. Modifier Keys 4. Legacy keys 5. Navigation Keys 6. Numeric Keypad 7. Indicator.
The New User Interface MEDITECH Training & Education.
Excel Tutorial 8 Developing an Excel Application
1.4 Keyboard Training.
Word Lesson 1 STUDY GUIDE.
Benchmark Series Microsoft Word 2010 Level 1
Computer Literacy BASICS
Getting Started with Application Software
Practical Office 2007 Chapter 10
Chapter 1: An Introduction to Visual Basic 2015
Presented by: JAHANGIR SHOKAT HUSNAIN ANSER.
Introduction to Microsoft Access
Interfacing.
Jim Fawcett Derived from a presentation by Dmitri Volper Su ‘2001
Summer 2001 James Amyot Robert Gowans
PHYSICAL CYCLE COUNTS Standard Work Instruction: Physical Cycle Counts
Guide To UNIX Using Linux Third Edition
Chapter Eleven Handling Events.
Opening an Existing File
Windows Accessibility Options
GETTING TO KNOW YOUR KEYBOARD
Document Processing Part 2
Epic In Basket.
1.4 Keyboard Training Keyboard Training.
Exploring Microsoft Excel
بسم الله الرحمن الرحيم.
Benchmark Series Microsoft Word 2016 Level 1
Benchmark Series Microsoft Word 2016 Level 2
Keyboarding – Alphabetic Keys
Keyboarding – Alphabetic Keys
Dep. of Information Technology By: Raz Dara Mohammad Amin
Computer Basics.
Using Templates and Library Items
Keyboarding – Alphabetic Keys
Practical hands on skills
Keyboarding – Alphabetic Keys
Year 9 Entry Level Computing
Input and Output devices in a Computer
01.00 Use the touch method in operating the keyboard and numeric keypad Objectives Execute the touch method in operating the alphabetic keys.
Keyboarding – Alphabetic Keys
Keyboarding Vocabulary
Keyboarding – Alphabetic Keys
Keyboarding – Alphabetic Keys
Creating Additional Input Items
HIBBs is a program of the Global Health Informatics Partnership Learning the Basics of Microsoft Word 2019 and Microsoft office support TFN
Fundamentals of Using Excel
Keyboarding – Alphabetic Keys
Keyboarding – Alphabetic Keys
Keyboarding Vocabulary
Presentation transcript:

A keyboard generates two scan codes when the user types a key . Assigned to each key on a keyboard is a unique value called a scan code; it is a device-dependent identifier for the key on the keyboard. A keyboard generates two scan codes when the user types a key one when the user presses the key and another when the user releases the key. The keyboard device driver interprets a scan code and translates (maps) it to a virtual-key code; virtual-key code is a device-independent value defined by the system that identifies the purpose of a key. As keyboard layouts vary from language to language, Windows offers only the core set of virtual-key codes that are found on all keyboards. This core set includes English characters, numbers, and a few critical keys, such as the function and arrow keys. Keys that are not included in the core set also have virtual-key code assignments, but their values vary from one keyboard layout to the next. You should depend only on the virtual-key codes that are in the core set.

After translating a scan code, the keyboard layout creates a message that includes the scan code, the virtual-key code, and other information about the keystroke, and then places the message in the system message queue. The system removes the message from the system message queue and posts it to the message queue of the appropriate thread. Eventually, the thread's message loop removes the message and passes it to the appropriate window procedure for processing.

Keyboard Focus and Activation The keyboard focus is a temporary property of a window. The system shares the keyboard with all windows on the display by shifting the keyboard focus, at the user's direction, from one window to another. The window that has the keyboard focus receives (from the message queue of the thread that created it) all keyboard messages until the focus changes to a different window. A thread can call the GetFocus function to determine which of its windows (if any) currently has the keyboard focus. SetFocus function to give the keyboard focus to one of its windows. When the keyboard focus changes from one window to another, the system sends a WM_KILLFOCUS message to the window that has lost the focus, and then sends a WM_SETFOCUS message to the window that has gained the focus. A thread can activate a top-level window by using the SetActiveWindow function. It can determine whether a top-level window it created is active by using the GetActiveWindow function.

Keystroke Messages Pressing a key causes a WM_KEYDOWN or WM_SYSKEYDOWN message to be placed in the thread message queue attached to the window that has the keyboard focus. Releasing a key causes a WM_KEYUP or WM_SYSKEYUP message to be placed in the queue. Key-up and key-down messages typically occur in pairs, but if the user holds down a key long enough to start the keyboard's automatic repeat feature, the system generates a number of WM_KEYDOWN or WM_SYSKEYDOWN messages in a row. It then generates a single WM_KEYUP or WM_SYSKEYUP message when the user releases the key.

System keystroke System keystroke messages are primarily used by the system rather than by an application. The system uses them to provide its built-in keyboard interface to menus and to allow the user to control which window is active. System keystroke messages are generated when the user types a key in combination with the ALT key, or when the user types and no window has the keyboard focus (for example, when the active application is minimized). In this case, the messages are posted to the message queue attached to the active window

If your window procedure must process a system keystroke message, make sure that after processing the message, the procedure passes it to the DefWindowProc function. Otherwise, all system operations involving the ALT key will be disabled whenever the window has the keyboard focus, that is, the user won't be able to access the window's menus or System menu, or use the ALT+ESC or ALT+TAB key combination to activate a different window. Nonsystem keystroke messages are used by application windows; the DefWindowProc function does nothing with them. A window procedure can discard any nonsystem keystroke messages that it does not need.

System and non system keystrokes The system makes a distinction between system keystrokes and nonsystem keystrokes. System keystrokes produce system keystroke messages, WM_SYSKEYDOWN and WM_SYSKEYUP. Nonsystem keystrokes produce nonsystem keystroke messages, WM_KEYDOWN and WM_KEYUP.

An application can use the following values to manipulate the keystroke flags. KF_ALTDOWN Manipulates the ALT key flag, which indicated if the ALT key is pressed. KF_DLGMODE Manipulates the dialog mode flag, which indicates whether a dialog box is active. KF_EXTENDED Manipulates the extended key flag. KF_MENUMODE Manipulates the menu mode flag, which indicates whether a menu is active. KF_REPEAT Manipulates the repeat count. KF_UP Manipulates the transition state flag.

The extended keys consist of Extended-Key Flag The extended-key flag indicates whether the keystroke message originated from one of the additional keys on the enhanced keyboard. The extended keys consist of the ALT and CTRL keys on the right-hand side of the keyboard; the INS, DEL, HOME, END, PAGE UP, PAGE DOWN, arrow keys in the clusters to the left of the numeric keypad; the NUM LOCK key, the BREAK (CTRL+PAUSE) key, the PRINT SCRN key, and the divide (/) and ENTER keys in the numeric keypad. The extended-key flag is set if the key is an extended key.

Previous Key-State Flag The previous key-state flag indicates whether the key that generated the keystroke message was previously up or down. It is 1 if the key was previously down and 0 if the key was previously up. You can use this flag to identify keystroke messages generated by the keyboard's automatic repeat feature. T his flag is set to 1 for WM_KEYDOWN and WM_SYSKEYDOWN keystroke messages generated by the automatic repeat feature. It is always set to 0 for WM_KEYUP and WM_SYSKEYUP messages. Context Code The context code indicates whether the ALT key was down when the keystroke message was generated. The code is 1 if the ALT key was down and 0 if it was up. Transition-State Flag The transition-state flag indicates whether pressing a key or releasing a key generated the keystroke message. This flag is always set to 0 for WM_KEYDOWN and WM_SYSKEYDOWN messages; it is always set to 1 for WM_KEYUP and WM_SYSKEYUP messages.

Character Message Processing