Skip to content

Commit 40a2095

Browse files
committed
Experiment with buttons patch
1 parent 7229b51 commit 40a2095

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/devices/device_ally.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ pub fn start_mapper() -> Option<JoinHandle<()>> {
8686

8787
match device {
8888
Some(mut device) => {
89-
// Use the device
90-
println!("Ally specific device found: {}", device.name().unwrap_or("Unnamed device"));
89+
90+
println!("Ally-specific device found: {}", device.name().unwrap_or("Unnamed device"));
9191

9292
Some(thread::spawn(move || {
9393
let context = Arc::new(get_context().unwrap());
@@ -98,21 +98,21 @@ pub fn start_mapper() -> Option<JoinHandle<()>> {
9898
for event in device.fetch_events().unwrap() {
9999
if let evdev::InputEventKind::Key(key) = event.kind() {
100100
if key == evdev::Key::KEY_PROG1 && event.value() == 0 {
101-
println!("Show QAM");
102101
let context_str = context_clone.deref().clone();
103102
execute(context_str, String::from("window.HandleSystemKeyEvents({eKey: 1})"));
104103
}
105104

106105
if key == evdev::Key::KEY_F16 && event.value() == 0 {
107-
println!("Show menu");
106+
let context_str = context_clone.deref().clone();
107+
execute(context_str, String::from("window.HandleSystemKeyEvents({eKey: 0})"));
108108
}
109109
}
110110
}
111111
}
112112
}))
113113
}
114114
None => {
115-
println!("No device found");
115+
println!("No Ally-specific found");
116116
None
117117
}
118118
}

0 commit comments

Comments
 (0)