Windows Accessibility

The Win32 API includes a number of features that make it easier for persons with disabilities to use their computers. These features are extensions to the operating system, and they affect the behavior of the system, no matter which application is currently running.

To make it easy for you to work with these settings from within your applications, we've created a single class module, Accessibility (ACCESSIBILITY.CLS), that provides six groups of properties representing the six areas of functionality. Table 9.2 describes the six areas of functionality, with pointers to Tables 9.3 through 9.8, which describe each of the properties in greater detail and provide references to the figures displaying the appropriate dialog boxes. In addition, because almost all these properties are available through the Windows Control Panel, Figures 9.1 through 9.11 show how users can set the same properties directly. The figures are presented in the order in which you'll come across them as you work through the accessibility dialogs. Each figure contains labels pointing to controls on the dialog box. The text for each label either indicates the corresponding property in the Accessibility class or the figure that corresponds to the dialog box you'll see if you click the button.

In Figure 9.11, the prefix “xx” acts as a placeholder for any one of “sk”, “mk”, and so on.

Table 9.2: Win32 Accessibility Features

Feature Description
AccessTimeout Enables a user to specify a timeout interval after which system-wide accessibility features are automatically turned off. The AccessTimeout feature is intended for computers that are shared by several users with different preferences. Each individual can use hot keys or the Control Panel to enable preferred features. After a user leaves, the enabled features will be automatically disabled by the timeout. The accessibility features affected by the timeout are FilterKeys, MouseKeys, StickyKeys, and ToggleKeys. AccessTimeout properties in the Accessibility class are described in Table 9.3
FilterKeys Enables control of keyboard properties, such as the amount of time before a keystroke is accepted as input and the amount of time before a keystroke begins to repeat. FilterKeys properties in the Accessibility class are described in Table 9.4
MouseKeys Enables the user to control the mouse pointer using the numeric keypad. MouseKeys properties in the Accessibility class are described in Table 9.5
StickyKeys Enables the user to type key combinations, such as Ctrl+Alt+Del, in sequence rather than at the same time. StickyKeys properties in the Accessibility class are described in Table 9.6
SoundSentry Displays a visual signal when a sound is generated by a Windows-based application or an MS-DOS application running in a window. SoundSentry properties in the Accessibility class are described in Table 9.7
ToggleKeys Provides sound feedback when the user turns on or off the CapsLock, ScrollLock, or NumLock key. ToggleKeys properties in the Accessibility class are described in Table 9.8

Table 9.3: AccessTimeOut Properties Provided by the Accessibility Class

Property Description Figure
atActive If True, a timeout has been set. Unless set, the Timeout value will have no effect 9.11
atAvailable If True, you can set a timeout period (read-only)
atFeedback If true, a sound effect is played when the timeout period elapses 9.11
atTimeOutMilliseconds The number of milliseconds of idle time before Accessibility turns off. Only 5, 10, 15, 20, 25, and 30 minutes (each value multiplied by 60,000 to convert to milliseconds) are allowed 9.11

Table 9.4: FilterKeys Properties Provided by the Accessibility Class

Property Description Figure
fkActive If True, the FilterKeys features are on 9.1
fkAvailable If true, the FilterKeys features are available (read-only)
fkBounceMSec Specifies the amount of time, in milliseconds, that must elapse after a key is released before the computer will accept a subsequent press of the same key. If you set fkBounceMSec, you must set fkDelayMSec to 0, or you can't set the value. They can both be 0, but they can't both be nonzero. Valid values are 500, 700, 1000, 1500, and 2000 9.4
fkClickOn If True, the computer makes a click sound when a key is pressed or accepted 9.3
fkDelayMSec Specifies the length of time, in milliseconds, the user must hold down a key before it begins to repeat. If you set fkDelayMSec, you must set fkBounceMSec to 0, or you can't set the value. They can both be 0, but they can't both be nonzero. Valid values are 300, 700, 1000, 1500, and 2000 9.5
fkHotkeyActive If True, the user can turn the FilterKeys feature on and off by holding down the Shift key for 8 seconds 9.3
fkHotKeyConfirm (Win95 only) If True, a confirmation dialog box appears when the FilterKeys features are activated with the hot key 9.11
fkHotKeySound If True, the computer plays a sound when the user turns the FilterKeys feature on or off with the hot key 9.11
fkIndicator (Win95 only) If true, visual indicator is displayed when the FilterKeys features are on 9.3
fkRepeatMSec Specifies the length of time, in milliseconds, between repetitions of the keystroke. Valid values are 300, 500, 700, 1000, 1500, and 2000 9.5
fkWaitMSec Specifies the length of time, in milliseconds, the user must hold down a key before it is accepted by the computer. The only acceptable values are 0, 300, 500, 700, 1000, 1400, and 2000. All others will be rounded to the next larger value within the range (Values larger than 2000 are cut back to 1000, the default.) 9.5

