ROGCC: rog-aura: Keyboard layout templates and definitions

This also removes shell completitions as these are not maintained.
This commit is contained in:
Luke D. Jones
2022-07-27 15:03:08 +12:00
parent 8f65b7e334
commit e99d8766fc
22 changed files with 1617 additions and 317 deletions

View File

@@ -7,7 +7,8 @@ pub enum Error {
ParseSpeed,
ParseDirection,
ParseBrightness,
ParseAnime,
Io(std::io::Error),
Toml(toml::de::Error),
}
impl fmt::Display for Error {
@@ -18,9 +19,22 @@ impl fmt::Display for Error {
Error::ParseSpeed => write!(f, "Could not parse speed"),
Error::ParseDirection => write!(f, "Could not parse direction"),
Error::ParseBrightness => write!(f, "Could not parse brightness"),
Error::ParseAnime => write!(f, "Could not parse anime"),
Error::Io(io) => write!(f, "IO Error: {io}"),
Error::Toml(e) => write!(f, "TOML Parse Error: {e}"),
}
}
}
impl error::Error for Error {}
impl From<std::io::Error> for Error {
fn from(e: std::io::Error) -> Self {
Self::Io(e)
}
}
impl From<toml::de::Error> for Error {
fn from(e: toml::de::Error) -> Self {
Self::Toml(e)
}
}

286
rog-aura/src/keys.rs Normal file
View File

