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
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.

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

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.

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.

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:(just imagine the image turned by 90°)

Last edited by bernd on February 26th, 2018, 7:52 pm, edited 1 time in total.

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,
and WML Guide

Moving the cursor itself with the keyboard is still not a great option though; it's better if the game can implement its own keyboard navigation. For example, with mouse keys you'd need to move the cursor by pressing and holding keys, then press some other key to simulate a click, all just to move the selection to the next adjacent hex. If moving the selection is implemented directly into the engine, all that would be reduced to a single keypress.

Yes, an application-level implementation has advantages over an OS-level one. On the other hand, the OS-level implementation has the advantage that it's available right now, whereas an application-level implementation would have to be designed, implemented, and released. (It wouldn't be hard to implement, but somebody would have to do it.)

To be honest, I think mouse keys and keyboard navigation are both inferior to a real mouse/touchpad. Just imagine capturing villages without using the mouse; doing that with only 4 or 6 directional commands will be a pain, I think. Also, without a mouse it's not possible to view a unit's resistances as modified by the unit's traits and objects, or to open the damage calculations dialog.

Also, without a mouse it's not possible to view a unit's resistances as modified by the unit's traits and objects, or to open the damage calculations dialog.

Well, yeah, navigation is far from the only think inaccessible without a mouse... all those tooltips! But that's no reason not to try to improve the situation. I don't think navigating the hex grid with the keyboard would be all that hard, honestly, though it's probably at least a little inferior to an actual mouse.

Disclaimer: This is a hypothesis on how it could be made as a feature. I personally think keyboard gameplay would be hard without some memorization of features and it needs other supporting mechanisms to work seamlessly. I use a mouse but I can’t say for certain if I’ll play using a keyboard if this was made into a feature.

To make keyboards work for Wesnoth, I assume it would need 3 core features and 2 of them might be new.

1. Selecting units on the map by the use of keyboard
2. Easy movement for selecting units
3. Toggle of movement and attack functionality

1. Selecting units on the map by the use of keyboard

Navigation is achieved by the use of arrow keys.

Selecting units would need a pointer of hex base selection which consists of seven tiles that depends on tile placement.

Seven tile selection is necessary for less accurate aim when using the keyboard.

Tile selection would need a "moving island" that is mainly controlled by arrow keys.

The hotkeys used for selecting inside a "moving island" would consist of top hex tile selection, middle hex tile selection, and bottom hex tile selection.

Hotkeys are necessary for unit selection inside the "moving island", it will imitate mouse clicks.

"Moving island" is a moving platform, that uses 7 tiles and can emulate as a mouse or a pointer, using a keyboard. Basically it’s a tool use for aiming units without the need of keyboard.

The hotkeys use QWE (top), S (middle), and AXD (bottom). This could be changed in the hotkey menu if customising was an option.

2. Easy movement for selecting units

There are two main types of movement, map scrolling and moving platform placement inside the map(acts like a mouse pointer without a mouse).

Scrolling of maps is dependent on zoom size and how well you can aim any units assuming speed is calibrated to aim.

Moving platform by default will be placed on the center of your game screen.

Moving platform can be moved by arrow keys, but the aim or it’s pointer, will always remains at the center, like how sniper scopes or telescopes work in real life.

Platform’s center position can be changed by the use of a toggle (ctrl/shift/alt or any hotkey) and arrow keys. By default, using a toggle and arrow keys will only move moving platform’s position and not the whole map.

The reason for this is to aim dead zones, a center position couldn’t target, especially on small maps.

3. Toggle of movement and attack functionality

Every unit has different move speed, selecting and moving your unit would be hard without modifying it to respond to keyboard.

Selecting a unit will modify the behaviour of arrow keys to reach only as far as the unit can go, for the current selected unit. If used with next unit(hotkey n), this would probably make placement of units faster than planned.

Selecting an attack inside attack enemy is possible with the use of arrow keys and enter key.

Toggle could do various features with the use of hotkeys, basically optional.
It could emulate right click, and provide tooltip information once the corresponding hotkey has been pressed.

I think there could be some glitches that could break functionality if this was implemented. As an example, arrow key movement might not respond to toggle and other conditions to change based on action.

Good luck to everyone! I’ll try to answer any questions relating to this topic, if I have time to spare.