-
-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
: Add --ascii
flag
#10793
qmk info
: Add --ascii
flag
#10793
Conversation
def render_layout(layout_data, render_ascii, key_labels=None): | ||
"""Renders a single layout. | ||
""" | ||
textpad = [array('u', ' ' * 200) for x in range(50)] | ||
style = 'ascii' if render_ascii else 'unicode' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A thought- it might be more future-proof to do this so we can have other layout styles in the future. Dots? Letters?
def render_layout(layout_data, render_ascii, key_labels=None): | |
"""Renders a single layout. | |
""" | |
textpad = [array('u', ' ' * 200) for x in range(50)] | |
style = 'ascii' if render_ascii else 'unicode' | |
def render_layout(layout_data, style='unicode', key_labels=None): | |
"""Renders a single layout. | |
Args: | |
style | |
The style for the box drawing characters. 'ascii' or 'unicode' | |
key_labels | |
A sequence of label strings to write on top of the keys | |
""" | |
textpad = [array('u', ' ' * 200) for x in range(50)] | |
style = 'ascii' if render_ascii else 'unicode' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed a Unicode error I had in MSYS MinGW64.
Thanks! |
* upstream/master: (153 commits) [Keymap] add brandonschlack userspace and keymaps (qmk#10411) [Keymap] add ai03/polaris:mekberg (qmk#10508) CLI: Add `qmk clean` (qmk#10785) Adds support for XD84 Pro (qmk#9750) Freyr refactor (qmk#10833) KC60 refactor (qmk#10834) [Keyboard] Fixes for PloopyCo mouse and readmes (qmk#10841) Enable extrakeys, mousekeys for all VIA keymaps. (qmk#10740) Add OLED support for Riblee F411 (qmk#10778) NK65 eeprom compatibility with 128KB and 256KB (qmk#10804) Add support for Noxary Vulcan (qmk#10822) Enable media keys support for Canoe VIA keymap (qmk#10829) Phantom refactor (qmk#10805) `qmk info`: Add `--ascii` flag (qmk#10793) [Keymap] Corrected the dvorak layout for kinesis advantage (qmk#10808) [Keyboard] Fix keyboard matrix scan rate with F072 (qmk#10226) [Keyboard] nullbitsco/nibble Configurator rework (qmk#10814) [Keyboard] VIA Support: Exent 65% (qmk#10797) [Keyboard] Add keebsforall/freebird60 (qmk#10774) add 65_ansi_split_bs to default community layouts (qmk#10770) ...
Description
Replaced #10734 with something more useful.
MinGW Python on MSYS2 has trouble rendering the box drawing characters (because it's a native binary and thus thinks the character set is cp1252). As a hacky workaround, we can use ASCII characters instead.
It's not as pretty, but it's something.
Types of Changes
Issues Fixed or Closed by This PR
Checklist