>># 
>># Copyright 1990, 1991 by the Massachusetts Institute of Technology and
>># UniSoft Group Limited.
>># 
>># Permission to use, copy, modify, distribute, and sell this software and
>># its documentation for any purpose is hereby granted without fee,
>># provided that the above copyright notice appear in all copies and that
>># both that copyright notice and this permission notice appear in
>># supporting documentation, and that the names of MIT and UniSoft not be
>># used in advertising or publicity pertaining to distribution of the
>># software without specific, written prior permission.  MIT and UniSoft
>># make no representations about the suitability of this software for any
>># purpose.  It is provided "as is" without express or implied warranty.
>># 
>># $XConsortium: chngkybrdc.m,v 1.8 92/06/11 17:11:42 rws Exp $
>># 
>>#
>>TITLE XChangeKeyboardControl CH07
>>ASSERTION A XChangeKeyboardControl-1
If the key click loudness can be set: When the
KBKeyClickPercent bit is set in value_mask, then the volume
of the key click is set to the value specified in
key_click_percent, which is between 0, signifying off, and
100, signifying loud.
>>STRATEGY
Set value_mask to KBKeyClickPercent.
Set key_click_percent value.
Call XChangeKeyboardControl.
Get new keyboard state.
Verify that change occurred.
>>ASSERTION B XChangeKeyboardControl-2
When the KBKeyClickPercent bit is set in value_mask and
key_click_percent is -1, then the default key click volume
is restored.
>>STRATEGY
Set value_mask to KBKeyClickPercent.
Set key_click_percent to -1.
Call XChangeKeyboardControl.
UNTESTED.
>>ASSERTION A XChangeKeyboardControl-3
If the bell loudness can be set: When the KBBellPercent bit
is set in value_mask, then the base volume of the bell is
set to the value specified in bell_percent, which is
between 0, signifying off, to 100, signifying loud.
>>STRATEGY
Set value_mask to KBBellPercent.
Set bell_percent value.
Call XChangeKeyboardControl.
Get new keyboard state.
Verify that change occurred.
>>ASSERTION B XChangeKeyboardControl-4
When the KBBellPercent bit is set in value_mask and
bell_percent is -1, then the base volume of the bell is set
to the default.
>>STRATEGY
Set value_mask to KBBellPercent.
Set bell_percent value to -1.
Call XChangeKeyboardControl.
UNTESTED.
>>ASSERTION A XChangeKeyboardControl-5
If the bell pitch can be set: When the KBBellPitch bit is
set in value_mask, then the bell pitch in Hz is set to the
value specified in bell_pitch.
>>STRATEGY
Set value_mask to KBBellPitch.
Set bell_pitch value.
Call XChangeKeyboardControl.
Get new keyboard state.
Verify that change occurred.
>>ASSERTION B XChangeKeyboardControl-6
When the KBBellPitch bit is set in value_mask and
bell_pitch is -1, then the bell pitch is set to the default.
>>STRATEGY
Set value_mask to KBBellPitch.
Set bell_pitch value to -1.
Call XChangeKeyboardControl.
UNTESTED.
>>ASSERTION A XChangeKeyboardControl-7
If the bell duration can be set: When the KBBellDuration
bit is set in value_mask, then the bell duration in
milliseconds is set to the value specified in bell_duration.
>>STRATEGY
Set value_mask to KBBellDuration.
Set bell_duration value to -1.
Call XChangeKeyboardControl.
Get new keyboard state.
Verify that change occurred.
>>ASSERTION B XChangeKeyboardControl-8
When the KBBellDuration bit is set in value_mask and
bell_duration is -1, then the bell duration is set to the
default.
>>STRATEGY
Set value_mask to KBBellDuration.
Set bell_duration value to -1.
Call XChangeKeyboardControl.
UNTESTED.
>>ASSERTION A XChangeKeyboardControl-9
If LED s are supported: When both KBLed and KBLedMode are
specified, then the state of the LED specified by led is
changed to the state specified by led_mode.
>>STRATEGY
Set value_mask to KBLed | KBLedMode.
Set led value.
Set led_mode value.
Call XChangeKeyboardControl.
Get new keyboard state.
Verify that change occurred.
>>ASSERTION A XChangeKeyboardControl-10
If LED s are supported: When KBLedMode is specified and
KBLed is not specified, then the state of all LED s is
changed to the mode specified by led_mode.
>>STRATEGY
Set value_mask to KBLed.
Set led_mode value.
Call XChangeKeyboardControl.
Get new keyboard state.
Verify that change occurred.
>>ASSERTION A XChangeKeyboardControl-11
When KBKey and KBAutoRepeatMode are specified, then the
auto repeat mode of key is changed to the mode specified by
auto_repeat_mode.
>>STRATEGY
Set value_mask to KBKey | KBAutoRepeatMode.
Get current value for key.
Set auto_repeat_mode to opposite of current value.
Call XChangeKeyboardControl.
Verify that auto_repeat_mode for the key has changed.
>>ASSERTION A XChangeKeyboardControl-12
When KBAutoRepeatMode is specified and KBKey is not
specified, then the per-key settings are unchanged and the
auto repeat mode for the whole keyboard is changed to that
specified by auto_repeat_mode.
>>STRATEGY
Set value_mask to KBAutoRepeatMode.
Get current global auto repeat mode.
Set auto_repeat_mode to different value.
Call XChangeKeyboardControl.
Verify that global auto repeat mode changed.
>>ASSERTION A XChangeKeyboardControl-13
When the KBKeyClickPercent bit is set in value_mask and
key_click_percent is not between 0 and 100 inclusive or -1,
then a BadValue error occurs.
>>STRATEGY
Set value_mask to KBKeyClickPercent.
Set out of range key_click_percent.
Call XChangeKeyboardControl.
Verify that a BadValue error occurs.
>>ASSERTION A XChangeKeyboardControl-14
When the KBBellPercent bit is set in value_mask and
bell_percent is not between 0 and 100 inclusive or -1, then
a BadValue error occurs.
>>STRATEGY
Set value_mask to KBBellPercent.
Set out of range bell_percent.
Call XChangeKeyboardControl.
Verify that a BadValue error occurs.
>>ASSERTION A XChangeKeyboardControl-15
When the KBBellPitch bit is set in value_mask and
bell_pitch is a negative number other than -1, then a
BadValue error occurs.
>>STRATEGY
Set value_mask to KBBellPitch.
Set out of range bell_pitch.
Call XChangeKeyboardControl.
Verify that a BadValue error occurs.
>>ASSERTION A XChangeKeyboardControl-16
When the KBBellDuration bit is set in value_mask and
bell_duration is a negative number other than -1, then a
BadValue error occurs.
>>STRATEGY
Set value_mask to KBBellDuration.
Set out of range bell_duration.
Call XChangeKeyboardControl.
Verify that a BadValue error occurs.
>>ASSERTION A XChangeKeyboardControl-17
When KBLed is specified and KBLedMode is not specified,
then a BadMatch error occurs.
>>STRATEGY
Set value_mask to KBLed.
Call XChangeKeyboardControl.
Verify that a BadMatch error occurs.
>>ASSERTION A XChangeKeyboardControl-18
When KBKey is specified and KBAutoRepeatMode is not
specified, then a BadMatch error occurs.
>>STRATEGY
Set value_mask to KBKey.
Call XChangeKeyboardControl.
Verify that a BadMatch error occurs.
>>ASSERTION A XChangeKeyboardControl-19
When the value of led_mode is other than LedModeOn or
LedModeOff, then a BadValue error occurs.
>>STRATEGY
Set value_mask to KBLedMode.
Set led_mode to other than LedModeOn or LedModeOff.
Call XChangeKeyboardControl.
Verify that a BadValue error occurs.
>>ASSERTION A XChangeKeyboardControl-20
When the value of auto_repeat_mode is other than
AutoRepeatModeOff, AutoRepeatModeOn or
AutoRepeatModeDefault, then a BadValue error occurs.
>>STRATEGY
Set value_mask to KBAutoRepeatMode.
Set auto_repeat_mode to invalid value.
Call XChangeKeyboardControl.
Verify that a BadValue error occurs.
