Skip to content

Commit 06ac1bf

Browse files
committed
feat: adds reject, unflagged, pick lightroom commands to keys 4-6
1 parent 8e30f14 commit 06ac1bf

2 files changed

Lines changed: 21 additions & 10 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ cargo run --release
3030

3131
1. A
3232
2. Pause/Play
33-
3.
34-
4.
35-
5.
36-
6.
37-
7.
38-
8.
39-
9.
40-
10.
41-
11.
42-
12.
33+
3. Skip
34+
4. Reject (lightroom)
35+
5. Unflagged (lightroom)
36+
6. Pick (lightroom)
37+
7.
38+
8.
39+
9.
40+
10.
41+
11.
42+
12.
4343

4444
## TODO (no order)
4545

src/main.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,17 @@ fn main() -> ! {
149149
hid.device::<ConsumerControl<_>, _>().write_report(&MultipleConsumerReport {
150150
codes: [Consumer::ScanNextTrack, Consumer::Unassigned, Consumer::Unassigned, Consumer::Unassigned]
151151
}).ok(); //skip
152+
}
153+
//lightroom commands
154+
else if key4_pressed {
155+
led_pin.set_high().unwrap();
156+
hid.device::<NKROBootKeyboard<_>, _>().write_report([Keyboard::X]).ok(); // X, reject
157+
} else if key5_pressed {
158+
led_pin.set_high().unwrap();
159+
hid.device::<NKROBootKeyboard<_>, _>().write_report([Keyboard::U]).ok(); // U, unflagged
160+
} else if key6_pressed {
161+
led_pin.set_high().unwrap();
162+
hid.device::<NKROBootKeyboard<_>, _>().write_report([Keyboard::P]).ok(); // P, pick
152163
} else {
153164
//No key pressed or released, turn off LED, release keys and media controls
154165
led_pin.set_low().unwrap();

0 commit comments

Comments
 (0)