@@ -0,0 +1,286 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, PartialEq, Copy, Clone, Serialize, Deserialize)]
pub enum Key {
VolUp,
VolDown,
MicMute,
Rog,
Fan,
Esc,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
Del,
Tilde,
N1,
N2,
N3,
N4,
N5,
N6,
N7,
N8,
N9,
N0,
Hyphen,
Equals,
BkSpc,
BkSpc3_1,
BkSpc3_2,
BkSpc3_3,
Home,
Tab,
Q,
W,
E,
R,
T,
Y,
U,
I,
O,
P,
LBracket,
RBracket,
BackSlash,
PgUp,
Caps,
A,
S,
D,
F,
G,
H,
J,
K,
L,
SemiColon,
Quote,
Return,
Return3_1,
Return3_2,
Return3_3,
PgDn,
LShift,
LShift3_1,
LShift3_2,
LShift3_3,
Z,
X,
C,
V,
B,
N,
M,
Comma,
Period,
FwdSlash,
Rshift,
Rshift3_1,
Rshift3_2,
Rshift3_3,
End,
LCtrl,
LFn,
Meta,
LAlt,
Space,
Space5_1,
Space5_2,
Space5_3,
Space5_4,
Space5_5,
RAlt,
PrtSc,
RCtrl,
Up,
Down,
Left,
Right,
RFn,
NormalBlank,
/// To be ignored by per-key effects
NormalSpacer,
FuncBlank,
/// To be ignored by per-key effects
FuncSpacer,
ArrowBlank,
/// To be ignored by per-key effects
ArrowSpacer,
/// A gap between regular rows and the rightside buttons
RowEndSpacer,
}
/// 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
#[derive(Debug, Default, Clone, Copy, Deserialize, Serialize)]
pub enum KeyShape {
Tilde,
#[default]
Normal,
NormalBlank,
NormalSpacer,
Func,
FuncBlank,
FuncSpacer,
Space,
Space5,
LShift,
/// Used in a group of 3 (LED's)
LShift3,
RShift,
/// Used in a group of 3 (LED's)
RShift3,
Return,
Return3,
Tab,
Caps,
Backspace,
/// Used in a group of 3 (LED's)
Backspace3,
Arrow,
ArrowBlank,
ArrowSpacer,
RowEndSpacer,
}
impl KeyShape {
pub const fn ux(&self) -> f32 {
match self {
Self::Tilde => 0.8,
Self::Normal => 1.0,
Self::NormalBlank => 1.0,
Self::NormalSpacer => 1.0,
Self::Func => 1.0,
Self::FuncBlank => 1.0,
Self::FuncSpacer => 0.6,
Self::Space => 5.0,
Self::Space5 => 1.0,
Self::LShift => 2.1,
Self::LShift3 => 0.67,
Self::RShift => 2.7,
Self::RShift3 => 0.9,
Self::Return => 2.2,
Self::Return3 => 0.7333,
Self::Tab => 1.4,
Self::Caps => 1.6,
Self::Backspace => 2.0,
Self::Backspace3 => 0.666,
Self::Arrow => 0.93,
Self::ArrowBlank => 0.93,
Self::ArrowSpacer => 0.93,
Self::RowEndSpacer => 0.1,
}
}
pub const fn uy(&self) -> f32 {
match self {
Self::Func => 0.8,
Self::FuncBlank => 0.8,
Self::FuncSpacer => 0.8,
Self::Arrow => 0.6,
Self::ArrowBlank => 0.6,
Self::ArrowSpacer => 0.6,
_ => 1.0,
}
}
/// A blank is used to space keys out in GUI's and can be used or ignored
/// depednign on the per-key effect
pub const fn is_blank(&self) -> bool {
match self {
Self::NormalBlank | Self::FuncBlank | Self::ArrowBlank => true,
_ => false,
}
}
/// A spacer is used to space keys out in GUI's, but ignored in per-key effects
pub const fn is_spacer(&self) -> bool {
match self {
Self::FuncSpacer | Self::NormalSpacer | Self::ArrowSpacer => true,
_ => false,
}
}
/// All keys with a postfix of some number
pub const fn is_group(&self) -> bool {
match self {
Self::LShift3 | Self::RShift3 => true,
Self::Return3 | Self::Space5 | Self::Backspace3 => true,
_ => false,
}
}
}
impl From<Key> for KeyShape {
fn from(k: Key) -> Self {
match k {
Key::VolUp
| Key::VolDown
| Key::MicMute
| Key::Rog
| Key::Fan
| Key::Esc
| Key::F1
| Key::F2
| Key::F3
| Key::F4
| Key::F5
| Key::F6
| Key::F7
| Key::F8
| Key::F9
| Key::F10
| Key::F11
| Key::F12
| Key::Del => KeyShape::Func,
Key::Tilde => KeyShape::Tilde,
Key::BkSpc => KeyShape::Backspace,
Key::BkSpc3_1 | Key::BkSpc3_2 | Key::BkSpc3_3 => KeyShape::Backspace3,
Key::Tab | Key::BackSlash => KeyShape::Tab,
Key::Caps => KeyShape::Caps,
Key::Return => KeyShape::Return,
Key::Return3_1 | Key::Return3_2 | Key::Return3_3 => KeyShape::Return3,
Key::LShift => KeyShape::LShift,
Key::Rshift => KeyShape::RShift,
Key::Rshift3_1 | Key::Rshift3_2 | Key::Rshift3_3 => KeyShape::RShift3,
Key::Space => KeyShape::Space,
Key::Space5_1 | Key::Space5_2 | Key::Space5_3 | Key::Space5_4 | Key::Space5_5 => {
KeyShape::Space5
}
Key::Up | Key::Down | Key::Left | Key::Right => KeyShape::Arrow,
Key::NormalBlank => KeyShape::NormalBlank,
Key::NormalSpacer => KeyShape::NormalSpacer,
Key::FuncBlank => KeyShape::FuncBlank,
Key::FuncSpacer => KeyShape::FuncSpacer,
Key::ArrowBlank => KeyShape::ArrowBlank,
Key::ArrowSpacer => KeyShape::ArrowSpacer,
Key::RowEndSpacer => KeyShape::RowEndSpacer,
_ => KeyShape::Normal,
}
}
}
impl From<&Key> for KeyShape {
fn from(k: &Key) -> Self {
(*k).into()
}
}

View File

