Are you able to use custom keybinds in your mod?

User avatar
whitephoenix
Member
 
Posts: 18
Joined: Sun Jun 26, 2016 22:43
GitHub: whitephoenix0
IRC: whitephoenix
In-game: whitephoenix

Are you able to use custom keybinds in your mod?

by whitephoenix » Fri Jul 01, 2016 16:50

I've seen a lot of github issues and forum topics about keybinds, yet it doesn't seem they actually got added to minetest. Is this a work on progress or what? I'm making a minimal sprinting mod and want to use get_player_control() to see if they player is holding CTRL.

So is this getting added or is already possible somehow?

EDIT: Additional question: are aux1 and sneak the same thing?
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Are you able to use custom keybinds in your mod?

by kaeza » Sat Jul 02, 2016 01:38

As you say, the most you can do is check for "game keys" (or "virtual keys") using `get_player_control`, but you don't have access to "hardware keys". Developers don't usually check out the forums much (sadly), so it's better to comment on the relevant Github issue(s) to give your support. Of course, if you are able to code those features feel free to provide patches.

Aux1 (a.k.a. "Use"/"special1") and Sneak are different keys: Aux1 (default 'E') is used for running when you have `fast` privilege, while Sneak (default 'Shift') is used for sneaking.

Note that either Use or Sneak may be used to climb down ladders, depending on the value of the `aux1_descends` setting in `minetest.conf` (true means use "Use" key to descend, false means use "Sneak" key to descend).
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 10 guests

cron