Difference between revisions of "HotKeysSystem"

From The Battle for Wesnoth Wiki
(Updating existing hotkeys for 1.10)
m (Defaults: Minor reformat. Changed text describing panning feature (it centers nothing))
 
Line 7: Line 7:
 
(On a Mac, "ctrl-" is replaced by "cmd-". Other special cases for a Mac are as listed.)
 
(On a Mac, "ctrl-" is replaced by "cmd-". Other special cases for a Mac are as listed.)
  
; Program controls
+
===Program controls===
 
  [key]        [effect]
 
  [key]        [effect]
 
  Escape:      Exit game / exit menu
 
  Escape:      Exit game / exit menu
Line 15: Line 15:
 
  ctrl-s:      Save game
 
  ctrl-s:      Save game
  
; Title screen
+
===Title screen===
 
  [key]        [effect]
 
  [key]        [effect]
 
  →            Next Tip of the Day
 
  →            Next Tip of the Day
 
  ←            Previous Tip of the Day
 
  ←            Previous Tip of the Day
  
; Unit controls
+
===Unit controls===
 
  [key]        [effect]
 
  [key]        [effect]
 
  n:            Next unit that has movement left
 
  n:            Next unit that has movement left
Line 38: Line 38:
 
  Right click:  Context menu / cancel selection
 
  Right click:  Context menu / cancel selection
  
; Display and sounds
+
===Display and sounds===
 
  [key]        [effect]
 
  [key]        [effect]
 
  +:            Zoom in
 
  +:            Zoom in
Line 52: Line 52:
 
   
 
   
 
  Arrow keys:  Scroll
 
  Arrow keys:  Scroll
  Middle click: Center on pointer location
+
  Middle click: Pan the screen while dragging the cursor
  
; Fog/shroud
+
===Fog/shroud===
 
  [key]        [effect]
 
  [key]        [effect]
 
  shift-s:      Update shroud now
 
  shift-s:      Update shroud now
  
; Information sources
+
===Information sources===
 
  [key]        [effect]
 
  [key]        [effect]
 
  F1:          Help
 
  F1:          Help
Line 71: Line 71:
 
  ctrl-v:      Show potential enemy moves
 
  ctrl-v:      Show potential enemy moves
  
; Labels
+
===Labels===
 
  [key]        [effect]
 
  [key]        [effect]
 
  ctrl-c:      Clear labels
 
  ctrl-c:      Clear labels
Line 77: Line 77:
 
  ctrl-l:      Set team label
 
  ctrl-l:      Set team label
  
; Planning mode
+
===Planning mode===
 
  [key]        [effect]
 
  [key]        [effect]
 
  p:            Toggle planning mode
 
  p:            Toggle planning mode
Line 89: Line 89:
 
  page up:      Move action earlier
 
  page up:      Move action earlier
  
; Multiplayer (chat)
+
===Multiplayer (chat)===
 
  [key]        [effect]
 
  [key]        [effect]
 
  alt-c:        View chat log
 
  alt-c:        View chat log
Line 97: Line 97:
 
  ctrl-x:      Clear messages
 
  ctrl-x:      Clear messages
  
; Debugging
+
===Debugging===
 
  [key]        [effect]
 
  [key]        [effect]
 
  F5:          Reload WML (from the title screen)
 
  F5:          Reload WML (from the title screen)

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.