diff --git a/rog-aura/data/layouts/g513_US.toml b/rog-aura/data/layouts/g513_US.toml index 351e0338..ab568a37 100644 --- a/rog-aura/data/layouts/g513_US.toml +++ b/rog-aura/data/layouts/g513_US.toml @@ -34,7 +34,7 @@ row = [ 'F11', 'F12', 'RowEndSpacer', - 'Del', + 'NumPadDel', ] [[rows]] diff --git a/rog-aura/data/layouts/gl504_US.toml b/rog-aura/data/layouts/gl504_US.toml new file mode 100644 index 00000000..58998526 --- /dev/null +++ b/rog-aura/data/layouts/gl504_US.toml @@ -0,0 +1,165 @@ +matches = [ + 'GL504', +] + +locale = "US" + +[[rows]] +row = [ + 'NormalSpacer', + 'FuncSpacer', + 'VolDown', + 'VolUp', + 'MicMute', + 'Rog', +] + +[[rows]] +row = [ + 'Esc', + 'FuncSpacer', + 'F1', + 'F2', + 'F3', + 'F4', + 'FuncSpacer', + 'F5', + 'F6', + 'F7', + 'F8', + 'FuncSpacer', + 'F9', + 'F10', + 'F11', + 'F12', + 'Del', + 'NumPadPause', + 'NumPadPrtSc', + 'NumPadHome', +] + +[[rows]] +row = [ + 'Tilde', + 'N1', + 'N2', + 'N3', + 'N4', + 'N5', + 'N6', + 'N7', + 'N8', + 'N9', + 'N0', + 'Hyphen', + 'Equals', + 'BkSpc', + 'NumLock', + 'FwdSlash', + 'Star', + 'Hyphen', +] + +[[rows]] +row = [ + 'Tab', + 'Q', + 'W', + 'E', + 'R', + 'T', + 'Y', + 'U', + 'I', + 'O', + 'P', + 'LBracket', + 'RBracket', + 'BackSlash', + 'N7', + 'N8', + 'N9', + 'NumPadPlus', +] + +[[rows]] +row = [ + 'Caps', + 'A', + 'S', + 'D', + 'F', + 'G', + 'H', + 'J', + 'K', + 'L', + 'SemiColon', + 'Quote', + 'Return', + 'N4', + 'N5', + 'N6', + 'NumPadPlus', +] + +[[rows]] +row = [ + 'LShift', + 'Z', + 'X', + 'C', + 'V', + 'B', + 'N', + 'M', + 'Comma', + 'Period', + 'FwdSlash', + 'Rshift', + 'N1', + 'N2', + 'N3', + 'NumPadEnter', +] + +[[rows]] +row = [ + 'LCtrlMed', + 'LFn', + 'Meta', + 'LAlt', + 'Space', + 'RAlt', + 'RFn', + 'RFn', + 'RCtrlLarge', + 'UpRegular', + 'N0', + 'NumPadDel', + 'NumPadEnter', +] + +[[rows]] +row = [ + 'FuncSpacer', + 'FuncSpacer', + 'FuncSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'NormalSpacer', + 'LeftRegular', + 'DownRegular', + 'RightRegular', + 'NormalSpacer', +] + diff --git a/rog-aura/src/key_to_str.rs b/rog-aura/src/key_to_str.rs index e6b9e9ce..56234272 100644 --- a/rog-aura/src/key_to_str.rs +++ b/rog-aura/src/key_to_str.rs @@ -91,6 +91,14 @@ impl From<&Key> for &str { Key::M => "M", Key::Comma => ",", Key::Period => ".", + Key::Star => "*", + Key::NumPadDel => "Delete", + Key::NumPadPlus => "+", + Key::NumPadEnter => "Enter", + Key::NumPadPause => "Pause", + Key::NumPadPrtSc => "Print Screen", + Key::NumPadHome => "Home", + Key::NumLock => "Num-Lock", Key::FwdSlash => "/", Key::Rshift => "Right Shift", Key::RshiftSmall => "Right Shift", @@ -112,6 +120,8 @@ impl From<&Key> for &str { Key::RAlt => "Right Alt", Key::PrtSc => "Print Screen", Key::RCtrl => "Right Control", + Key::RCtrlLarge => "Right Control", + Key::Pause => "Pause", Key::Up => "Up", Key::Down => "Down", Key::Left => "Left", diff --git a/rog-aura/src/keys.rs b/rog-aura/src/keys.rs index 5e3bf8a4..64a74e00 100644 --- a/rog-aura/src/keys.rs +++ b/rog-aura/src/keys.rs @@ -85,6 +85,14 @@ pub enum Key { Comma, Period, FwdSlash, + Star, + NumPadDel, + NumPadPlus, + NumPadEnter, + NumPadPause, + NumPadPrtSc, + NumPadHome, + NumLock, Rshift, RshiftSmall, Rshift3_1, @@ -102,9 +110,11 @@ pub enum Key { Space5_3, Space5_4, Space5_5, + Pause, RAlt, PrtSc, RCtrl, + RCtrlLarge, Up, Down, Left, @@ -214,7 +224,7 @@ impl KeyShape { } pub const fn uy(&self) -> f32 { match self { - Self::Func => 0.8, + Self::Func | Self::RowEndSpacer => 0.8, Self::FuncBlank => 0.8, Self::FuncSpacer => 0.8, Self::Arrow | Self::ArrowBlank | Self::ArrowSpacer => 0.6, @@ -292,7 +302,7 @@ impl From for KeyShape { Key::LCtrlMed => KeyShape::LCtrlMed, Key::LShift => KeyShape::LShift, - Key::Rshift => KeyShape::RShift, + Key::Rshift | Key::RCtrlLarge => KeyShape::RShift, Key::RshiftSmall => KeyShape::RshiftSmall, Key::Rshift3_1 | Key::Rshift3_2 | Key::Rshift3_3 => KeyShape::RShift3, @@ -301,6 +311,10 @@ impl From for KeyShape { KeyShape::Space5 } + Key::NumPadPause | Key::NumPadPrtSc | Key::NumPadHome | Key::NumPadDel => { + KeyShape::Func + } + Key::NormalBlank => KeyShape::NormalBlank, Key::NormalSpacer => KeyShape::NormalSpacer, diff --git a/rog-aura/src/per_key_rgb.rs b/rog-aura/src/per_key_rgb.rs index e5d33b34..28ac01ac 100644 --- a/rog-aura/src/per_key_rgb.rs +++ b/rog-aura/src/per_key_rgb.rs @@ -197,6 +197,16 @@ impl KeyColourArray { | Key::MediaStop | Key::MediaPrev | Key::MediaNext + | Key::Pause + | Key::NumLock + | Key::Star + | Key::NumPadDel + | Key::NumPadPlus + | Key::NumPadEnter + | Key::NumPadPause + | Key::NumPadPrtSc + | Key::NumPadHome + | Key::RCtrlLarge | Key::RowEndSpacer => return None, Key::Fan | Key::Space | Key::BkSpc => return None, }; diff --git a/rog-control-center/src/main.rs b/rog-control-center/src/main.rs index e0c08d2b..fbe76bf7 100644 --- a/rog-control-center/src/main.rs +++ b/rog-control-center/src/main.rs @@ -42,12 +42,12 @@ fn main() -> Result<(), Box> { })?; let mut board_name = String::new(); file.read_to_string(&mut board_name)?; - // board_name = "G533".to_string(); let mut layout = KeyLayout::ga401_layout(); // default let mut path = PathBuf::from(DATA_DIR); #[cfg(feature = "mocking")] { + board_name = "GX502".to_string(); path.pop(); path.push("rog-aura"); path.push("data"); @@ -117,7 +117,8 @@ fn main() -> Result<(), Box> { let native_options = eframe::NativeOptions { decorated: false, transparent: false, - max_window_size: Some(egui::vec2(800.0, 600.0)), + min_window_size: Some(egui::vec2(840.0, 600.0)), + max_window_size: Some(egui::vec2(840.0, 600.0)), ..Default::default() };