Commit 6e0ac923 authored by FKD13's avatar FKD13

fixed issue with emojis

parent 14b4d15f
......@@ -3,12 +3,16 @@
import string
from http.server import HTTPServer, BaseHTTPRequestHandler
from io import BytesIO
import string
import base64
NULL_CHAR = chr(0)
file = open('/dev/hidg0', 'rb+')
alphabet_lower = set(string.ascii_lowercase)
alphabet_upper = set(string.ascii_uppercase)
colors = {
"Z": "a", # Black
"B": "b", # Blue
......@@ -37,9 +41,9 @@ def release_keys():
def printchar(c):
if c.islower():
if c in alphabet_lower:
write_report(NULL_CHAR*2+chr(4 + ord(c) - ord('a'))+NULL_CHAR*5)
elif c.isupper():
elif c in alphabet_upper:
write_report(chr(32)+NULL_CHAR+chr(4 + ord(c) - ord('A'))+NULL_CHAR*5)
elif c.isdigit():
write_report(NULL_CHAR*2+chr(0x1e + ((ord(c) - ord('0') - 1) % 10))+NULL_CHAR*5)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment