Support screen brightness adjustment button, the KEY_BRIGHTNESS_CYCLE EV_KEY
The Acer Veriton Z4660G/Z4860G/Z6860G series AIO desktops have a brightness button in the bottom, but pressing the button does not work on Linux. According to ODM's description, a control application will popup for brightness adjustment on Windows, if the button is pressed. I have checked it with evtest:
sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Sleep Button
/dev/input/event1: Power Button
/dev/input/event2: Power Button
/dev/input/event3: Video Bus
/dev/input/event4: USB Optical Mouse
/dev/input/event5: Wired USB Keyboard
/dev/input/event6: Wired USB Keyboard System Control
/dev/input/event7: Wired USB Keyboard Consumer Control
/dev/input/event8: HDA Intel PCH Front Mic
/dev/input/event9: HDA Intel PCH Front Headphone
/dev/input/event10: HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event11: HDA Intel PCH HDMI/DP,pcm=7
/dev/input/event12: HDA Intel PCH HDMI/DP,pcm=8
/dev/input/event13: HDA Intel PCH HDMI/DP,pcm=9
/dev/input/event14: HDA Intel PCH HDMI/DP,pcm=10
/dev/input/event15: USB2.0 FHD Camera: USB2.0 FHD C
Select the device event number [0-15]: 3
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x0 product 0x6 version 0x0
Input device name: "Video Bus"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 224 (KEY_BRIGHTNESSDOWN)
Event code 225 (KEY_BRIGHTNESSUP)
Event code 227 (KEY_SWITCHVIDEOMODE)
Event code 241 (KEY_VIDEO_NEXT)
Event code 242 (KEY_VIDEO_PREV)
Event code 243 (KEY_BRIGHTNESS_CYCLE)
Event code 244 (KEY_BRIGHTNESS_ZERO)
Event code 245 (KEY_DISPLAY_OFF)
Properties:
Testing ... (interrupt to exit)
Event: time 1542615014.263931, type 1 (EV_KEY), code 243 (KEY_BRIGHTNESS_CYCLE), value 1
Event: time 1542615014.263931, -------------- SYN_REPORT ------------
Event: time 1542615014.263939, type 1 (EV_KEY), code 243 (KEY_BRIGHTNESS_CYCLE), value 0
Event: time 1542615014.263939, -------------- SYN_REPORT ------------
Event: time 1542615015.380922, type 1 (EV_KEY), code 243 (KEY_BRIGHTNESS_CYCLE), value 1
Event: time 1542615015.380922, -------------- SYN_REPORT ------------
Event: time 1542615015.380930, type 1 (EV_KEY), code 243 (KEY_BRIGHTNESS_CYCLE), value 0
When the button is pressed, the code 243 (KEY_BRIGHTNESS_CYCLE) is sent. I found there are codes for screen brightness "StepUp" and "StepDown". However, it seems no related code for "Brightness Cycle" (something like that) in g-s-d now.
Edited by Jian-Hong Pan