@@ -0,0 +1,146 @@
use super::{KeyLayout, KeyRow};
use crate::keys::Key;
impl KeyLayout {
/// Similar to GX502, but not per-key enabled
pub fn g513_layout() -> Self {
Self {
matches: vec!["G513".into()],
locale: "US".to_string(),
rows: vec![
KeyRow::new(vec![
Key::NormalSpacer,
Key::FuncSpacer,
Key::VolDown,
Key::VolUp,
Key::MicMute,
Key::Fan,
Key::Rog,
]),
KeyRow::new(vec![
Key::Esc,
Key::FuncSpacer,
Key::F1,
Key::F2,
Key::F3,
Key::F4,
Key::FuncSpacer, // not sure which key to put here
Key::F5,
Key::F6,
Key::F7,
Key::F8,
Key::FuncSpacer,
Key::F9,
Key::F10,
Key::F11,
Key::F12,
Key::RowEndSpacer,
Key::Del,
]),
KeyRow::new(vec![
Key::Tilde,
Key::N1,
Key::N2,
Key::N3,
Key::N4,
Key::N5,
Key::N6,
Key::N7,
Key::N8,
Key::N9,
Key::N0,
Key::Hyphen,
Key::Equals,
Key::BkSpc,
Key::RowEndSpacer,
Key::Home,
]),
KeyRow::new(vec![
Key::Tab,
Key::Q,
Key::W,
Key::E,
Key::R,
Key::T,
Key::Y,
Key::U,
Key::I,
Key::O,
Key::P,
Key::LBracket,
Key::RBracket,
Key::BackSlash,
Key::RowEndSpacer,
Key::PgUp,
]),
KeyRow::new(vec![
Key::Caps,
Key::A,
Key::S,
Key::D,
Key::F,
Key::G,
Key::H,
Key::J,
Key::K,
Key::L,
Key::SemiColon,
Key::Quote,
Key::Return,
Key::RowEndSpacer,
Key::PgDn,
]),
KeyRow::new(vec![
Key::LShift,
Key::Z,
Key::X,
Key::C,
Key::V,
Key::B,
Key::N,
Key::M,
Key::Comma,
Key::Period,
Key::FwdSlash,
Key::Rshift,
Key::RowEndSpacer,
Key::End,
]),
KeyRow::new(vec![
Key::LCtrl,
Key::LFn,
Key::Meta,
Key::LAlt,
Key::Space,
Key::RAlt,
Key::PrtSc,
Key::RCtrl,
Key::ArrowSpacer,
Key::Up,
Key::ArrowSpacer,
Key::RowEndSpacer,
Key::RFn,
]),
KeyRow::new(vec![
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::Left,
Key::Down,
Key::Right,
Key::ArrowSpacer,
]),
],
}
}
}

View File

@@ -0,0 +1,132 @@
use super::{KeyLayout, KeyRow};
use crate::keys::Key;
impl KeyLayout {
pub fn ga401_layout() -> Self {
Self {
matches: vec!["GA401".into(), "GA402".into()],
locale: "US".to_string(),
rows: vec![
KeyRow::new(vec![
Key::NormalSpacer,
Key::FuncSpacer,
Key::VolDown,
Key::VolUp,
Key::MicMute,
Key::Rog,
]),
KeyRow::new(vec![
Key::Esc,
Key::FuncSpacer,
Key::F1,
Key::F2,
Key::F3,
Key::F4,
Key::FuncSpacer, // not sure which key to put here
Key::F5,
Key::F6,
Key::F7,
Key::F8,
Key::FuncSpacer,
Key::F9,
Key::F10,
Key::F11,
Key::F12,
]),
KeyRow::new(vec![
Key::Tilde,
Key::N1,
Key::N2,
Key::N3,
Key::N4,
Key::N5,
Key::N6,
Key::N7,
Key::N8,
Key::N9,
Key::N0,
Key::Hyphen,
Key::Equals,
Key::BkSpc,
]),
KeyRow::new(vec![
Key::Tab,
Key::Q,
Key::W,
Key::E,
Key::R,
Key::T,
Key::Y,
Key::U,
Key::I,
Key::O,
Key::P,
Key::LBracket,
Key::RBracket,
Key::BackSlash,
]),
KeyRow::new(vec![
Key::Caps,
Key::A,
Key::S,
Key::D,
Key::F,
Key::G,
Key::H,
Key::J,
Key::K,
Key::L,
Key::SemiColon,
Key::Quote,
Key::Return,
]),
KeyRow::new(vec![
Key::LShift,
Key::Z,
Key::X,
Key::C,
Key::V,
Key::B,
Key::N,
Key::M,
Key::Comma,
Key::Period,
Key::FwdSlash,
Key::Rshift,
]),
KeyRow::new(vec![
Key::LCtrl,
Key::LFn,
Key::Meta,
Key::LAlt,
Key::Space,
Key::RAlt,
Key::PrtSc,
Key::RCtrl,
Key::ArrowSpacer,
Key::Up,
Key::ArrowSpacer,
]),
KeyRow::new(vec![
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::Left,
Key::Down,
Key::Right,
Key::ArrowSpacer,
]),
],
}
}
}

View File

