forgot to include in last commit

This commit is contained in:
Kovid Goyal 2018-02-07 14:40:23 +05:30
parent 226a89c184
commit 3828511051
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
= Key encoding for extended keyboard protocol = Key encoding for extended keyboard protocol
See link:protocol-extensions.asciidoc#keyboard-handling[Keyboard Handling protocol extension] See link:protocol-extensions.asciidoc#keyboard-handling[Keyboard Handling protocol extension]
for more information and link:key_encoding.json[for this table in JSON format].
|=== |===
| Name | Encoded representation (base64) | Name | Encoded representation (base64)

View File

@ -42,6 +42,7 @@ raw = subprocess.check_output([
key_map = json.loads(raw) key_map = json.loads(raw)
lines = [ lines = [
'See link:protocol-extensions.asciidoc#keyboard-handling[Keyboard Handling protocol extension]', 'See link:protocol-extensions.asciidoc#keyboard-handling[Keyboard Handling protocol extension]',
' for more information and link:key_encoding.json[for this table in JSON format].',
'', '|===', '| Name | Encoded representation (base64)', '' '', '|===', '| Name | Encoded representation (base64)', ''
] ]
for k in sorted(key_map): for k in sorted(key_map):
@ -50,3 +51,5 @@ lines += ['', '|===']
with open('key_encoding.asciidoc', 'w') as f: with open('key_encoding.asciidoc', 'w') as f:
print('= Key encoding for extended keyboard protocol\n', file=f) print('= Key encoding for extended keyboard protocol\n', file=f)
print('\n'.join(lines), file=f) print('\n'.join(lines), file=f)
with open('key_encoding.json', 'w') as f:
f.write(json.dumps(key_map, indent=2))