rog-aura: bringup the per-key LED stuff again

This commit is contained in:
Luke D. Jones
2022-08-24 22:01:13 +12:00
parent f3876100ae
commit 0ef524a94b
10 changed files with 490 additions and 82 deletions

View File

@@ -1,10 +1,11 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, PartialEq, Copy, Clone, Serialize, Deserialize)]
#[derive(Debug, Default, PartialEq, Copy, Clone, Serialize, Deserialize)]
pub enum Key {
VolUp,
VolDown,
MicMute,
#[default]
Rog,
Fan,
Esc,
@@ -151,6 +152,13 @@ pub enum Key {
RowEndSpacer,
}
impl Key {
pub fn is_placeholder(&self) -> bool {
let shape = KeyShape::from(self);
shape.is_blank() || shape.is_spacer()
}
}
/// Types of shapes of LED on keyboards. The shape is used for visual representations
///
/// A post fix of Spacer *must be ignored by per-key effects