@@ -0,0 +1,154 @@
use super::{KeyLayout, KeyRow};
use crate::keys::Key;
impl KeyLayout {
pub fn gx502_layout() -> Self {
Self {
matches: vec!["GX502".into(), "GU502".into()],
locale: "US".to_string(),
rows: vec![
KeyRow::new(vec![
Key::NormalSpacer,
Key::FuncSpacer,
Key::VolDown,
Key::VolUp,
Key::MicMute,
Key::Rog,
]),
KeyRow::new(vec![
Key::Esc,
Key::FuncSpacer,
Key::F1,
Key::F2,
Key::F3,
Key::F4,
Key::FuncSpacer, // not sure which key to put here
Key::F5,
Key::F6,
Key::F7,
Key::F8,
Key::FuncSpacer,
Key::F9,
Key::F10,
Key::F11,
Key::F12,
Key::RowEndSpacer,
Key::Del,
]),
KeyRow::new(vec![
Key::Tilde,
Key::N1,
Key::N2,
Key::N3,
Key::N4,
Key::N5,
Key::N6,
Key::N7,
Key::N8,
Key::N9,
Key::N0,
Key::Hyphen,
Key::Equals,
Key::BkSpc3_1,
Key::BkSpc3_2,
Key::BkSpc3_3,
Key::RowEndSpacer,
Key::Home,
]),
KeyRow::new(vec![
Key::Tab,
Key::Q,
Key::W,
Key::E,
Key::R,
Key::T,
Key::Y,
Key::U,
Key::I,
Key::O,
Key::P,
Key::LBracket,
Key::RBracket,
Key::BackSlash,
Key::RowEndSpacer,
Key::PgUp,
]),
KeyRow::new(vec![
Key::Caps,
Key::A,
Key::S,
Key::D,
Key::F,
Key::G,
Key::H,
Key::J,
Key::K,
Key::L,
Key::SemiColon,
Key::Quote,
Key::Return3_1,
Key::Return3_2,
Key::Return3_3,
Key::RowEndSpacer,
Key::PgDn,
]),
KeyRow::new(vec![
Key::LShift,
Key::Z,
Key::X,
Key::C,
Key::V,
Key::B,
Key::N,
Key::M,
Key::Comma,
Key::Period,
Key::FwdSlash,
Key::Rshift3_1,
Key::Rshift3_2,
Key::Rshift3_3,
Key::RowEndSpacer,
Key::End,
]),
KeyRow::new(vec![
Key::LCtrl,
Key::LFn,
Key::Meta,
Key::LAlt,
Key::Space5_1,
Key::Space5_2,
Key::Space5_3,
Key::Space5_4,
Key::Space5_5,
Key::RAlt,
Key::PrtSc,
Key::RCtrl,
Key::ArrowSpacer,
Key::Up,
Key::ArrowSpacer,
Key::RowEndSpacer,
Key::RFn,
]),
KeyRow::new(vec![
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::ArrowSpacer,
Key::Left,
Key::Down,
Key::Right,
Key::ArrowSpacer,
]),
],
}
}
}

View File

@@ -0,0 +1,64 @@
/// Hardcoded layout. Was used to generate a toml default
pub mod g513;
/// Hardcoded layout. Was used to generate a toml default
pub mod ga401;
/// Hardcoded layout. Was used to generate a toml default
pub mod gx502;
use crate::{error::Error, keys::Key};
use serde::{Deserialize, Serialize};
use std::{fs::OpenOptions, io::Read, path::Path, slice::Iter};
#[derive(Debug, Deserialize, Serialize)]
pub struct KeyLayout {
/// A series of board names that this layout can be used for. The board names
/// stored with the layout can be globbed, e.g, GA401 will match all of the
/// GA401I and GA401Q range variants.
///
/// `/sys/class/dmi/id/board_name`
matches: Vec<String>,
locale: String,
rows: Vec<KeyRow>,
}
impl KeyLayout {
pub fn from_file(path: &Path) -> Result<Self, Error> {
let mut file = OpenOptions::new().read(true).open(path)?;
let mut buf = String::new();
let read_len = file.read_to_string(&mut buf)?;
if read_len == 0 {
return Err(Error::Io(std::io::ErrorKind::InvalidData.into()));
} else {
return Ok(toml::from_str::<Self>(&buf)?);
}
}
pub fn matches(&self, board_name: &str) -> bool {
let board = board_name.to_ascii_uppercase();
for tmp in self.matches.iter() {
if board.contains(tmp.as_str()) {
return true;
}
}
false
}
pub fn rows(&self) -> Iter<KeyRow> {
self.rows.iter()
}
}
#[derive(Debug, Deserialize, Serialize)]
pub struct KeyRow {
row: Vec<Key>,
}
impl KeyRow {
pub fn new(row: Vec<Key>) -> Self {
Self { row }
}
pub fn row(&self) -> Iter<Key> {
self.row.iter()
}
}