Table 9.5: MouseKeys Properties Provided by the Accessibility Class

Property Description Figure
mkActive If True, the MouseKeys feature is active 9.9
mkAvailable If True, the MouseKeys feature is available (read-only)
mkCtrlSpeed Specifies the multiplier to apply to the mouse cursor speed when the user holds down the Ctrl key while using the arrow keys to move the cursor. Documented by Microsoft as not working in NT, but it appears to work fine in NT 4.0 9.10
mkHotKeyActive Sets or retrieves whether the user can turn the MouseKeys feature on and off using the hot key: Alt (left-hand key) + Shift (left-hand key) + NumLock 9.10
mkHotKeyConfirm (Win95 only) If True, a confirmation dialog box appears when the MouseKeys feature is activated with hot key 9.11
mkHotKeySound If True, the system plays a sound when the user turns the MouseKeys feature on or off with the the hot key 9.11
mkIndicator (Win95 only) If True, a visual indicator is displayed when the MouseKeys feature is on 9.10
mkMaxSpeed Specifies the maximum speed the mouse cursor attains when an arrow key is held down 9.10
mkReplaceNumbers If True, the numeric keypad moves the mouse when the NumLock key is on 9.10
mkTimeToMaxSpeed Specifies the length of time, in milliseconds, it takes for the mouse cursor to reach maximum speed when an arrow key is held down. Must be a value between 1000 and 5000,in milliseconds. Acceptable values are in 500-millisecond intervals (5000, 4500, etc.). Others in the range are rounded off. Values outside the range cause the call to SystemParameters Info to fail 9.10

Table 9.6: StickyKeys Properties Supplied by the Accessibility Class

Property Description Figure
skActive If True, the StickyKeys feature is active 9.1
skAudibleFeedback If True, the system plays a sound when the user sets keys using the StickyKeys feature 9.2
skAvailable If True, the StickyKeys feature is available (read-only)
skHotKeyActive If True, the user can turn the StickyKeys feature on and off by pressing the Shift key five times 9.2
skHotKeyConfirm (Win95 only) If True, a confirmation dialog appears when the StickyKeys feature is activated with the hot key 9.11
skHotKeySound If True, the system plays a sound when the user toggles the StickyKeys feature with the hot key 9.11
skIndicator (Win 95 only) If True, a visual indicator is displayed when the StickyKeys feature is on 9.2
skTriState If True, pressing a modifier key twice in a row locks down the key until the user presses it a third time 9.2
skTwoKeysOff If True, releasing a modifier key that has been pressed in combination with any other key turns off the StickyKeys feature 9.2

Table 9.7: SoundSentry Properties Supplied by the Accessibility Class

Property Description Figure
ssActive If True, the SoundSentry feature is active 9.7
ssAvailable If True, the SoundSentry feature is available (read-only)
ssFSTextEffect (Win95 only) If True, a visual signal appears when a text-mode application generates a sound while running in a full-screen virtual machine. Can be one of the following values: 0 (no visual indication is used), 1 (flash characters in the corner of the screen), 2 (flash the screen border [overscan area]), 3 (flash the entire display) 9.8
ssWindowsEffect If True, visual signal appears when a graphics-mode application generates a sound while running in a full-screen virtual machine. Can be one of the following values: 0 (no visual indication is used), 1 (flash characters in the corner of the screen), 2 (Flash the screen border [overscan area]), 3 (flash the entire display) 9.8

Table 9.8: ToggleKeys Properties Supplied by the Accessibility Class

Property Description Figure
tkActive If True, the ToggleKeys feature is active 9.1
tkAvailable If True, the ToggleKeys feature is available (read-only)
tkHotKeyActive If True, the user can turn the ToggleKeys feature on and off by holding the NumLock key for 5 seconds 9.6
TkHotKeyConfirm (Win95 only) If True, a confirmation dialog appears when the ToggleKeys feature is activated with the hot key 9.11
tkHotKeySound If True, the system plays a sound when the user toggles the ToggleKeys feature with the hot key 9.11

Figure 9.1: Accessibility Properties (Keyboard) dialog box

Figure 9.2: Settings for the StickyKeys dialog box

Figure 9.3: Settings for the FilterKeys dialog box

Figure 9.4: Advanced settings for the FilterKeys (Bounce) dialog box

Figure 9.5: Advanced settings for the FilterKeys (Delay) dialog box

Figure 9.6: Settings for the ToggleKeys dialog box

Figure 9.7: Accessibility Properties (Sound) dialog box

Figure 9.8: Settings for the SoundSentry dialog box

Figure 9.9: Accessibility Properties (Mouse) dialog box

Figure 9.10: Settings for the MouseKeys dialog box

Figure 9.11: Accessibility Properties (General) dialog box

© 1997 by SYBEX Inc. All rights reserved.