-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put all keymap related files into cir::keymap module
Signed-off-by: Sean Young <sean@mess.org>
- Loading branch information
Showing
7 changed files
with
57 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use std::collections::HashMap; | ||
|
||
mod parse; | ||
mod protocol; | ||
|
||
/// A Linux keymap, either toml or text format used by ir-keytable | ||
#[derive(PartialEq, Eq, Debug, Default)] | ||
pub struct Keymap { | ||
pub name: String, | ||
pub protocol: String, | ||
pub variant: Option<String>, | ||
pub irp: Option<String>, | ||
pub rc_protocol: Option<u16>, | ||
pub raw: Option<Vec<Raw>>, | ||
pub scancodes: Option<HashMap<String, String>>, | ||
} | ||
|
||
#[derive(PartialEq, Eq, Debug)] | ||
pub struct Raw { | ||
pub keycode: String, | ||
pub raw: Option<String>, | ||
pub repeat: Option<String>, | ||
pub pronto: Option<String>, | ||
} | ||
|
||
pub struct LinuxProtocol { | ||
pub name: &'static str, | ||
pub decoder: &'static str, | ||
pub irp: Option<&'static str>, | ||
pub scancode_mask: u32, | ||
pub protocol_no: u32, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
pub mod keymap; | ||
pub mod linux_protocol; | ||
#[cfg(target_os = "linux")] | ||
pub mod lirc; | ||
pub mod lircd_conf; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters