Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qmk info: nicer rendering of ISO enter #16466

Merged
merged 7 commits into from
Mar 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/python/qmk/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def render_layout(layout_data, render_ascii, key_labels=None):
y = ceil(key.get('y', 0) * 3)
w = ceil(key.get('w', 1) * 4)
h = ceil(key.get('h', 1) * 3)
is_iso_key = w == 5 and h == 6
fauxpark marked this conversation as resolved.
Show resolved Hide resolved

if key_labels:
label = key_labels.pop(0)
Expand Down Expand Up @@ -198,6 +199,14 @@ def render_layout(layout_data, render_ascii, key_labels=None):
textpad[y + i + 2][x:x + w] = mid_line
textpad[y + h - 1][x:x + w] = bot_line

if is_iso_key:
textpad[y][x - 1] = box_chars['tl']
textpad[y][x] = box_chars['h']
textpad[y + 1][x - 1] = box_chars['v']
textpad[y + 1][x] = ' '
textpad[y + 2][x - 1] = box_chars['bl']
textpad[y + 2][x] = box_chars['tr']

lines = []
for line in textpad:
if line.tounicode().strip():
Expand Down