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

Changing key binding

#1 Post by kostek00 »

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
Lemma-Class Veteran
Posts: 2400
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Changing key binding

#2 Post by Ocelot »

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 > >

User avatar
kostek00
Regular
Posts: 131
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

Re: Changing key binding

#3 Post by kostek00 »

Removing all unnecessary will be such a pain.

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

Re: Changing key binding

#4 Post by Ocelot »

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 > >

User avatar
kostek00
Regular
Posts: 131
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

Re: Changing key binding

#5 Post by kostek00 »

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
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Changing key binding

#6 Post by Remix »

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.
Frameworks & Scriptlets:

User avatar
kostek00
Regular
Posts: 131
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

Re: Changing key binding

#7 Post by kostek00 »

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: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Changing key binding

#8 Post by kivik »

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.

User avatar
Bertran
Regular
Posts: 33
Joined: Tue May 02, 2017 12:58 pm
Projects: Run, Kitty!
Deviantart: bertranway
Skype: bertranway
Contact:

Re: Changing key binding

#9 Post by Bertran »

Well, you know, the game is crashing when players press "S" key (screenshot) and showing something strange when pressing "A" key. I really want to turn it off, what the hell

Post Reply

Who is online

Users browsing this forum: Bing [Bot]