Difference between revisions of "HotKeysSystem"

From The Battle for Wesnoth Wiki
(Wesnoth HotKeysSystem: anti-locale comment)
m (Defaults: Minor reformat. Changed text describing panning feature (it centers nothing))
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Wesnoth [[HotKeysSystem]] ==
+
The '''hotkeys system''' for Wesnoth allows quick access to several common commands.
 +
Most of the hotkeys can be reassigned (or unassigned) from within the game by going to the Preferences window and hitting the Hotkeys button.
  
Note that hotkeys can be edited by going to Preferences -> Hotkeys from within the game.
+
== Defaults ==
  
* Existent hotkeys
+
The default hotkeys are listed below.
 +
(On a Mac, "ctrl-" is replaced by "cmd-". Other special cases for a Mac are as listed.)
  
 +
===Program controls===
 
  [key]        [effect]
 
  [key]        [effect]
  Arrow keys:   Scroll
+
  Escape:       Exit game / exit menu
  Left click:   Select unit/move unit
+
ctrl-o:      Load game (load map in the editor)
  Right clickMain menu, cancel action
+
  ctrl-p/cmd-,: Preferences
  Middle click: Center on pointer location
+
ctrl-q/cmd-w: Quit game (quit program from title screen)
  Escape:      Exit game,exit menu
+
  ctrl-s:       Save game
  z:            Zoom in
+
 
  x:           Zoom out
+
===Title screen===
  c:            Reset zoom to default
+
[key]        [effect]
 +
→            Next Tip of the Day
 +
  ←            Previous Tip of the Day
 +
 
 +
===Unit controls===
 +
[key]        [effect]
 +
n:            Next unit that has movement left
 +
  shift-n:     Previous unit that has movement left
 +
  ctrl-n:      Rename unit
 +
  r:            Redo move
 +
alt-r:        Recall unit
 +
ctrl-r:      Recruit unit
 +
  ctrl-alt-r:   Repeat last recruit
 +
  t:            Continue move (that was interrupted by seeing a unit)
 
  u:            Undo last move (only deterministic moves can be undone)
 
  u:            Undo last move (only deterministic moves can be undone)
  r:            Redo move
+
  space:        End unit turn and cycle to next unit that has movement left
  n:            Cycle through units that have movement left
+
shift-space:  Hold position (permanent end unit turn until canceled)
 +
ctrl-space:  End player turn ''(alt-space on Mac)''
 +
 +
Left click:  Select unit / move unit / attack
 +
Right click:  Context menu / cancel selection
 +
 
 +
===Display and sounds===
 +
[key]        [effect]
 +
+:            Zoom in
 +
-:            Zoom out
 +
  0:            Reset zoom to default
 
  1-7:          Show how far currently selected unit can move in that many turns
 
  1-7:          Show how far currently selected unit can move in that many turns
  space:       End unit turn and cycle to next unit that has movement left
+
  ctrl-a:       Toggle accelerated animation mode
  l:           Move to leader unit
+
  ctrl-e:       Toggle ellipses (displayed under units)
 
  ctrl-f:      Toggle fullscreen/windowed mode
 
  ctrl-f:      Toggle fullscreen/windowed mode
  ctrl-r:      Recruit unit
+
  ctrl-g:      Toggle map grid
  ctrl-alt-rRepeat last recruit
+
l:            Center on leader unit
  alt-r:       Recall unit
+
  ctrl-alt-m:  Mute sounds
  ctrl-a:      Toggle accelerated game mode
+
 +
Arrow keysScroll
 +
Middle click: Pan the screen while dragging the cursor
 +
 
 +
===Fog/shroud===
 +
[key]        [effect]
 +
  shift-s:      Update shroud now
 +
 
 +
===Information sources===
 +
[key]        [effect]
 +
F1:          Help
 +
F10:          Show helptip
 +
/:           Find label or unit
 +
  ctrl-b:      Show best possible enemy moves
 
  d:            Describe current unit
 
  d:            Describe current unit
  ctrl-d:      View defensive ratings of current unit against attacks
+
  ctrl-j:      Show scenario objectives
  ctrl-t:      View how the current unit behaves in various terrain
+
s:            Statistics window
  ctrl-s:       Save game
+
alt-s:        Status table
 +
alt-u:        Unit list
 +
ctrl-v:      Show potential enemy moves
 +
 
 +
===Labels===
 +
[key]        [effect]
 +
ctrl-c:      Clear labels
 +
alt-l:        Set label
 +
ctrl-l:      Set team label
 +
 
 +
===Planning mode===
 +
[key]        [effect]
 +
p:            Toggle planning mode
 +
 +
h:            Delete action
 +
