From 4dd36b5e347708541a49c670bade78c932619af6 Mon Sep 17 00:00:00 2001 From: Cole Deck Date: Fri, 23 Oct 2020 19:01:44 +0100 Subject: [PATCH] add symbols above numerical keys --- __pycache__/kb.cpython-37.pyc | Bin 1638 -> 1845 bytes kb.py | 16 ++++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/__pycache__/kb.cpython-37.pyc b/__pycache__/kb.cpython-37.pyc index b64cfeaabf64fe06255dc84f50683107dd518675..789787ebc6cd1998bd7d9de7c005b2f96bce6005 100644 GIT binary patch delta 944 zcmah|y-yTD6rVRcyDSTLz=0pfheG%W3nvhAHijVTkw`;`XuykrwWZZoRwQ=TQ~73H;zu;h=DpvWH@|sblRayHpHAIPr7VJr_l8?< z-=zw)!EmQs_fWhqKu8k~J_n?LxbdkD0dR1rw~0s-)DmO~>IoVNwj^jK*qWf_P;t!L zc>8O@Qw4GabsEsd2?^j7>Y5KeeXjW|(2gLBhd_MYH+Z@yw)addpaTPZq6cc&s@msc4)H!qLcSrNWFwq5V!c{i#76F`n&YT?>)NM zr3w&_JsSsU^4>bsa)%k;RP#CSd5yR|K-A~A@;)`K$Hb-UWR37Y=C)4uOyyf8cK@=3 zAqfi-h9!(h7?rRop)nT0goJSkb_pLpUKF*4vWnt$qIyOGvSF&K-q1a^N`!&VSlKk9 zQ!^19{BnsFJe1a4WykYN)!i5Kc@;**G)Qe=U+nnhEzcKIbCqgoyTZMBw9ctD%N|-7 z9vR&nn;8FQsyJ|4!nA}}5}rn|CE dX$&%8K!yr69orO>VagaVW)(Ld&KNf#_XEM4-JSpd delta 744 zcma)(&1w`u5Xb93+3t+%&Th;G)Pp#yhOi-i5=9V{n9WHDqWN-B6K0a$2{B>T zJqS7Fu+SHe`T~LnAHbLJFo;LNSD1sbdW~Q}vNm*8b@i{SsDFPde=m9WJ+DZ-md=>f zt&d*A={kI}saf9bw;<}_RWGFm`)7L{q)-SQeM>nVB$VK#lj1DB0Vo+t3TkMqA8)$M z6_|Uj#6V6mx2J}GbKPSKx(t3$Ck7TQGWSKD9LSZJ`>DJmT=yT7yc6#!<*9qncX_UI zC=R1a2pb)zL&Qqh_kHC?`ZX5RsSb9hc19EVw|>hMje)u#mU38)T1lT!USwF!aXCkt<7tjshU*z7Gu+NFlcAZR*c5Z~3v-Wl zD~nMW#oLh|20Lr93hJ&NAu`kAw0S5lR-9&GJJzZx*MlSpwAmNu?<{c_LK!X!Y)f$d zKQiBhk8yJ#S`Th4M(wSQjaVmv`qRAT&$L5-HeL_>Mz9w8N$j_j@(;Nyy2_2~QkU83 knl%@!xn%a`G+O4fthy7HaCOammFMKRy`3-z@+PkR0=~$lL;wH) diff --git a/kb.py b/kb.py index 6b8bc76..c0c960d 100755 --- a/kb.py +++ b/kb.py @@ -48,6 +48,12 @@ def write_caps(char): write_report(chr(32)+NULL_CHAR+chr(char)+NULL_CHAR*5) def write_str(word): for letter in word: + if letter == "!" or letter == "@" or letter == "#" or letter == "$" or letter == "%" or letter == "^" or letter == "&" or letter == "*" or letter == "(" or letter == ")": + key = [x for x in ")!@#$%^&*("] + num = key.index(letter) + write_caps(keycodes.keycodelst[str(num)]) + write_report(NULL_CHAR*8) + continue if letter == "?": letter = "/" write_caps(keycodes.keycodelst[letter]) @@ -68,16 +74,6 @@ def write_str(word): write_caps(keycodes.keycodelst[letter]) write_report(NULL_CHAR*8) continue - if letter == "!": - letter = "1" - write_caps(keycodes.keycodelst[letter]) - write_report(NULL_CHAR*8) - continue - if letter == "*": - letter = "8" - write_caps(keycodes.keycodelst[letter]) - write_report(NULL_CHAR*8) - continue if letter.capitalize() == letter and letter >= 'A' and letter <= 'Z': #print(letter.capitalize(), letter) write_caps(keycodes.keycodelst[letter])