Add airplane mode toggle

This commit is contained in:
Luke
2020-04-18 14:12:53 +12:00
parent fb02604dc6
commit ed74ca3d58
4 changed files with 45 additions and 5 deletions

View File

@@ -115,10 +115,10 @@ impl Laptop for LaptopGX502GW {
self.backlight.step_down();
}
GX502GWKeys::Sleep => {
std::process::Command::new("systemctl")
.arg("suspend")
.spawn()
.expect("failed to suspend");
rogcore.suspend();
}
GX502GWKeys::AirplaneMode => {
rogcore.toggle_airplane_mode();
}
_ => {
if key_byte != 0 {