documentation indexreference manualfunction index

name

Function: ui.keymap (**keymap):

This is a psuedo-widget that adds a keymap to the screen. This function takes as keyword arguments the names of bindings or keysyms. These keywords should be given as their arguments a function, which is called with zero arguments when an appropriate keysym is pressed.

Example

label easter_egg:
    "You win!"
    return

init:
    python hide:
         def overlay():
             ui.keymap(W=renpy.curried_call_in_new_context("easter_egg"))

         config.overlay_functions.append(overlay)



documentation indexreference manualfunction index