Using the current Ubuntu 17.04 image and selecting the unity8 session, the XPS 9365 does not automatically switch modes.
When switching to tablet mode, the ACPI driver INT33D6 which is bound to intel-vbtn will emit a few 0xcc events. When switching to desktop mode, the same driver will emit a 0xcd event.
The intel-vbtn driver doesn't currently send anything to the OS about these events (just messages in dmesg about unknown, so Unity8 isn't able to pick them up.
Unity will have to decide what key codes should be picked up, and the intel-vbtn driver will need to be configured to emit that event.
The only keycode I find on the kernel side is SW_TABLET_MODE, but I don't find a corresponding one for notebook mode. This means that the driver would need to keep track of state and only emit it when it sees a 0xcc after 0xcd or 0xcd after 0xcc.
Using the current Ubuntu 17.04 image and selecting the unity8 session, the XPS 9365 does not automatically switch modes.
When switching to tablet mode, the ACPI driver INT33D6 which is bound to intel-vbtn will emit a few 0xcc events. When switching to desktop mode, the same driver will emit a 0xcd event.
The intel-vbtn driver doesn't currently send anything to the OS about these events (just messages in dmesg about unknown, so Unity8 isn't able to pick them up.
Unity will have to decide what key codes should be picked up, and the intel-vbtn driver will need to be configured to emit that event.
The only keycode I find on the kernel side is SW_TABLET_MODE, but I don't find a corresponding one for notebook mode. This means that the driver would need to keep track of state and only emit it when it sees a 0xcc after 0xcd or 0xcd after 0xcc.