i:            Suppose dead
 +
y:            Execute action
 +
ctrl-y:      Execute all actions
 +
 +
page down:    Move action later
 +
page up:      Move action earlier
 +
 
 +
===Multiplayer (chat)===
 +
[key]        [effect]
 +
alt-c:        View chat log
 +
m:            Speak
 +
alt-m:        Speak to all
 +
ctrl-m:      Speak to ally
 +
  ctrl-x:      Clear messages
 +
 
 +
===Debugging===
 +
[key]        [effect]
 +
F5:          Reload WML (from the title screen)
 +
::            Enter user command
 +
shift-c:      Create unit
 +
  f:            Run formula
 +
shift-u:     Change side (of a unit or village)
 +
 
 +
In addition, there are some functions that can be assigned hotkeys, but that do not have hotkeys by default. These can be views within the game by going to the Preferences window and hitting the Hotkeys button.
 +
 
 +
== Future plans ==
  
 
* Future hotkeys: ''elaborating a "reasonable default"''
 
* Future hotkeys: ''elaborating a "reasonable default"''
  
 
  [key]      [effect]                [comments]
 
  [key]      [effect]                [comments]
h          hotkeys configurator
 
u          undo                    undo a legally undoable move
 
r          redo                    redo a legally redoable move
 
 
  # r        recuit unit #            # is a number -> position in the list
 
  # r        recuit unit #            # is a number -> position in the list
s          mute|sound
 
e          end turn
 
 
  prtsc      screenshot
 
  prtsc      screenshot
 
  home        mark unit                | a unique block on the keyboard
 
  home        mark unit                | a unique block on the keyboard
Line 44: Line 118:
 
  pagup      next marked unit        | long term multiplayer games
 
  pagup      next marked unit        | long term multiplayer games
 
  pagdw      prev marked unit        |
 
  pagdw      prev marked unit        |
n          next unmoved unit                    | isn't it better is the "n" key cycle all
 
shift-n    next partially moved or unmoved unit  | units that have the possibility to move?
 
ctrl-n      next unit of any type                | (unmoved + partially) I feel I would use
 
                                                  | more the "shft-n" than "n"
 
                                                  |  n      -> next partially moved or unmoved unit
 
                                                  |  shft-n -> next unmoved unit
 
                                                  |  ctrl-n -> next unit of any type
 
  
 
* Keyboard (Qwerty)
 
* Keyboard (Qwerty)
Line 96: Line 163:
 
Someone doing a translation can set hotkeys for that translation,
 
Someone doing a translation can set hotkeys for that translation,
 
to make more logical sense for people in that locale. -- David</em>
 
to make more logical sense for people in that locale. -- David</em>
: <em>This is a limited solution.  Locale is country/language specific information which means that choices like using a dvorak keyboard aren't properly supported.</em>
+
: <em>This is a non-solution.  Locale is country/language specific information (in other wods: language and keyboard layout are orthogonal) which means that choices like using a dvorak keyboard aren't properly supported (unless the game is translated into both German and German/Dvorak et cetera).</em>
  
 
== Other keyboard shorcuts ==
 
== Other keyboard shorcuts ==
 +
 +
'''(Possibly outdated section)'''
  
 
There also exist keyboard shortcuts which currently cannot be
 
There also exist keyboard shortcuts which currently cannot be
Line 125: Line 194:
 
Return/Enter usually accepts the current action (often OK).
 
Return/Enter usually accepts the current action (often OK).
  
== See Also ==
+
[[Category:Playing Wesnoth]]
 
 
* [[WesnothToDo]]
 

Latest revision as of 07:03, 19 January 2015

The hotkeys system for Wesnoth allows quick access to several common commands. Most of the hotkeys can be reassigned (or unassigned) from within the game by going to the Preferences window and hitting the Hotkeys button.

Defaults

The default hotkeys are listed below. (On a Mac, "ctrl-" is replaced by "cmd-". Other special cases for a Mac are as listed.)

Program controls

[key]         [effect]
Escape:       Exit game / exit menu
ctrl-o:       Load game (load map in the editor)
ctrl-p/cmd-,: Preferences
ctrl-q/cmd-w: Quit game (quit program from title screen)
ctrl-s:       Save game

Title screen

[key]         [effect]
→             Next Tip of the Day
←             Previous Tip of the Day

Unit controls

[key]         [effect]
n:            Next unit that has movement left
shift-n:      Previous unit that has movement left
ctrl-n:       Rename unit
r:            Redo move
alt-r:        Recall unit
ctrl-r:       Recruit unit
ctrl-alt-r:   Repeat last recruit
t:            Continue move (that was interrupted by seeing a unit)
u:            Undo last move (only deterministic moves can be undone)
space:        End unit turn and cycle to next unit that has movement left
shift-space:  Hold position (permanent end unit turn until canceled)
ctrl-space:   End player turn (alt-space on Mac)

