Skip to content

Commit 33456ed

Browse files
authored
Merge pull request #1930 from ViToni/feature/Add_blank_screen_for_MacroPad
Thank you
2 parents e88f652 + ed18ab7 commit 33456ed

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

Macropad_Hotkeys/code.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ def switch(self):
3939
""" Activate application settings; update OLED labels and LED
4040
colors. """
4141
group[13].text = self.name # Application name
42+
if self.name:
43+
rect.fill = 0xFFFFFF
44+
else: # empty app name indicates blank screen for which we dimm header
45+
rect.fill = 0x000000
4246
for i in range(12):
4347
if i < len(self.macros): # Key in use, set label + LED color
4448
macropad.pixels[i] = self.macros[i][0]
@@ -70,7 +74,8 @@ def switch(self):
7074
macropad.display.height - 1 -
7175
(3 - y) * 12),
7276
anchor_point=(x / 2, 1.0)))
73-
group.append(Rect(0, 0, macropad.display.width, 12, fill=0xFFFFFF))
77+
rect = Rect(0, 0, macropad.display.width, 12, fill=0xFFFFFF)
78+
group.append(rect)
7479
group.append(label.Label(terminalio.FONT, text='', color=0x000000,
7580
anchored_position=(macropad.display.width//2, -2),
7681
anchor_point=(0.5, 0.0)))
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# MACROPAD Hotkeys: blank screen for idle
2+
# Contributed by GitHub @vitoni
3+
4+
5+
app = { # REQUIRED dict, must be named 'app'
6+
'name' : '', # Application name
7+
'macros' : [ # List of button macros...
8+
# COLOR LABEL KEY SEQUENCE
9+
# 1st row ----------
10+
(0x000000, '', []),
11+
(0x000000, '', []),
12+
(0x000000, '', []),
13+
# 2nd row ----------
14+
(0x000000, '', []),
15+
(0x000000, '', []),
16+
(0x000000, '', []),
17+
# 3rd row ----------
18+
(0x000000, '', []),
19+
(0x000000, '', []),
20+
(0x000000, '', []),
21+
# 4th row ----------
22+
(0x000000, '', []),
23+
(0x000000, '', []),
24+
(0x000000, '', []),
25+
# Encoder button ---
26+
(0x000000, '', [])
27+
]
28+
}

0 commit comments

Comments
 (0)