Page 1 of 1

customizing the keymap

Posted: Thu Mar 23, 2017 11:44 am
by Scribbles
Is there a way to customize the Right mouse click in just one game as opposed to ALL renpy files?

What I found online shows how to change it in the main Renpy code (under "common/keymap" and so on) but I don't want it to effect everything... just the one game I'm working on?

https://www.renpy.org/doc/html/keymap.html

I'd like it to go to a different screen then the "save" screen

I'm also new to coding and changing the common renpy code sounds like a really bad idea > <

Re: customizing the keymap

Posted: Thu Mar 23, 2017 11:57 am
by Ocelot
It is right here in documentation:
Documentation wrote:To change a binding, update the appropriate list in config.keymap. The following code adds the 't' key to the list of keys that dismiss a say statement, and removes the space key from that list.

Code: Select all

init:
    $ config.keymap['dismiss'].append('t')
    $ config.keymap['dismiss'].remove('K_SPACE')
Just remove 'mouseup_3', from 'game_menu' and append it whenever you want:

Code: Select all

init python:
    config.keymap['game_menu'].remove('mouseup_3')

Re: customizing the keymap

Posted: Thu Mar 23, 2017 11:59 am
by IrinaLazareva
Scribbles wrote:I'd like it to go to a different screen then the "save" screen
by the way, also read this
https://www.renpy.org/wiki/renpy/FAQ#Ho ... me_menu.3F

Re: customizing the keymap

Posted: Thu Mar 23, 2017 2:12 pm
by Scribbles
Ok, that worked! Thanks :)