Keyboard shortcuts for chat commands

spillz
Member
 
Posts: 138
Joined: Thu Feb 13, 2014 05:11

Keyboard shortcuts for chat commands

by spillz » Tue Mar 18, 2014 02:55

Here's a bit of fun...

Apply the attached patch

and try out some keyboard shortcuts in your minetest.conf (the last 3 are for worldedit)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
#set time to day
keymap_alias_daytime = KEY_MULTIPLY
keymap_command_daytime = time 06000
#set worldedit pos1
keymap_alias_pos1 = KEY_HOME
keymap_command_pos1 = /pos1
#set worldedit pos2
keymap_alias_pos2 = KEY_END
keymap_command_pos2 = /pos2
#set all nodes to air between pos 1 and pos2
keymap_alias_airnode = KEY_DELETE
keymap_command_airnode = /set air


Add your own and see what you can come up with... (I've asked Uberi to add a bunch of commands to world edit -- e.g. I would love to use arrow keys + pg up, pg dn to move markers around)

Here's the TODO list:
1. Allow modifiers (e.g. checking for CTRL, SHIFT, ALT etc)
2. Add user interface
3. Create Lua API hooks so that mods can register default keys for certain actions, but allow user to override them.

Happy to take suggestions. Devs, please let me know if this is the right approach.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

Last edited by spillz on Tue Mar 18, 2014 03:06, edited 1 time in total.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Tue Mar 18, 2014 06:49

3. Create Lua API hooks so that mods can register default keys for certain actions, but allow user to override them.


This one was the subject of a major disturbance once :)
Should be get_player_controls extended by 3-4 more auxiliary keys?
Anyway, that's probably a protocol bump...
 

spillz
Member
 
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Tue Mar 18, 2014 19:49

For something like worldedit, 3-4 keys is limiting. My approach has the advantages of being very simple to implement, because it uses the existing chat command infrastructure, robust, because it uses the existing chat command infrastructure, and flexible, because ...

What was the disturbance?
 

spillz
Member
 
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Wed Apr 09, 2014 03:17

New "keyboard shortcuts for chat commands" patch is attached. This update adds GUI and supports keyboard modifiers (CTRL/SHIFT). Still some quirks to be worked out.

GUI Screenshot (the red box is to show you what's new)

Image
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

Last edited by spillz on Wed Apr 09, 2014 03:18, edited 1 time in total.
 

bajanhgk
Member
 
Posts: 75
Joined: Sun Apr 06, 2014 16:31
In-game: bajanhgk

by bajanhgk » Mon Apr 14, 2014 16:43

THAT'S AWESOME but ammmmm where to put the keymap 2 and please don't tell me i have to go to lua and delete some codes cause i don't have anything to open lua
Just a Loner In the Winds which Blow Endlessly towards Death
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

by JPRuehmann » Mon Apr 14, 2014 20:27

no Word? lol
JPR
 

spillz
Member
 
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Mon Apr 14, 2014 21:22

This is now a pull request on github (#1217).

If accepted, you will be able to use the keyboard settings gui to set your commands. No lua or minetest.conf editing required. But until it is accepted you will have to apply the patch and compile mt yourself to use it.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 2 guests