Added types and append_string command
Application is now able to set the types (Key, Mouse, MouseKey, String), which are saved in a struct, with a function. Furthermore, the application can check the returned type of the board with a match. This commit also implements the append string functionallity.
This commit is contained in:
@@ -128,14 +128,15 @@ fn main() {
|
||||
|
||||
for (i, cmd) in cmd_list.iter().enumerate() {
|
||||
match cmd as &str {
|
||||
"wr_key" => {
|
||||
pedals.set_key(i, val_list[i].as_str());
|
||||
"set_key" => {
|
||||
pedals.set_key(ped_list[i] as usize, val_list[i].as_str());
|
||||
}
|
||||
"del_key" => {
|
||||
}
|
||||
"append_key" => {
|
||||
}
|
||||
"append_str" => {
|
||||
pedals.set_string(ped_list[i] as usize, val_list[i].as_str());
|
||||
}
|
||||
_ => {
|
||||
error!("Unkonwn command!");
|
||||
|
Reference in New Issue
Block a user