[Solved] How to get keyup to work with key? Keydown works though.
Posted: Fri Jul 16, 2021 5:19 pm
EDIT: thanks to renpytom for updated this in the documentation! https://www.renpy.org/doc/html/keymap.html
SOLUTION: the correct syntax is "keyup_K_x" ... example:
"keyup_K_a"
"keyup_K_b"
"keyup_K_c"
"keyup_K_1"
"keyup_K_2"
"keyup_K_3"
For some reason keyup is not working, but keydown works fine. Anyone know how to get the keyup to work? Maybe my syntax is wrong?
I tested this with a brand new ren'py project.
SOLUTION: the correct syntax is "keyup_K_x" ... example:
"keyup_K_a"
"keyup_K_b"
"keyup_K_c"
"keyup_K_1"
"keyup_K_2"
"keyup_K_3"
For some reason keyup is not working, but keydown works fine. Anyone know how to get the keyup to work? Maybe my syntax is wrong?
Code: Select all
default someVar = False
screen test1():
key "keydown_x" action SetVariable("someVar", True) #works
key "keyup_x" action SetVariable("someVar", False) #doesn't work
key "keyup_y" action SetVariable("someVar", False) #doesn't work
key "y" action SetVariable("someVar", False) #works
text "[someVar]"
label start:
show screen test1
"testing"
return