Left click:   Select unit / move unit / attack
Right click:  Context menu / cancel selection

Display and sounds

[key]         [effect]
+:            Zoom in
-:            Zoom out
0:            Reset zoom to default
1-7:          Show how far currently selected unit can move in that many turns
ctrl-a:       Toggle accelerated animation mode
ctrl-e:       Toggle ellipses (displayed under units)
ctrl-f:       Toggle fullscreen/windowed mode
ctrl-g:       Toggle map grid
l:            Center on leader unit
ctrl-alt-m:   Mute sounds

Arrow keys:   Scroll
Middle click: Pan the screen while dragging the cursor

Fog/shroud

[key]         [effect]
shift-s:      Update shroud now

Information sources

[key]         [effect]
F1:           Help
F10:          Show helptip
/:            Find label or unit
ctrl-b:       Show best possible enemy moves
d:            Describe current unit
ctrl-j:       Show scenario objectives
s:            Statistics window
alt-s:        Status table
alt-u:        Unit list
ctrl-v:       Show potential enemy moves

Labels

[key]         [effect]
ctrl-c:       Clear labels
alt-l:        Set label
ctrl-l:       Set team label

Planning mode

[key]         [effect]
p:            Toggle planning mode

h:            Delete action
i:            Suppose dead
y:            Execute action
ctrl-y:       Execute all actions

page down:    Move action later
page up:      Move action earlier

Multiplayer (chat)

[key]         [effect]
alt-c:        View chat log
m:            Speak
alt-m:        Speak to all
ctrl-m:       Speak to ally
ctrl-x:       Clear messages

Debugging

[key]         [effect]
F5:           Reload WML (from the title screen)
::            Enter user command
shift-c:      Create unit
f:            Run formula
shift-u:      Change side (of a unit or village)

In addition, there are some functions that can be assigned hotkeys, but that do not have hotkeys by default. These can be views within the game by going to the Preferences window and hitting the Hotkeys button.

Future plans

  • Future hotkeys: elaborating a "reasonable default"
[key]       [effect]                 [comments]
# r         recuit unit #            # is a number -> position in the list
prtsc       screenshot
home        mark unit                | a unique block on the keyboard
end         unmark unit              | marks can be very useful in
pagup       next marked unit         | long term multiplayer games
pagdw       prev marked unit         |
  • Keyboard (Qwerty)
q w e r t y u i o p
 a s d f g h j k l
  z x c v b n m
  • Keyboard (German)
q w e r t z u i o p
 a s d f g h j k l
  y x c v b n m
  • Keyboard (Dvorak)
      p y f g c r l
 a o e u i d h t n s
q j k x b m w v
  • Keyboard (French)
a z e r t y u i o p
 q s d f g h j k l m
  w x c v b n


As you see, x and y are swapped on the German keyboard. Therefore I hate games that move units with w/a/s/z keys, assuming english keyboards. Fortunately Wesnoth is better.

That is why keyboard shortcuts are settable on a per-translation basis. Someone doing a translation can set hotkeys for that translation, to make more logical sense for people in that locale. -- David

this is just an idea for the default.. feel free to edit and comment!

Note: non-qwerty keyboards usually don't have zxc toghether, so while z may be logical for zooming, x and c aren't. I guess z/Z for zooming in and out would be fine, but I prefer +/- unless a more useful purpose for this keys appears. = could snap back to 100% zoom.

(repeated from above) That is why keyboard shortcuts are settable on a per-translation basis. Someone doing a translation can set hotkeys for that translation, to make more logical sense for people in that locale. -- David

This is a non-solution. Locale is country/language specific information (in other wods: language and keyboard layout are orthogonal) which means that choices like using a dvorak keyboard aren't properly supported (unless the game is translated into both German and German/Dvorak et cetera).

Other keyboard shorcuts

(Possibly outdated section)

There also exist keyboard shortcuts which currently cannot be changed using Preferences.

In a textbox:

Home
ctrl-a      jump to beginning of text
End
ctrl-e      jump to end of text
ctrl-u      erase text
Left        move cursor one character back
Right       move cursor one character forward

In a menu:

Home        jump to first menu item
End         jump to last menu item
PageUp      scroll a page back
PageDown    scroll a page forward
Up          move to previous item
Down        move to next item

Esc usually escapes the current action (often Cancel). Return/Enter usually accepts the current action (often OK).

This page was last edited on 19 January 2015, at 07:03.