User-configurable keys?

Hi all,

Are there any demos for user-configurable keys in a game? I could’ve sworn I saw one, but I can’t find it now.

I reckon I need to assign a key to a variable of some sort, and then check the value of that variable instead of the key directly, I’m just not sure quite how to do that.

Thanks in advance.


I think I may have seen something at one point, but I don’t know where.

You can try something with a config file and the GameKeys module.

Could you explain yourself a little better?

If you’re talking about finding out whether a given key is pressed or not, just use a keyboard sensor.

You need Python in any Case! Look here. The Menue Animations seems to work no more right in 2.48a, but the Scripts are still working.


Aha! Thanks Doc Holiday and Moguri! It was that pdf I was looking for, thought it was a blend.

J09 - I’m talking about what ends up as the “controls” screen under most options menus in games. So that a user can define different keys to play the game with. For a while, I liked using shift, ctrl, z, x, instead of wsad (bizarre setup, I know :slight_smile: ).