plugin: user-interact
name: keys/lock-screen
requires:
 device.category == 'KEYBOARD'
command: lock_screen_watcher
description:
 PURPOSE:
     This test will test the screen lock key
 STEPS:
     1. Press the Test button to begin this test. If there is no such key, please skip this test.
     2. Press the lock screen button on the keyboard in 30 seconds.
     3. If the screen is locked, move the mouse or press any key to activate the prompt.
     4. Input the password to unlock the screen.
 VERIFICATION:
     The verification of this test is automated. Do not change the
     automatically selected result.

plugin: manual
name: keys/brightness
requires: dmi.product in ['Notebook','Laptop','Portable']
description:
 PURPOSE:
     This test will test the brightness key
 STEPS:
     1. Press the brightness buttons on the keyboard
 VERIFICATION:
     Did the brightness change following to your key presses?

plugin: user-interact-verify
name: keys/volume
requires:
 device.category == 'KEYBOARD'
user: root
command: key_test -s '0xe02e,0xe0ae:Volume Down' '0xe030,0xe0b0:Volume Up'
description:
 PURPOSE:
     This test will test the volume keys of your keyboard
 STEPS:
     Skip this test if your computer has no volume keys.
     1. Click test to open a window on which to test the volume keys.
     2. If all the keys work, the test will be marked as passed.
 VERIFICATION:
     Do the keys work as expected?

plugin: user-interact-verify
name: keys/mute
requires:
 device.category == 'KEYBOARD'
user: root
command: key_test -s '0xe020,0xe0a0:Mute'
description:
 PURPOSE:
     This test will test the mute key of your keyboard
 STEPS:
     1. Click test to open a window on which to test the mute key.
     2. If the key works, the test will pass and the window will close.
 VERIFICATION:
     Does the mute key work as expected?

plugin: manual
name: keys/sleep
requires:
 device.category == 'KEYBOARD'
depends: suspend/suspend_advanced
description:
 PURPOSE:
     This test will test the sleep key
 STEPS:
     1. Press the sleep key on the keyboard
     2. Wake your system up by pressing the power button
 VERIFICATION:
     Did the system go to sleep after pressing the sleep key?

plugin: user-interact-verify
name: keys/battery-info
requires: dmi.product in ['Notebook','Laptop','Portable']
user: root
command: key_test -s '0xe071,0xef1:Battery Info'
description:
 PURPOSE:
     This test will test the battery information key
 STEPS:
     Skip this test if you do not have a Battery Button.
     1. Click Test to begin
     2. Press the Battery Info button (or combo like Fn+F3)
     3: Close the Power Statistics tool if it opens
 VERIFICATION:
     Did the Battery Info key work as expected?

plugin: manual
name: keys/wireless
requires: dmi.product in ['Notebook','Laptop','Portable']
description:
 PURPOSE:
     This test will test the wireless key
 STEPS:
     1. Press the wireless key on the keyboard
     2. Check that the wifi LED turns off or changes color
     3. Check that wireless is disabled
     4. Press the same key again
     5. Check that the wifi LED turns on or changes color
     6. Check that wireless is enabled
 VERIFICATION:
     Did the wireless turn off on the first press and on again on the second?
     (NOTE: the LED functionality will be reviewed in a following test. Please
     only consider the functionality of the wifi itself here.)

plugin: user-interact
name: keys/media-control
requires:
 device.category == 'KEYBOARD'
user: root
command: key_test -s 0xe010,0xe090:Previous 0xe024,0xe0a4:Stop 0xe019,0xe099:Next 0xe022,0xe0a2:Play
description:
 PURPOSE:
     This test will test the media keys of your keyboard
 STEPS:
     Skip this test if your computer has no media keys.
     1. Click test to open a window on which to test the media keys.
     2. If all the keys work, the test will be marked as passed.
 VERIFICATION:
     Do the keys work as expected?

plugin: user-interact
name: keys/super
requires:
 device.category == 'KEYBOARD'
user: root
command: key_test -s '0xe05b,0xe0db:Left Super Key'
description:
 PURPOSE:
     This test will test the super key of your keyboard
 STEPS:
     1. Click test to open a window on which to test the super key.
     2. If the key works, the test will pass and the window will close.
 VERIFICATION:
     Does the super key work as expected?

plugin: manual
name: keys/video-out
requires: dmi.product in ['Notebook','Laptop','Portable']
description:
 PURPOSE:
     Validate that the External Video hot key is working as expected
 STEPS:
     1. Plug in an external monitor
     2. Press the display hot key to change the monitors configuration
 VERIFICATION:
     Check that the video signal can be mirrored, extended, displayed on external or onboard only.

plugin: manual
name: keys/touchpad
requires: dmi.product in ['Notebook','Laptop','Portable']
description:
 PURPOSE:
     Verify touchpad hotkey toggles touchpad functionality on and off
 STEPS:
     1. Verify the touchpad is functional
     2. Tap the touchpad toggle hotkey
     3. Tap the touchpad toggle hotkey again
 VERIFICATION:
     Verify the touchpad has been disabled and re-enabled.

plugin: manual
name: keys/keyboard-backlight
requires: dmi.product in ['Notebook','Laptop','Portable']
description:
 PURPOSE:
     Verify that the keyboard backlight toggle key works properly
 STEPS:
     1. Tap the keyboard backlight key
     2. Confirm that the keyboard backlight was toggled to the opposite state
     3. Tap the keyboard backlight key again
     4. Confirm that the keyboard backlight was toggled to the opposite state
 VERIFICATION:
     Did the keyboard backlight state change on each press?

plugin: user-interact-verify
name: keys/microphone-mute
requires:
 device.category == 'AUDIO'
 device.category == 'KEYBOARD'
 package.name == 'alsa-base'
 package.name == 'pulseaudio-utils'
 package.name == 'gstreamer1.0-plugins-good' or package.name == 'gstreamer0.10-plugins-good'
command: audio_settings store --file=$CHECKBOX_DATA/pulseaudio_settings; audio_settings set --device=pci --volume=50; alsa_record_playback; EXIT_CODE=$?; audio_settings restore --file=$CHECKBOX_DATA/pulseaudio_settings; exit $EXIT_CODE
description:
 PURPOSE:
     This test will test the mute key for your microphone
 STEPS:
     1. Click "Test" then speak: "Imagination is more important than knowledge" (or anything else) into your microphone.
     2. While you are speaking, please press the mute key for the microphone to mute it and press it again to unmute.
     3. After a few seconds, your speech will be played back to you. If the key works, your speech should be interrupted for a few seconds.
 VERIFICATION:
     Does the microphone mute key work as expected?

plugin: manual
name: keys/hibernate
requires: dmi.product in ['Notebook','Laptop','Portable']
depends: power-management/hibernate_advanced
description:
 PURPOSE:
     This test will test the hibernate key
 STEPS:
     1. Press the hibernate key on the keyboard
     2. Check that the system hibernated correctly
     3. Wake your system after hibernating by pressing the power button
 VERIFICATION:
     Did the system go to hibernate after pressing the hibernate key?

plugin: manual
name: keys/keyboard-overhead-light
requires: dmi.product in ['Notebook','Laptop','Portable']
description:
 PURPOSE:
     This test will test the keyboard overhead light key or switch
 STEPS:
     1. Press the keyboard overhead light key or swtich on the light
     2. Check the the keyboard overhead light turn on correctly
     3. Press the key or switch again to toggle off the light 
 VERIFICATION:
     Did the keyboard overhead light key or switch turns on and off the light?
