Hotkeys for Movements / Mouse Interaction

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderators: Forum Moderators, Developers

Forum rules
Before posting a new idea, you must read the following:
Post Reply
bernd
Posts: 3
Joined: January 17th, 2018, 7:20 pm

Hotkeys for Movements / Mouse Interaction

Post by bernd » January 17th, 2018, 8:05 pm

Hi there,

just started to play Wesnoth a couple of days ago and was really surprised to having to use the mouse all the time. Would have expected for a game probably developed by a big community of techs to have shortcuts for everything.
Please dont misunderstand me, the game seems great and you can see the uncountable hours of work involved.
It simply would be a lot more comfortable to be able to play it with a wireless keyboard sitting on my couch :D
Googling around I found quite a lot old ideas / requests in this direction (e.g. this or that), but it seems none led to success.

So here is my dream:
Customizable hotkeys for moving the "focused" (clicked) hex on the map and for simulating left-click and right-click (e.g. "primary action" and "secondary action").

As these are by far the most common interactions it would increase the usability vastly.
If moving in 6 directions would be supported defaults could be QWEASD for example.
But using the arrow keys or others for 4 direction movement should not be a problem either, simply by alternating north/south at sideward movement.

What do you think?

bernd
Posts: 3
Joined: January 17th, 2018, 7:20 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by bernd » January 25th, 2018, 5:59 pm

0 % "Nay" means 100 % "Yay", doesn't it? Then let's implement! ;)

User avatar
octalot
Code Contributor
Posts: 203
Joined: July 17th, 2010, 7:40 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by octalot » January 25th, 2018, 7:15 pm

There's partial joypad support already in the engine, with the concept of the "focused" hex already implemented. But AFAICS, the joypad buttons aren't supported yet, so it still needs mouse-clicks to play the game.

The preferences to enable joystick support are hidden, you have to remove the

Code: Select all

#ifdef __UNUSED__
in data/advanced_preferences.cfg.

Edit: viewtopic.php?f=6&t=34205 joystick users should bind hotkeys to "left mouse click" and "right mouse click", but that seems to have bitrotted (those strings are now only found in the translation files, not the .cpp files themselves). Trying to bind joypad buttons to hotkeys also seems to be non-functional in trunk, the 'add hotkey' dialog responds to the button press, but the button doesn't trigger the function afterwards.

User avatar
SFault
Posts: 479
Joined: November 10th, 2009, 2:21 pm
Location: Esbo, Finland

Re: Hotkeys for Movements / Mouse Interaction

Post by SFault » February 24th, 2018, 5:59 am

Why not use wireless mouse also?

I think the main problem with the idea is that keyboard work nicely in 4 or 8 directions but the game uses 6 direction grid. If you can come up with an idea that allows selecting hexes in easy way then somebody might implement it. But atm it would need also a great design effort first.
segmentation fault
EBfW, GtR, Art, Old art

bernd
Posts: 3
Joined: January 17th, 2018, 7:20 pm

Re: Hotkeys for Movements / Mouse Interaction

Post by bernd » February 25th, 2018, 12:02 pm

@octalot
Thanks for the info. But if I understand you correctly, it does not work atm? Could not test it yet

@SFault
Wireless mouse is quite less handy sitting on a sofa than pure keyboard :)
About the idea for 6 directions, what about the ones in the first post:
bernd wrote:
January 17th, 2018, 8:05 pm
If moving in 6 directions would be supported defaults could be QWEASD for example.
But using the arrow keys or others for 4 direction movement should not be a problem either, simply by alternating north/south at sideward movement.
using the four arrow keys sideways movement could look s.th. like this:
Image
(just imagine the image turned by 90°)
Last edited by bernd on February 26th, 2018, 7:52 pm, edited 1 time in total.

User avatar
beetlenaut
Developer
Posts: 2217
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Hotkeys for Movements / Mouse Interaction

Post by beetlenaut » February 26th, 2018, 6:25 am

@bernd: Your hex grid is rotated 90 degrees.
SFault wrote:
February 24th, 2018, 5:59 am
keyboard work nicely in 4 or 8 directions but the game uses 6 direction grid.
But keys are arranged in little hexes, not rectangles. If you put your middle finger on O , then the letters around it, Z, A, W, E, D, and X map very nicely to a hex grid. (For BfW, you have to turn your wrist so that E and Z are up and down.) You could also use the 10-key pad. 8 and 2 go up and down, and the corners go diagonally right and left. Bernd suggested QWEASD too, which is also six. Our six-directional grid is not the problem. The string freeze we are under might be though.
Campaigns: Dead Water
The Founding of Borstep
Secrets of the Ancients

User avatar
Celtic_Minstrel
Developer
Posts: 1225
Joined: August 3rd, 2012, 11:26 pm
Contact:

Re: Hotkeys for Movements / Mouse Interaction

Post by Celtic_Minstrel » February 27th, 2018, 1:41 am

I think it's probably possible already to remap mouse clicks to a keypress in the hotkey preferences. Moving the focused hex, on the other hand... I don't know of any way to do that right now.
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

Post Reply