More Aux keys for games and mods

Post Reply
TX Miner
Member
Posts: 22
Joined: Thu Feb 09, 2023 22:37
In-game: TX_Miner

More Aux keys for games and mods

by TX Miner » Post

Recently I have been working on a new game for Minetest, while I was working on it I thought that it would be really helpful if the Minetest Engine had more Aux keys (and mouse buttons) that could be registered to by a game or mod, so that the engine could call a function in the mod when a key is pressed. Some thing like this, maybe:

Code: Select all

minetest.register_aux_key({
	auxnum = [Some Aux key number (keyboard and mouse)],
	action = function(pos, player, [etc.])
	        [Do job assigned to this key]
	end,
})
There are many uses for this, such as a game may want the use of the left hand, so on a 5 button mouse the side buttons could control the left hand, or there could be a key, like sneak, that lets the player crawl without messing with other keys.

User avatar
Blockhead
Member
Posts: 1624
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: More Aux keys for games and mods

by Blockhead » Post

Everyone wants better controls, but nobody has made a PR yet apparently. Here's the most recent GitHub discussion: #12488.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

TX Miner
Member
Posts: 22
Joined: Thu Feb 09, 2023 22:37
In-game: TX_Miner

Re: More Aux keys for games and mods

by TX Miner » Post

Thank you.

TX Miner
Member
Posts: 22
Joined: Thu Feb 09, 2023 22:37
In-game: TX_Miner

Re: More Aux keys for games and mods

by TX Miner » Post

So, please correct if I'm wrong, there are people that want this feature, but no one has had the time or has had higher priorities, and that is why it doesn't exist yet. If so, I may look into working on it, because it I think this would be really nice to have.

User avatar
Blockhead
Member
Posts: 1624
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: More Aux keys for games and mods

by Blockhead » Post

TX Miner wrote:
Fri Mar 17, 2023 12:20
So, please correct if I'm wrong, there are people that want this feature, but no one has had the time or has had higher priorities, and that is why it doesn't exist yet.
That is correct as far as I understand and after having searched for related issues and PRs for a bit.
TX Miner wrote:
Fri Mar 17, 2023 12:20
If so, I may look into working on it, because it I think this would be really nice to have.
Please do go ahead. That would benefit a lot of people. It is relatively easy for PC but you need to bring forward a design that won't leave mobile players behind either. You should be able to get help familiarising yourself on the "Partly official engine development" forum section. You'll need to understand what input libraries we use and where in the stack - remember that Minetest is split into the core C++ application and the forked irrlichtMt library under that.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

TX Miner
Member
Posts: 22
Joined: Thu Feb 09, 2023 22:37
In-game: TX_Miner

Re: More Aux keys for games and mods

by TX Miner » Post

Thank you.

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: More Aux keys for games and mods

by sorcerykid » Post

The need for more input controls has been discussed many times. I believe the first forum topic to raise this issue was here:

Re: Adding custom keystrokes through LUA

As I recall, the main holdup is the fact there isn't an API for capturing key and mouse events. A number of solutions have been suggested, but nothing that has ever received unanimous agreement, particularly amongst core devs.

But I agree that right now games are extremely limited at getting any kind of user-input, beyond resorting to formspecs and chat commands. Most games simply poll either the Shift or "E" keys. But having a proper callback mechanism with support for multiple auxiliary keys is definitely the better approach, in my view..

User avatar
Kilarin
Member
Posts: 894
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

Re: More Aux keys for games and mods

by Kilarin » Post

Let me add my voice to the list. This would make many mods much more useful.

User avatar
apercy
Member
Posts: 640
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: More Aux keys for games and mods

by apercy » Post

I could associate more keys for airplane control

User avatar
Unacceptium_core
Member
Posts: 153
Joined: Sun Mar 19, 2023 19:47
GitHub: Unacceptium
IRC: same as ingame names
In-game: unacceptium or unbihexium or ununennium or unbiquadium
Location: EU, hungary, Deák Ferenc Tér (Budapest)
Contact:

Re: More Aux keys for games and mods

by Unacceptium_core » Post

i make a screenshot edit how i imagine the more aux buttons on mobile

the buttons will open like fly fast and other buttons, when clicken on AUX or PRG.
🇭🇺-i play on android! Metrotest map

TX Miner
Member
Posts: 22
Joined: Thu Feb 09, 2023 22:37
In-game: TX_Miner

Re: More Aux keys for games and mods

by TX Miner » Post

Kilarin wrote:
Wed Apr 19, 2023 23:04
Let me add my voice to the list. This would make many mods much more useful.
I agree.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests