Author: ilor
Date: Thu Jul 10 11:05:34 2008
New Revision: 27885
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27885&view=rev
Log:
* add stub editor2 hotkeys file (mostly a copy from old editor)
* clean hotkeys.cfg with respect to #ifdef APPLE
* add a (unused yet) scope parameter in hotkeys that will allow having a
different set of hotkeys in the game and in the editor, with some shared
Added:
trunk/data/core/editor2-hotkeys.cfg
Modified:
trunk/data/core/hotkeys.cfg
Added: trunk/data/core/editor2-hotkeys.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/editor2-hotkeys.cfg?rev=27885&view=auto
==============================================================================
--- trunk/data/core/editor2-hotkeys.cfg (added)
+++ trunk/data/core/editor2-hotkeys.cfg Thu Jul 10 11:05:34 2008
@@ -1,0 +1,170 @@
+# Editor key definitions
+
+#define IF_APPLE_CMD_ELSE_CTRL
+#ifdef APPLE
+ cmd=yes
+#else
+ ctrl=yes
+#endif
+#enddef
+
+[hotkey]
+ command="editor-undo"
+ scope="editor"
+ description="Undo"
+ key="u"
+[/hotkey]
+
+[hotkey]
+ command="editor-redo"
+ scope="editor"
+ description="Redo"
+ key="r"
+[/hotkey]
+
+[hotkey]
+ command="editor-save"
+ scope="editor"
+ description="Save map"
+ key="s"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+[hotkey]
+ command="editor-saveas"
+ scope="editor"
+ description="Save map as"
+ key="s"
+ {IF_APPLE_CMD_ELSE_CTRL}
+ alt=yes
+[/hotkey]
+
+[hotkey]
+ command="editor-quit"
+ scope="editor"
+ description="Quit map editor"
+ key="q"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+
+[hotkey]
+ command="editor-new"
+ scope="editor"
+ description="New map"
+ key="n"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+[hotkey]
+ command="editor-load"
+ scope="editor"
+ description="Load map from file"
+ key="l"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+[hotkey]
+ command="editor-edit-cut"
+ scope="editor"
+ description="Cut selection from map"
+ key="x"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+[hotkey]
+ command="editor-edit-copy"
+ scope="editor"
+ description="Copy selection from map"
+ key="c"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+[hotkey]
+ command="editor-edit-paste"
+ scope="editor"
+ description="Paste selection to map"
+ key="v"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+[hotkey]
+ command="editor-revert"
+ scope="editor"
+ description="Revert map from file"
+ key="r"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+[hotkey]
+ command="editor-resize"
+ scope="editor"
+ description="Resize map"
+ key="r"
+ {IF_APPLE_CMD_ELSE_CTRL}
+ alt=yes
+[/hotkey]
+
+[hotkey]
+ command="editor-selectall"
+ scope="editor"
+ description="Select entire map"
+ key="a"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+[hotkey]
+ command="editor-flip"
+ scope="editor"
+ description="Flip the map"
+ key="f"
+ {IF_APPLE_CMD_ELSE_CTRL}
+ alt=yes
+[/hotkey]
+
+[hotkey]
+ command="editor-tool-draw"
+ scope="editor"
+ description="Draw with the selected terrain and brush"
+ key="d"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+[hotkey]
+ command="editor-tool-fill"
+ scope="editor"
+ description="Flood fill with selected terrain"
+ key="f"
+[/hotkey]
+
+[hotkey]
+ command="editor-tool-select"
+ scope="editor"
+ description="Select tiles with the selected brush"
+ key="s"
+[/hotkey]
+
+[hotkey]
+ command="editor-refresh"
+ scope="editor"
+ description="Refresh map display"
+ key="e"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+[hotkey]
+ command="editor-terrainupdate"
+ scope="editor"
+ description="Redraw/update terrain transitions"
+ key="b"
+[/hotkey]
+
+[hotkey]
+ command="editor-terrainupdatedelay"
+ scope="editor"
+ description="Delay terrain transitions"
+ key="t"
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+
+#undef IF_APPLE_CMD_ELSE_CTRL
Modified: trunk/data/core/hotkeys.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/hotkeys.cfg?rev=27885&r1=27884&r2=27885&view=diff
==============================================================================
--- trunk/data/core/hotkeys.cfg (original)
+++ trunk/data/core/hotkeys.cfg Thu Jul 10 11:05:34 2008
@@ -2,465 +2,297 @@
# Warning:
# any hotkey that uses shift should not trigger any animation(s) in game since
shift toggles accelerated mode
+#define IF_APPLE_CMD_ELSE_CTRL
+#ifdef APPLE
+ cmd=yes
+#else
+ ctrl=yes
+#endif
+#enddef
+
[hotkey]
command=aiformula
+ scope="game"
key=f
[/hotkey]
-#ifdef APPLE
[hotkey]
command=accelerated
+ scope="game"
key=a
- cmd=yes
+ {IF_APPLE_CMD_ELSE_CTRL}
[/hotkey]
[hotkey]
command=bestenemymoves
+ scope="game"
key=b
- cmd=yes
+ {IF_APPLE_CMD_ELSE_CTRL}
[/hotkey]
[hotkey]
command=changeside
+ scope="game"
key=u
shift=yes
[/hotkey]
[hotkey]
- alt=yes
command=chatlog
+ scope="game"
+ alt=yes
key=c
[/hotkey]
[hotkey]
command=clearlabels
- cmd=yes
+ scope="game"
+ {IF_APPLE_CMD_ELSE_CTRL}
key=c
[/hotkey]
[hotkey]
command=clearmessages
- cmd=yes
+ scope="game"
+ {IF_APPLE_CMD_ELSE_CTRL}
key=x
[/hotkey]
[hotkey]
command=createunit
+ scope="game"
key=c
shift=yes
[/hotkey]
[hotkey]
command=command
+ scope="game"
key=:
[/hotkey]
[hotkey]
command=continue
+ scope="game"
key=t
[/hotkey]
[hotkey]
command=cycle
+ scope="game"
key=n
[/hotkey]
[hotkey]
command=cycleback
+ scope="game"
key=n
shift=yes
[/hotkey]
[hotkey]
command=delayshroud
+ scope="game"
key=d
shift=yes
[/hotkey]
[hotkey]
command=describeunit
+ scope="game"
key=d
[/hotkey]
[hotkey]
command=endunitturn
+ scope="game"
key=" "
[/hotkey]
[hotkey]
command=endturn
+ scope="game"
key=" "
alt=yes
[/hotkey]
[hotkey]
command=fullscreen
+ scope="general"
key=f
- cmd=yes
+ {IF_APPLE_CMD_ELSE_CTRL}
[/hotkey]
[hotkey]
command=help
+ scope="general"
key=F1
[/hotkey]
[hotkey]
command=holdposition
+ scope="game"
key=" "
shift=yes
[/hotkey]
[hotkey]
command=labelteamterrain
- key=l
- cmd=yes
+ scope="game"
+ key=l
+ {IF_APPLE_CMD_ELSE_CTRL}
[/hotkey]
[hotkey]
command=labelterrain
+ scope="game"
key=l
alt=yes
[/hotkey]
[hotkey]
command=leader
+ scope="game"
key=l
[/hotkey]
[hotkey]
command=load
+ scope="game"
key=o
cmd=yes
[/hotkey]
[hotkey]
command=mousescroll
- key=l
+ scope="general"
+ key=l
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+[hotkey]
+ command=mute
+ scope="game"
+ key=m
+ {IF_APPLE_CMD_ELSE_CTRL}
+ alt=yes
+[/hotkey]
+[hotkey]
+ command=objectives
+ scope="game"
+ key=j
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+[hotkey]
+ command=preferences
+ scope="general"
+ key=p
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+[hotkey]
+ command=quit
+ scope="general"
+ key=q
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+[hotkey]
+ command=recall
+ scope="game"
+ key=r
+ alt=yes
+[/hotkey]
+[hotkey]
+ command=recruit
+ scope="game"
+ key=r
cmd=yes
[/hotkey]
[hotkey]
- command=mute
- key=m
+ command=redo
+ scope="game"
+ key=r
+[/hotkey]
+[hotkey]
+ command=renameunit
+ scope="game"
+ key=n
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+[hotkey]
+ command=repeatrecruit
+ scope="game"
+ key=r
+ {IF_APPLE_CMD_ELSE_CTRL}
+ alt=yes
+[/hotkey]
+[hotkey]
+ command=save
+ scope="game"
+ key=s
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+[hotkey]
+ command=search
+ scope="game"
+ key=/
+[/hotkey]
+[hotkey]
+ command=showenemymoves
+ scope="game"
+ key=v
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+[hotkey]
+ command=speak
+ scope="game"
+ key=m
+[/hotkey]
+[hotkey]
+ command=speaktoall
+ scope="game"
+ key=m
+ alt=yes
+[/hotkey]
+[hotkey]
+ command=speaktoally
+ scope="game"
+ key=m
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+[hotkey]
+ command=statistics
+ scope="game"
+ key=s
+[/hotkey]
+[hotkey]
+ command=statustable
+ scope="game"
+ key=s
+ alt=yes
+[/hotkey]
+[hotkey]
+ command=togglegrid
+ scope="general"
+ key=g
+ {IF_APPLE_CMD_ELSE_CTRL}
+[/hotkey]
+[hotkey]
+ command=toggleshroud
+ scope="game"
+ key=k
+ alt=yes
+[/hotkey]
+[hotkey]
+ command=undo
+ scope="game"
+ key=u
+[/hotkey]
+[hotkey]
+ command=unitlist
+ scope="game"
+ key=u
+ alt=yes
+[/hotkey]
+[hotkey]
+ command=updateshroud
+ scope="game"
+ key=s
+#ifdef APPLE
cmd=yes
- alt=yes
-[/hotkey]
-[hotkey]
- command=objectives
- key=j
- cmd=yes
-[/hotkey]
-[hotkey]
- command=preferences
- key=p
- cmd=yes
-[/hotkey]
-[hotkey]
- command=quit
- key=q
- cmd=yes
-[/hotkey]
-[hotkey]
- command=recall
- key=r
- alt=yes
-[/hotkey]
-[hotkey]
- command=recruit
- key=r
- cmd=yes
-[/hotkey]
-[hotkey]
- command=redo
- key=r
-[/hotkey]
-[hotkey]
- command=renameunit
- key=n
- cmd=yes
-[/hotkey]
-[hotkey]
- command=repeatrecruit
- key=r
- cmd=yes
- alt=yes
-[/hotkey]
-[hotkey]
- command=save
- key=s
- cmd=yes
-[/hotkey]
-[hotkey]
- command=search
- key=/
-[/hotkey]
-[hotkey]
- command=showenemymoves
- key=v
- cmd=yes
-[/hotkey]
-[hotkey]
- command=speak
- key=m
-[/hotkey]
-[hotkey]
- command=speaktoall
- key=m
- alt=yes
-[/hotkey]
-[hotkey]
- command=speaktoally
- key=m
- cmd=yes
-[/hotkey]
-[hotkey]
- command=statistics
- key=s
-[/hotkey]
-[hotkey]
- command=statustable
- key=s
- alt=yes
-[/hotkey]
-[hotkey]
- command=togglegrid
- key=g
- cmd=yes
-[/hotkey]
-[hotkey]
- command=toggleshroud
- key=k
- alt=yes
-[/hotkey]
-[hotkey]
- command=undo
- key=u
-[/hotkey]
-[hotkey]
- alt=yes
- command=unitlist
- key=u
-[/hotkey]
-[hotkey]
- command=updateshroud
- key=s
- cmd=yes
+#endif
shift=yes
[/hotkey]
[hotkey]
command=zoomdefault
+ scope="general"
key=0
[/hotkey]
[hotkey]
command=zoomin
+ scope="general"
key="+"
[/hotkey]
[hotkey]
command=zoomout
+ scope="general"
key=-
[/hotkey]
-#else
-
-[hotkey]
- command=accelerated
- key=a
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=bestenemymoves
- key=b
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=changeside
- key=u
- shift=yes
-[/hotkey]
-[hotkey]
- alt=yes
- command=chatlog
- key=c
-[/hotkey]
-[hotkey]
- command=clearlabels
- ctrl=yes
- key=c
-[/hotkey]
-[hotkey]
- command=clearmessages
- ctrl=yes
- key=x
-[/hotkey]
-[hotkey]
- command=createunit
- ctrl=yes
- key=c
- shift=yes
-[/hotkey]
-[hotkey]
- command=continue
- key=t
-[/hotkey]
-[hotkey]
- command=command
- key=:
-[/hotkey]
-[hotkey]
- command=cycle
- key=n
-[/hotkey]
-[hotkey]
- command=cycleback
- key=n
- shift=yes
-[/hotkey]
-[hotkey]
- command=delayshroud
- key=d
- shift=yes
-[/hotkey]
-[hotkey]
- command=describeunit
- key=d
-[/hotkey]
-[hotkey]
- command=endunitturn
- key=" "
-[/hotkey]
-[hotkey]
- command=endturn
- key=" "
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=fullscreen
- key=f
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=help
- key=F1
-[/hotkey]
-[hotkey]
- command=holdposition
- key=" "
- shift=yes
-[/hotkey]
-[hotkey]
- command=labelteamterrain
- key=l
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=labelterrain
- key=l
- alt=yes
-[/hotkey]
-[hotkey]
- command=leader
- key=l
-[/hotkey]
-[hotkey]
- command=load
- key=o
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=mute
- key=m
- ctrl=yes
- alt=yes
-[/hotkey]
-[hotkey]
- command=objectives
- key=j
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=preferences
- key=p
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=quit
- key=q
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=recall
- key=r
- alt=yes
-[/hotkey]
-[hotkey]
- command=recruit
- key=r
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=redo
- key=r
-[/hotkey]
-[hotkey]
- command=renameunit
- key=n
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=repeatrecruit
- key=r
- ctrl=yes
- alt=yes
-[/hotkey]
-[hotkey]
- command=resistance
- key=d
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=save
- key=s
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=search
- key=/
-[/hotkey]
-[hotkey]
- command=showenemymoves
- key=v
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=speak
- key=m
-[/hotkey]
-[hotkey]
- command=speaktoall
- key=m
- alt=yes
-[/hotkey]
-[hotkey]
- command=speaktoally
- key=m
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=statistics
- key=s
-[/hotkey]
-[hotkey]
- command=statustable
- key=s
- alt=yes
-[/hotkey]
-[hotkey]
- command=togglegrid
- key=g
- ctrl=yes
-[/hotkey]
-[hotkey]
- command=undo
- key=u
-[/hotkey]
-[hotkey]
- alt=yes
- command=unitlist
- key=u
-[/hotkey]
-[hotkey]
- command=updateshroud
- key=s
- shift=yes
-[/hotkey]
-[hotkey]
- command=zoomdefault
- key=0
-[/hotkey]
-[hotkey]
- command=zoomin
- key="+"
-[/hotkey]
-[hotkey]
- command=zoomout
- key=-
-[/hotkey]
-
-#endif
+#undef IF_APPLE_CMD_ELSE_CTRL
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits