[Solved]Need help changing the default keymap
Posted: Tue Jul 03, 2018 10:37 am
So as title says I need to change some keys in the default keymap, more specifically the mousewheel functions, by default it is used for rollback but I'd like to make it so it shows a screen when rolled up, as most visual novels normally do, showing dialogue history screen. I know rollback is an excellent feature unique to Ren'Py, but there is a reason we don't want to use it for the game we're currently developing.
I've read through the documentation at https://www.renpy.org/doc/html/keymap.html but I'm not sure how to add a new function, it seems like they have to be setup somewhere, the keymap dict seems to be made of lists of keybidings already defined, but I see no way to add your own.
For now the only way I've been able to come up with is using a screen like this:
But I'm not sure this screen will be up all the time unless I manually add it to every other screen and every label in the game, wich seems like too much tedious and repetitive work.
Any suggestions?
I've read through the documentation at https://www.renpy.org/doc/html/keymap.html but I'm not sure how to add a new function, it seems like they have to be setup somewhere, the keymap dict seems to be made of lists of keybidings already defined, but I see no way to add your own.
For now the only way I've been able to come up with is using a screen like this:
Code: Select all
define config.rollback_enabled = False
screen mousewheel_rebind():
key 'mousedown_4' action ShowMenu("history")
label start:
show screen mousewheel_rebind #and never be hidden, hopefully
"The game start here!"
Any suggestions?