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

TinyPilot can't send KEY_SWITCHVIDEOMODE #182

@mtlynch

Description

@mtlynch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions