[SOLVED]How to open renpy/common/00keymap.rpy?

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
bloodyhair
Regular
Posts: 61
Joined: Tue Aug 11, 2015 7:20 am
Deviantart: Takada-Wang
Contact:

[SOLVED]How to open renpy/common/00keymap.rpy?

#1 Post by bloodyhair »

My problem is actually quite simple: I just want to change the Esc button function so instead of going to save page, it would be changing into yesno prompt page (for quitting).

I tried to read about customizing the Keymap in renpy.org and it told me that the default keymap is contained inside 00keymap.rpy. I think changing it directly from there would make it easier to get what I want. But when I tried to open it with Ren'Py, I got this notice instead:

Code: Select all

I'm sorry, but an uncaught exception occurred.

Before loading the script.
WindowsError: [Error 267] The directory name is invalid: u'D:\\Software\\RenPy\\renpy-6.99.6-sdk\\renpy\\common\\00keymap.rpy\\*.*'

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "D:\Software\RenPy\renpy-6.99.6-sdk\renpy\bootstrap.py", line 281, in bootstrap
    renpy.main.main()
  File "D:\Software\RenPy\renpy-6.99.6-sdk\renpy\main.py", line 290, in main
    for fn in os.listdir(dir):
WindowsError: [Error 267] The directory name is invalid: u'D:\\Software\\RenPy\\renpy-6.99.6-sdk\\renpy\\common\\00keymap.rpy\\*.*'

Windows-7-6.1.7600
Ren'Py 6.99.6.739
 
I wonder how to open this 00keymap.rpy or there is another better way to change the keymap?
Last edited by bloodyhair on Sat Dec 05, 2015 4:59 am, edited 1 time in total.

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: How to open renpy/common/00keymap.rpy?

#2 Post by Zetsubou »

Going purely by the documentation, I believe you want something like:

Code: Select all

init python:
    config.keymap['quit'].append('K_ESCAPE')
    config.keymap['game_menu'].remove('K_ESCAPE')
Don't edit the keymap file. Add the above code somewhere within your project, like options.rpy.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
bloodyhair
Regular
Posts: 61
Joined: Tue Aug 11, 2015 7:20 am
Deviantart: Takada-Wang
Contact:

Re: How to open renpy/common/00keymap.rpy?

#3 Post by bloodyhair »

Yay it's worked! Thank you very much

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]