View File

@@ -8,13 +8,12 @@ pub use builtin_modes::*;
mod per_key_rgb;
pub use per_key_rgb::*;
pub mod error;
pub mod keys;
pub mod layouts;
pub mod usb;
pub mod error;
pub const LED_MSG_LEN: usize = 17;
pub static VERSION: &str = env!("CARGO_PKG_VERSION");
pub const RED: Colour = Colour(0xff, 0x00, 0x00);

View File

@@ -1,3 +1,5 @@
use crate::keys::Key;
/// A `KeyColourArray` contains all data to change the full set of keyboard
/// key colours individually.
///
@@ -45,16 +47,16 @@ impl KeyColourArray {
#[inline]
pub fn set(&mut self, key: Key, r: u8, g: u8, b: u8) {
if let Some((rr, gg, bb)) = self.key(key) {
*rr = r;
*gg = g;
*bb = b;
if let Some(c) = self.rgb(key) {
c[0] = r;
c[1] = g;
c[2] = b;
}
}
/// Indexes in to `KeyColourArray` at the correct row and column
/// to set a series of three bytes to the chosen R,G,B values
pub fn key(&mut self, key: Key) -> Option<(&mut u8, &mut u8, &mut u8)> {
pub fn rgb(&mut self, key: Key) -> Option<&mut [u8]> {
// Tuples are indexes in to array
let (row, col) = match key {
Key::VolDown => (0, 15),
@@ -91,9 +93,9 @@ impl KeyColourArray {
Key::N0 => (3, 21),
Key::Hyphen => (3, 24),
Key::Equals => (3, 27),
Key::BkSpc1 => (3, 30),
Key::BkSpc2 => (3, 33),
Key::BkSpc3 => (3, 36),
Key::BkSpc3_1 => (3, 30),
Key::BkSpc3_2 => (3, 33),
Key::BkSpc3_3 => (3, 36),
Key::Home => (3, 39),
Key::Tab => (3, 54),
//
@@ -125,11 +127,16 @@ impl KeyColourArray {
Key::SemiColon => (5, 51),
Key::Quote => (5, 54),
//
Key::Ret1 => (6, 12),
Key::Ret2 => (6, 15),
Key::Ret3 => (6, 18),
Key::Return => (6, 9),
Key::Return3_1 => (6, 12),
Key::Return3_2 => (6, 15),
Key::Return3_3 => (6, 18),
Key::PgDn => (6, 21),
Key::LShift => (6, 36),
// TODO: Find correct locations
Key::LShift3_1 => (6, 36),
Key::LShift3_2 => (6, 36),
Key::LShift3_3 => (6, 36),
Key::Z => (6, 42),
Key::X => (6, 45),
Key::C => (6, 48),
@@ -141,19 +148,21 @@ impl KeyColourArray {
Key::Comma => (7, 15),
Key::Period => (7, 18),
Key::FwdSlash => (7, 21),
Key::Rshift1 => (7, 27),
Key::Rshift2 => (7, 30),
Key::Rshift3 => (7, 33),
Key::Rshift => (7, 24),
Key::Rshift3_1 => (7, 27),
Key::Rshift3_2 => (7, 30),
Key::Rshift3_3 => (7, 33),
Key::End => (7, 36),
Key::LCtrl => (7, 51),
Key::LFn => (7, 54),
//
Key::Meta => (8, 9),
Key::LAlt => (8, 12),
Key::Space1 => (8, 15),
Key::Space2 => (8, 18),
Key::Space3 => (8, 21),
Key::Space4 => (8, 24),
Key::Space5_1 => (8, 15),
Key::Space5_2 => (8, 18),
Key::Space5_3 => (8, 21),
Key::Space5_4 => (8, 24),
Key::Space5_5 => (8, 27),
Key::RAlt => (8, 30),
Key::PrtSc => (8, 33),
Key::RCtrl => (8, 36),
@@ -164,16 +173,17 @@ impl KeyColourArray {
//
Key::Down => (10, 9),
Key::Right => (10, 12),
Key::None => return None,
Key::NormalBlank
| Key::FuncBlank
| Key::NormalSpacer
| Key::FuncSpacer
| Key::ArrowBlank
| Key::ArrowSpacer
| Key::RowEndSpacer => return None,
Key::Fan | Key::Space | Key::BkSpc => return None,
};
// LOLOLOLOLOLOLOL! Look it's safe okay
unsafe {
Some((
&mut *(&mut self.0[row][col] as *mut u8),
&mut *(&mut self.0[row][col + 1] as *mut u8),
&mut *(&mut self.0[row][col + 2] as *mut u8),
))
}
Some(&mut self.0[row][col..2])
}
#[inline]
@@ -182,108 +192,6 @@ impl KeyColourArray {
}
}
#[derive(Debug, PartialEq, Copy, Clone)]
pub enum Key {
VolUp,
VolDown,
MicMute,
Rog,
Esc,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
Del,
Tilde,
N1,
N2,
N3,
N4,
N5,
N6,
N7,
N8,
N9,
N0,
Hyphen,
Equals,
BkSpc1,
BkSpc2,
BkSpc3,
Home,
Tab,
Q,
W,
E,
R,
T,
Y,
U,
I,
O,
P,
LBracket,
RBracket,
BackSlash,
PgUp,
Caps,
A,
S,
D,
F,
G,
H,
J,
K,
L,
SemiColon,
Quote,
Ret1,
Ret2,
Ret3,
PgDn,
LShift,
Z,
X,
C,
V,
B,
N,
M,
Comma,
Period,
FwdSlash,
Rshift1,
Rshift2,
Rshift3,
End,
LCtrl,
LFn,
Meta,
LAlt,
Space1,
Space2,
Space3,
Space4,
RAlt,
PrtSc,
RCtrl,
Up,
Down,
Left,
Right,
RFn,
None,
}
pub trait KeyLayout {
fn get_rows(&self) -> &Vec<[Key; 17]>;
}
@@ -301,37 +209,37 @@ impl Default for GX502Layout {
fn default() -> Self {
GX502Layout(vec![
[
Key::None,
Key::None,
Key::NormalSpacer,
Key::FuncSpacer,
Key::VolDown,
Key::VolUp,
Key::MicMute,
Key::Rog,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
],
[
Key::Esc,
Key::None,
Key::NormalBlank,
Key::F1,
Key::F2,
Key::F3,
Key::F4,
Key::None, // not sure which key to put here
Key::NormalBlank, // not sure which key to put here
Key::F5,
Key::F6,
Key::F7,
Key::F8,
Key::F9,
Key::NormalBlank,
Key::F9,
Key::F10,
Key::F11,
@@ -352,9 +260,9 @@ impl Default for GX502Layout {
Key::N0,
Key::Hyphen,
Key::Equals,
Key::BkSpc1,
Key::BkSpc2,
Key::BkSpc3,
Key::BkSpc3_1,
Key::BkSpc3_2,
Key::BkSpc3_3,
Key::Home,
],
[
@@ -390,9 +298,9 @@ impl Default for GX502Layout {
Key::SemiColon,
Key::Quote,
Key::Quote,
Key::Ret1,
Key::Ret2,
Key::Ret3,
Key::Return3_1,
Key::Return3_2,
Key::Return3_3,
Key::PgDn,
],
[
@@ -409,9 +317,9 @@ impl Default for GX502Layout {
Key::Period,
Key::FwdSlash,
Key::FwdSlash,
Key::Rshift1,
Key::Rshift2,
Key::Rshift3,
Key::Rshift3_1,
Key::Rshift3_2,
Key::Rshift3_3,
Key::End,
],
[
@@ -419,11 +327,11 @@ impl Default for GX502Layout {
Key::LFn,
Key::Meta,
Key::LAlt,
Key::Space1,
Key::Space2,
Key::Space3,
Key::Space4,
Key::Space4,
Key::Space5_1,
Key::Space5_2,
Key::Space5_3,
Key::Space5_4,
Key::Space5_5,
Key::RAlt,
Key::PrtSc,
Key::RCtrl,
@@ -434,23 +342,23 @@ impl Default for GX502Layout {
Key::RFn,
],
[
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::None,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::NormalBlank,
Key::Left,
Key::Down,
Key::Right,
Key::None,
Key::NormalBlank,
],
])
}