The default mouse controls are as follows:
- Pan camera: Ctrl + move mouse
- Rotate camera: Ctrl + Shift + move mouse
- Zoom: Ctrl + left/right click + move mouse (can also just left/right click without moving the mouse to zoom in/out one step)
- Select: Shift + move mouse (most people, myself included, select things just by clicking; the advantage of this is it lets you select sides that are connected to other sides without an additional step)
There are also some default keyboard controls, though they may be lesser-known:
- A: Pan in (forward)
- Y/Z: Pan out (backward)
- Numpad /: Zoom out
- Numpad *: Zoom in
- Shift + down arrow: Pan down
- Ctrl + down arrow: Rotate up
- Alt + down arrow: Pan out (backward)
- Shift + left arrow: Pan left
- Ctrl + left arrow: Rotate right
- Alt + left arrow: Rotate clockwise (bank right)
- Shift + right arrow: Pan right
- Ctrl + right arrow: Rotate left
- Alt + right arrow: Rotate counterclockwise (bank left)
- Shift + up arrow: Pan up
- Ctrl + up arrow: Rotate down
- Alt + up arrow: Pan in (forward)
1.12.28 also adds the concept of an "input lock". This is a toggle you can use to make DLE capture the mouse and use all movement to rotate the camera; it displays a crosshair at the center of the display while in this mode. If that's too abstract, it's intended to allow you to temporarily enter "Descent movement mode", where you can move around kind of like you're actually in the game. You can switch back by toggling the input lock again.
Configuration for all this stuff is done through dle.ini. There are four relevant generic settings that configure input handling:
Code: Select all
MovementMode can be set to either 0 ("stepped") or 1 ("continuous"). Stepped is the default; pressing a pan/rotate/etc key will move the camera in the corresponding direction in one step, and if you hold it down it will repeat in more steps kind of like you're holding down the "a" key in a text box. Continuous causes the input handler to use frame-time to move the camera, more like you would see in the actual game; when you press the key, the camera starts moving at a constant rate, and stops immediately when you release it.
Note that continuous movement mode only applies to keys you've set up binding for. The default keys I listed are handled separately (through the Windows "accelerator key" system) and don't get the benefit of this - though you can re-bind the same keys to the same commands through dle.ini if you want. (This is an area I might improve later. )
Although 0 is the default for now, I strongly recommend switching this to 1 if you intend to use the input lock - it feels more natural that way.
MoveSpeed controls how fast the camera moves in response to a move/pan keyboard binding. 50 is the default.
TurnSpeed controls how fast the camera turns in response to a rotate keyboard binding. 1 is the default.
ForceFirstPersonOnInputLock determines whether switching on the input lock will automatically enter first-person mode even if DLE is configured to use third-person mode by default. It will switch back when you leave input lock. Default is 1 (enabled); I recommend leaving it this way since third-person input lock is kinda weird.
The actual keyboard bindings go under a separate section in dle.ini which starts with the "[DLE.Bindings]" heading. Here is a list:
Mouse state bindings
Code: Select all
Each state has up to four settings.
Button controls what button enters that state. The valid values are MK_LBUTTON (left click), MK_RBUTTON (right click), MK_MBUTTON (middle click), MK_XBUTTON1 (side button 1) and MK_XBUTTON2 (side button 2). You can leave this blank if you want the state to be entered without clicking a button (probably only sensible in conjunction with modifier keys). You can also add multiple buttons (e.g. "MK_LBUTTON,MK_RBUTTON") if you want any of those buttons to enter this state.
Modifiers controls what "modifier" keys need to be held down to enter that state, along with the mouse button(s) above. The valid values are VK_SHIFT (Shift key), VK_CONTROL (Ctrl key) and VK_MENU (Alt key). You can combine values (e.g. "VK_SHIFT,VK_CONTROL") if you want to have to hold both keys to enter the state; or leave it blank to allow the state to be entered without holding any modifier keys. (Again, you will typically want to have at least one of a button or modifier key configured if you want to be able to control DLE in any meaningful way. )
InvertX flips horizontal movement of the mouse in that state. 1 for flipped, 0 for default.
InvertY flips vertical movement of the mouse in that state. 1 for flipped, 0 for default.
These are the states:
Pan moves the camera left, right, up and down. By default, the Ctrl modifier is required but no button press.
Rotate rotates the camera left, right, up and down. The direction is flipped in third-person. By default, the Shift and Ctrl modifiers are required but no button press.
Zoom zooms the camera in and out in third-person; it moves the camera forward and back in first-person. By default, the Ctrl modifier is required, and either the left or right mouse button.
ZoomIn zooms the camera in one step in third-person; it moves the camera forward one step in first-person. By default this is Ctrl + left mouse button.
ZoomOut zooms the camera out one step in third-person; it moves the camera backward one step in first-person. By default this is Ctrl + right mouse button.
ButtonDown is a transitional state used to check whether most of the following states are allowed - I don't recommend changing it unless you need to allow additional buttons for the following commands (middle/x buttons). By default either left or right mouse button will enter this state.
QuickSelect is used to select items (it is entered from the button down state). By default this is the left mouse button.
AdvSelect is used to enter the "select" mode I described at the beginning of this article. By default this is the Shift key, no mouse button.
ApplyAdvSelect is used to select an item once already in the "select" mode. By default this is the left mouse button.
Mark is used to bulk-select cubes and vertices (by clicking and dragging). By default this is either the left or right mouse button.
Unmark is used to bulk-deselect cubes and vertices (by clicking and dragging). By default this is the Shift key plus the left or right mouse button.
QuickMark is used to mark cubes/sides in a single step. By default this is Shift + left click.
ContextMenu is used to show the mine view context menu. By default this is Shift + right click.
Keyboard state bindings
Code: Select all
Each state has three settings:
Key controls what key performs that action. Valid values are any of the alphanumeric keys ("A" to "Z", "0" to "9"), plus most special keys if you have the right code (VK_SPACE, VK_SHIFT, VK_CONTROL, VK_MENU, etc). You can look these up on the following page: https://msdn.microsoft.com/en-us/library/dd375731.aspx
(this is why a UI would be nice )
Modifiers controls what "modifier" keys need to be held down to perform that action, along with the key above. The valid values are VK_SHIFT (Shift key), VK_CONTROL (Ctrl key) and VK_MENU (Alt key). You can combine values (e.g. "VK_SHIFT,VK_CONTROL") if you want to have to hold both keys, or leave it blank if you don't want to require any modifier keys.
InputLock determines whether the key binding will only be used under input lock; 1 to require input lock, 0 (or leave this line out of the .ini) otherwise. This is useful if the keyboard command conflicts with some DLE keyboard accelerator, as most do; while in input lock, these bindings will be processed first and any conflicting commands will be ignored. Don't enable this for the input lock binding though or you won't be able to use it.
For completeness, these are the key bindings that can currently be set. Input lock was explained earlier; the rest hopefully should need no explanation.
Finally, since all of that is pretty complicated, here's a sample section you can add to your dle.ini if you just want to enable a fairly basic WASD config that you can switch in/out of using the Shift+Space hotkey.
Code: Select all