Changing key binding

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
kostek00
Regular
Posts: 72
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

Changing key binding

#1 Post by kostek00 » Thu May 24, 2018 3:09 pm

I'm wondering if there is a way to disable all current keyboard shortcuts with one command or something similar or do I have to turn them off one by one? I want to make my own shortcuts.

User avatar
Ocelot
Miko-Class Veteran
Posts: 849
Joined: Tue Aug 23, 2016 10:35 am
Skype: miinipaa
Contact:

Re: Changing key binding

#2 Post by Ocelot » Thu May 24, 2018 3:48 pm

There is no command to disable all current bindings on the fly, but you can edit default keymap: https://www.renpy.org/doc/html/keymap.html

Make sure to read note in the beginning.
< < insert Rick Cook quote here > >

kostek00
Regular
Posts: 72
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

Re: Changing key binding

#3 Post by kostek00 » Thu May 24, 2018 4:10 pm

Removing all unnecessary will be such a pain.

User avatar
Ocelot
Miko-Class Veteran
Posts: 849
Joined: Tue Aug 23, 2016 10:35 am
Skype: miinipaa
Contact:

Re: Changing key binding

#4 Post by Ocelot » Thu May 24, 2018 4:26 pm

Wait, you said you wanted to remove everything in OP post, it is a single line. Not to mention that you can simply overwrite dictionary with "correct" one (which technically is a single statement too)
< < insert Rick Cook quote here > >

kostek00
Regular
Posts: 72
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

Re: Changing key binding

#5 Post by kostek00 » Fri May 25, 2018 11:18 am

Yes, I know I can overwrite current ones but this will actually take some time. If on the other hand I could just remove them all with one command it would be much easier for me to add those that will be of any use in game.

User avatar
Remix
Miko-Class Veteran
Posts: 787
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I cannot draw very well)
Projects: An un-named 3d anime based trainer game
Contact:

Re: Changing key binding

#6 Post by Remix » Fri May 25, 2018 11:52 am

So,

config.keymap = {} # empty dictionary, no values, no keys, no anything, just empty

is hard work?

On an aside: You will lose players from your player-base if you veer too far from Ren'Py's standard key settings. Many already know the shortcut keys and will take having them removed or altered as cause to quit.

kostek00
Regular
Posts: 72
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

Re: Changing key binding

#7 Post by kostek00 » Fri May 25, 2018 12:45 pm

Oh, so this is how you clear them all.

With hard work I ment about removing all of them individually. Also there will be help menu in game with shortcuts.

kivik
Miko-Class Veteran
Posts: 719
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Changing key binding

#8 Post by kivik » Fri May 25, 2018 7:20 pm

Strongly agree with Remix's point about not changing standard key settings.

The fact that you're removing all the keybindings means people won't even be able to access the help menu as normal with right click / esc, further reducing the likelihood of people accessing your help menu (which is not very often). You're actively putting roadblocks on your own game to drop players - it's anti-player design which is as far from what you want to do as possible as a game / software developer.

Like it or not, you need to put player first if you want to be a good game maker.

Post Reply

Who is online

Users browsing this forum: No registered users