我试图制作一个键盘,但我想让它只使用一个小键盘和键盘上的按钮,但是我的代码对a和b部分似乎不起作用。我已经评论了哪一部分
if "1" in line:
if kytype == 'a':
kytype = "k"
elif kytype == 'b': #when this part is runned it prints a 'b' instead
kytype == "u" # of a 'u'
elif kytype == " ":
kytype = "a"
elif "2" in line:
if kytype == 'a':
kytype = "l"
elif kytype == 'b':
kytype == "v" #it happens here too and instead of printing a
elif kytype == " ": # 'v' it prints a 'b'
kytype = "b"
#I haven't done the rest of the code for other letters because of the
#problem
elif line = 'ins':
print(kytype)
kytype = " "
目前没有回答
相关问题 更多 >
编程相关推荐