Commit bb57a1f
committed
IdleLEDs: Implement a .suspend() and a .resume() method
Sometimes we want to control LEDs outside of `IdleLEDs`, like through
`HostPowerManagement`, and in these cases, we would like `IdleLEDs` to have an
up-to-date idea about what's going on. That is, if the host enters sleep,
`IdleLEDs` should be aware of that, and enter idle state. Once the host wakes
up, either via the keyboard or otherwise, `IdleLEDs` should resume its tasks.
With the new `.suspend()` and `.resume()` method, this becomes possible.
This addresses a big part of #1287.
Signed-off-by: Gergely Nagy <[email protected]>1 parent 8f1093b commit bb57a1f
File tree
3 files changed
+35
-11
lines changed- plugins/Kaleidoscope-IdleLEDs
- src/kaleidoscope/plugin
3 files changed
+35
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
94 | 104 | | |
95 | 105 | | |
96 | 106 | | |
| |||
Lines changed: 22 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
47 | 65 | | |
48 | 66 | | |
49 | 67 | | |
50 | 68 | | |
51 | | - | |
| 69 | + | |
52 | 70 | | |
53 | | - | |
54 | | - | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
58 | 75 | | |
59 | 76 | | |
60 | 77 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 78 | + | |
67 | 79 | | |
68 | 80 | | |
69 | 81 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
0 commit comments