Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

TinyPilot can't send KEY_SWITCHVIDEOMODE #182

Open
mtlynch opened this issue Feb 14, 2022 · 0 comments
Open

TinyPilot can't send KEY_SWITCHVIDEOMODE #182

mtlynch opened this issue Feb 14, 2022 · 0 comments

Comments

@mtlynch
Copy link
Contributor

mtlynch commented Feb 14, 2022

On some laptops, the laptop doesn't output the display to an external monitor unless the user presses the KEY_SWITCHVIDEOMODE key. On Dell laptops, this is Fn+F8:

image

image

I ran evtest to dump output from a Dell laptop's keyboard, and this was what I saw when I pressed Fn+F8:

Event: time 1644874377.083934, -------------- SYN_REPORT ------------
Event: time 1644874381.374129, type 4 (EV_MSC), code 4 (MSC_SCAN), value 8b
Event: time 1644874381.374129, type 1 (EV_KEY), code 227 (KEY_SWITCHVIDEOMODE), value 1
Event: time 1644874381.374129, -------------- SYN_REPORT ------------
Event: time 1644874381.374152, type 4 (EV_MSC), code 4 (MSC_SCAN), value 8b
Event: time 1644874381.374152, type 1 (EV_KEY), code 227 (KEY_SWITCHVIDEOMODE), value 0

Full logs: https://gist.github.com/mtlynch/8544fb605bb20cddf7b05ca0c98e1e2b#file-dell-xps-native-keyboard-log

So, the Fn+F8 combination maps to KEY_SWITCHVIDEOMODE, which has a code of 227 on the keyboard.

I tried evtest from the TinyPilot USB device, and KEY_SWITCHVIDEOMODE does not appear as a supported code: https://gist.github.com/mtlynch/8544fb605bb20cddf7b05ca0c98e1e2b#file-tinypilot-virtual-keyboard-log

I'm not sure if there's something we can change in the USB HID descriptor to support this code. It's possible that USB keyboards simply can't send KEY_SWITCHVIDEOMODE, because I don't see it documented in the USB HID spec.

@mtlynch mtlynch changed the title Send KEY_SWITCHVIDEOMODE TinyPilot can't send KEY_SWITCHVIDEOMODE Feb 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant