Keyboard shortcuts in mods?

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

Keyboard shortcuts in mods?

by spillz » Wed Feb 19, 2014 16:11

Is is possible to define keyboard shortcuts that perform an action in a mod?

The main thing I am thinking about is making some tweaks to WorldEdit to make it a bit less cumbersome to work with regions.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Wed Feb 19, 2014 16:12

No, I already suggested this, but it lags on multiplayer servers...
Last edited by webdesigner97 on Wed Feb 19, 2014 16:12, edited 1 time in total.
 

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

by spillz » Wed Feb 19, 2014 16:16

webdesigner97 wrote:No, I already suggested this, but it lags on multiplayer servers...


WorldEdit lags or keyboard shortcuts in general cause lag? Not sure why the latter would be true but will take your word for it.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Wed Feb 19, 2014 16:37

spillz wrote:
webdesigner97 wrote:No, I already suggested this, but it lags on multiplayer servers...


WorldEdit lags or keyboard shortcuts in general cause lag? Not sure why the latter would be true but will take your word for it.

Adding lua-handled keyboard bindings. The information about the key being pressed needs to be sent to the server, the function to be called will be executed and the result sent back.
 

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

by spillz » Wed Feb 19, 2014 16:50

webdesigner97 wrote:
spillz wrote:
webdesigner97 wrote:No, I already suggested this, but it lags on multiplayer servers...


WorldEdit lags or keyboard shortcuts in general cause lag? Not sure why the latter would be true but will take your word for it.

Adding lua-handled keyboard bindings. The information about the key being pressed needs to be sent to the server, the function to be called will be executed and the result sent back.


But that isn't any different from clicking a menu button, right? (which you can do now in mod). I guess it would be harder to spam the server with menu clicks than with key presses, but maybe there's a simple work around for that (ignore repeated key press until the previous key press is acknowledged by server.)
Last edited by spillz on Wed Feb 19, 2014 17:01, edited 1 time in total.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Wed Feb 19, 2014 17:04

spillz wrote:
webdesigner97 wrote:
spillz wrote:
WorldEdit lags or keyboard shortcuts in general cause lag? Not sure why the latter would be true but will take your word for it.

Adding lua-handled keyboard bindings. The information about the key being pressed needs to be sent to the server, the function to be called will be executed and the result sent back.


But that isn't any different from clicking a menu button, right? (which you can do now in mod). I guess it would be harder to spam the server with menu clicks than with key presses, but maybe there's a simple work around for that (ignore repeated key press until the previous key press is acknowledged by server.)

Maybe. The devs would need to think about this... I would really appreciate custom keys for mods!

Edit: Here is the topic where I suggested this. https://forum.minetest.net/viewtopic.php?id=7238
Last edited by webdesigner97 on Wed Feb 19, 2014 17:06, edited 1 time in total.
 

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

by spillz » Thu Feb 20, 2014 23:32

Thinking me more about this -- an easy way to allow keyboard shortcuts is to make them aliases for chat commands. Then nothing needs to change on the server side, just need a simple system for converting keypresses (including perhaps Ctrl-/Alt- combinations of keypresses) into chat commands.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 7 guests

cron