customizing the keymap

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

customizing the keymap

#1 Post 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 > <
Image - Image -Image

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2384
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: customizing the keymap

#2 Post 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')
< < insert Rick Cook quote here > >

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: customizing the keymap

#3 Post 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

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: customizing the keymap

#4 Post by Scribbles »

Ok, that worked! Thanks :)
Image - Image -Image

Post Reply

Who is online

Users browsing this forum: Google [Bot]